comirva.data
Class SunburstNode

java.lang.Object
  extended by comirva.data.SunburstNode

public class SunburstNode
extends Object

This class implements the data structure for a node in a Sunburst visualization.


Field Summary
(package private)  boolean isDebugMode
           
 
Constructor Summary
SunburstNode(DataMatrix to, Vector<String> allTerms, Vector<String> coocTerms, double importance, double importanceMaxNorm, double angularStartPosition, int maxItemsPerNode, int maxDepth, double minImportance, SunburstNode parent)
          Creates a new SunburstNode.
 
Method Summary
 void calculateSunburst()
          Determines all nodes of the sunburst and calculates their document frequencies.
 Vector<String> getAllTerms()
           
 double getAngularExtent()
          Returns the importance of this node expressed as angular extent of the node.
 double getAngularStartPosition()
           
 Vector<SunburstNode> getChildNodes()
           
 Vector<String> getCoocTerms()
           
 int getDepth()
          Returns the hierarchy level of the current node.
 long getDocumentFrequency()
           
 Vector<String> getDocuments()
           
 double getImportance()
           
 double getImportanceMaxNorm()
           
 SunburstNode getParentNode()
           
 int getSunburstDepth()
          Determines and returns the depth of the sunburst, i.e. the maximum hierarchy level.
 DataMatrix getTermOccurrenceMatrix()
           
 Vector<Double> getTFxIDF()
           
 void setDocuments(Vector<String> documents)
           
 void setTFxIDF(Vector<Double> TFxIDF)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isDebugMode

boolean isDebugMode
Constructor Detail

SunburstNode

public SunburstNode(DataMatrix to,
                    Vector<String> allTerms,
                    Vector<String> coocTerms,
                    double importance,
                    double importanceMaxNorm,
                    double angularStartPosition,
                    int maxItemsPerNode,
                    int maxDepth,
                    double minImportance,
                    SunburstNode parent)
Creates a new SunburstNode.

Parameters:
to - a DataMatrix representing the term occurrences
allTerms - a Vector containing all terms that are shown by the term occurrence matrix
coocTerms - a Vector of the co-occurring terms of the node
importance - sum-normalized importance of current node relative to importance of all other nodes on same hierarchy level
importanceMaxNorm - maximum-normalized importance of current node relative to importance of all other nodes on same hierarchy level
maxItemsPerNode - maximum number of items per node
maxDepth - maximum depth of tree (maximum number of co-occurring terms)
minImportance - minimum importance (child nodes with an importance below that threshold will be excluded from the sunburst)
parent - a SunburstNode pointing to the parent node of this instance
Method Detail

calculateSunburst

public void calculateSunburst()
Determines all nodes of the sunburst and calculates their document frequencies.


getAngularExtent

public double getAngularExtent()
Returns the importance of this node expressed as angular extent of the node.

Returns:
a double representing the angular extent

getDepth

public int getDepth()
Returns the hierarchy level of the current node. Note that the root node has a depth of 1.

Returns:
the depth of the current node

getSunburstDepth

public int getSunburstDepth()
Determines and returns the depth of the sunburst, i.e. the maximum hierarchy level.

Returns:
the depth in hierarchy levels

getChildNodes

public Vector<SunburstNode> getChildNodes()
Returns:
Returns the childNodes.

getCoocTerms

public Vector<String> getCoocTerms()
Returns:
Returns the coocTerms.

getImportance

public double getImportance()
Returns:
Returns the importance.

getImportanceMaxNorm

public double getImportanceMaxNorm()
Returns:
Returns the importanceMaxNorm.

getAngularStartPosition

public double getAngularStartPosition()
Returns:
Returns the angularStartPosition.

getParentNode

public SunburstNode getParentNode()
Returns:
Returns the parentNode.

getDocumentFrequency

public long getDocumentFrequency()
Returns:
returns the document frequency

getTermOccurrenceMatrix

public DataMatrix getTermOccurrenceMatrix()
Returns:
returns the term occurrence matrix

getAllTerms

public Vector<String> getAllTerms()
Returns:
returns a Vector containing all terms (corresponding to the term occurrence matrix)

getDocuments

public Vector<String> getDocuments()
Returns:
returns a Vector of documents that contain all terms that are represented by this node

setDocuments

public void setDocuments(Vector<String> documents)
Parameters:
documents - a Vector that represents a list of documents that contain all terms that are represented by this node

getTFxIDF

public Vector<Double> getTFxIDF()
Returns:
Returns the TFxIDF.

setTFxIDF

public void setTFxIDF(Vector<Double> TFxIDF)
Parameters:
TFxIDF - The TFxIDF to set.