biggests.tree
Class NodeInfo

java.lang.Object
  extended by biggests.tree.NodeInfo
All Implemented Interfaces:
java.io.Serializable

public class NodeInfo
extends java.lang.Object
implements java.io.Serializable

Title: Node Information Object

Description: Contains information about the content of a specific node in the dataset tree.

Copyright: Copyright (C) 2007 Joana Gonçalves This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See Also:
Serialized Form

Field Summary
static int BICLUSTER_GROUP
          The bicluster group node object type.
static int BICLUSTER_SINGLE
          The single bicluster node object type.
static int DISCRETIZED
          The discretized node object type.
static int ORIGINAL
          The original node object type.
static int POSTPROCESSED_GROUP
          The post-processed group node object type.
static int POSTPROCESSED_SINGLE
          The post-processed single node object type.
static int PREPROCESSED
          The preprocessed node object type.
static long serialVersionUID
           
static boolean SYMBOLS
          The symbol values matrix data type.
static boolean VALUES
          The float values matrix data type.
 
Constructor Summary
NodeInfo(smadeira.biclustering.NodeObjectInterface nodeObject, int nodeObjectType, javax.swing.tree.TreePath selectionPath, DatasetTree tree, NodeInfo parent, java.util.ArrayList<java.lang.String> infoStrings, java.util.ArrayList<java.lang.String> infoStyles)
          Constructs an object of type NodeInfo (with all the information about a certain node, including a pointer for the node object itself.
NodeInfo(smadeira.biclustering.NodeObjectInterface nodeObject, int nodeObjectType, javax.swing.tree.TreePath selectionPath, DatasetTree tree, NodeInfo parent, java.util.ArrayList<java.lang.String> infoStrings, java.util.ArrayList<java.lang.String> infoStyles, int index)
          Constructs an object of type NodeInfo (with all the information about a certain node, including a pointer for the node object itself.
 
Method Summary
protected  void addStylesToDocument(javax.swing.text.StyledDocument doc)
          Adds a set of common styles to StyledDocument doc
 int findInfoString(java.lang.String s)
          Finds a specific information string.
 boolean getDataType()
          Returns the node object data type value.
 int getFakeID()
          Returns the ID of the post-processed bicluster.
 int getId()
          Returns the number id of the NodeInfo object.
 javax.swing.text.StyledDocument getInfo()
          Returns a styled document containing information about this node.
 java.util.ArrayList<java.lang.String> getInfoStrings()
          Returns information strings.
 java.util.ArrayList<java.lang.String> getInfoStyles()
          Returns information styles.
 java.lang.String getName()
          Returns the name of this node information object.
 smadeira.biclustering.NodeObjectInterface getNodeObject()
          Returns the node object associated with the current node information object.
 int getNodeObjectType()
          Returns the node object type.
 NodeInfo getParentNodeInfo()
          Returns parent node information object.
 boolean isGeneID()
          Returns genes' names type.
 void setInfoStrings(java.util.ArrayList<java.lang.String> strings)
          Sets information strings.
 void setInfoStyles(java.util.ArrayList<java.lang.String> styles)
          Sets information styles.
 java.lang.String toString()
          Overrides the default toString method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

ORIGINAL

public static final int ORIGINAL
The original node object type.

See Also:
Constant Field Values

PREPROCESSED

public static final int PREPROCESSED
The preprocessed node object type.

See Also:
Constant Field Values

DISCRETIZED

public static final int DISCRETIZED
The discretized node object type.

See Also:
Constant Field Values

BICLUSTER_GROUP

public static final int BICLUSTER_GROUP
The bicluster group node object type.

See Also:
Constant Field Values

BICLUSTER_SINGLE

public static final int BICLUSTER_SINGLE
The single bicluster node object type.

See Also:
Constant Field Values

POSTPROCESSED_GROUP

public static final int POSTPROCESSED_GROUP
The post-processed group node object type.

See Also:
Constant Field Values

POSTPROCESSED_SINGLE

public static final int POSTPROCESSED_SINGLE
The post-processed single node object type.

See Also:
Constant Field Values

VALUES

public static final boolean VALUES
The float values matrix data type.

See Also:
Constant Field Values

SYMBOLS

public static final boolean SYMBOLS
The symbol values matrix data type.

See Also:
Constant Field Values
Constructor Detail

NodeInfo

public NodeInfo(smadeira.biclustering.NodeObjectInterface nodeObject,
                int nodeObjectType,
                javax.swing.tree.TreePath selectionPath,
                DatasetTree tree,
                NodeInfo parent,
                java.util.ArrayList<java.lang.String> infoStrings,
                java.util.ArrayList<java.lang.String> infoStyles,
                int index)
         throws InvalidNodeObjectTypeException
Constructs an object of type NodeInfo (with all the information about a certain node, including a pointer for the node object itself.

Parameters:
nodeObject - NodeObjectInterface the node object
nodeObjectType - int the type of the node object:
NodeInfo.ORIGINAL
NodeInfo.PREPROCESSED
NodeInfo.DISCRETIZED
NodeInfo.BICLUSTER_GROUP
NodeInfo.BICLUSTER_SINGLE
NodeInfo.POSTPROCESSED_GROUP
NodeInfo.POSTPROCESSED_SINGLE
selectionPath - TreePath the selected path
tree - DatasetTree the dataset tree
parent - the parent NodeInfo of this NodeInfo object's parent group (only for post-processed biclusters NodeInfo objects)
infoStrings - the information String[]
infoStyles - the styles String[]
index - int the index of the bicluster in the array of biclusters (it applies only to post-processed biclusters
Throws:
InvalidNodeObjectTypeException - if the type of the node object is not valid

NodeInfo

public NodeInfo(smadeira.biclustering.NodeObjectInterface nodeObject,
                int nodeObjectType,
                javax.swing.tree.TreePath selectionPath,
                DatasetTree tree,
                NodeInfo parent,
                java.util.ArrayList<java.lang.String> infoStrings,
                java.util.ArrayList<java.lang.String> infoStyles)
         throws InvalidNodeObjectTypeException
Constructs an object of type NodeInfo (with all the information about a certain node, including a pointer for the node object itself.

Parameters:
nodeObject - NodeObjectInterface the node object
nodeObjectType - int the type of the node object:
NodeInfo.ORIGINAL
NodeInfo.PREPROCESSED
NodeInfo.DISCRETIZED
NodeInfo.BICLUSTER_GROUP
NodeInfo.BICLUSTER_SINGLE
NodeInfo.POSTPROCESSED_GROUP
NodeInfo.POSTPROCESSED_SINGLE
selectionPath - TreePath the selected path
tree - DatasetTree the dataset tree
parent - the parent NodeInfo of this NodeInfo object
infoStrings - the information String[]
infoStyles - the styles String[]
Throws:
InvalidNodeObjectTypeException - if the type of the node object is not valid
Method Detail

getName

public java.lang.String getName()
Returns the name of this node information object.

Returns:
the String name of this node information object

getId

public int getId()
Returns the number id of the NodeInfo object.

Returns:
int the number id

getNodeObjectType

public int getNodeObjectType()
Returns the node object type.
One of the following:
NodeInfo.ORIGINAL
NodeInfo.PREPROCESSED
NodeInfo.DISCRETIZED
NodeInfo.BICLUSTER_GROUP
NodeInfo.BICLUSTER_SINGLE
NodeInfo.POSTPROCESSED_GROUP
NodeInfo.POSTPROCESSED_SINGLE

Returns:
int the node object type

getDataType

public boolean getDataType()
Returns the node object data type value.
One of the following:
NodeInfo.VALUES
NodeInfo.SYMBOLS

Returns:
boolean the data type of the node object

isGeneID

public boolean isGeneID()
Returns genes' names type. true - genes' names are gene IDs (gene ontology names)
false - genes' names are probeset IDs (IDs used in the mRNA measurements

Returns:
boolean the type of genes' names

getNodeObject

public smadeira.biclustering.NodeObjectInterface getNodeObject()
Returns the node object associated with the current node information object.

Returns:
NodeObjectInterface the node object

getParentNodeInfo

public NodeInfo getParentNodeInfo()
Returns parent node information object.

Returns:
NodeInfo parent node information object

getInfoStrings

public java.util.ArrayList<java.lang.String> getInfoStrings()
Returns information strings.

Returns:
String[] information strings

getInfoStyles

public java.util.ArrayList<java.lang.String> getInfoStyles()
Returns information styles.

Returns:
ArrayList information styles

getFakeID

public int getFakeID()
Returns the ID of the post-processed bicluster.

Returns:
int the ID of the post-processed bicluster

setInfoStrings

public void setInfoStrings(java.util.ArrayList<java.lang.String> strings)
Sets information strings.

Parameters:
strings - information ArrayList

setInfoStyles

public void setInfoStyles(java.util.ArrayList<java.lang.String> styles)
Sets information styles.

Parameters:
styles - information ArrayList styles

getInfo

public javax.swing.text.StyledDocument getInfo()
                                        throws javax.swing.text.BadLocationException
Returns a styled document containing information about this node.

Returns:
StyledDocument containing information about this node
Throws:
javax.swing.text.BadLocationException - if strings or styles could not be found

findInfoString

public int findInfoString(java.lang.String s)
Finds a specific information string.

Parameters:
s - the information String to look for
Returns:
int the index of the information string in the array (-1 if it couldn't find it)

addStylesToDocument

protected void addStylesToDocument(javax.swing.text.StyledDocument doc)
Adds a set of common styles to StyledDocument doc

Parameters:
doc - the StyledDocument to add styles to

toString

public java.lang.String toString()
Overrides the default toString method. Returns a formatted string with the name to display in the corresponding dataset tree node.

Overrides:
toString in class java.lang.Object
Returns:
String the name of the node object, which is displayed in the datasets tree