nl.cwi.sen1.visbase.factbrowser.data
Class RStoreFact
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
nl.cwi.sen1.visbase.factbrowser.data.RStoreFact
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Observer, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
public class RStoreFact
- extends javax.swing.tree.DefaultMutableTreeNode
- implements java.util.Observer
This class is the in memory representation of a Fact coupled to a specific
FactType. This FactType is like or similar. The class extends the
DefaultMutableTreeNode so we can directly add new Visualisations which can
represent the Fact.
- Author:
- Renze de Vries
- See Also:
- Serialized Form
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary |
RStoreFact()
This is the default constructor only present for failsafe situations. |
RStoreFact(java.lang.String factName,
int factId,
RStoreFactType factType)
The constructor with all the parameters to create a new Fact |
Method Summary |
int |
getFactId()
get the FactId so we can identify it's uniqueness |
java.lang.String |
getFactName()
getFactName method so we can determine the name without the FactType |
RStoreFactType |
getFactType()
get the FactType this fact is composed of. |
nl.cwi.sen1.relationstores.types.RType |
getRType()
This method is there to contain the RType. |
java.lang.String |
getType()
|
void |
setRType(nl.cwi.sen1.relationstores.types.RType type)
This method sets the RType of the FactNode |
java.lang.String |
toString()
toString method so in the tree it will be visible what the name of the
fact is and which FactType it is. |
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
Whenever a new visualisation plugin is added for the specific FactType
this method is called as an update caller. |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
log
private static final org.apache.commons.logging.Log log
factName
private java.lang.String factName
rType
private nl.cwi.sen1.relationstores.types.RType rType
factId
private int factId
factType
private RStoreFactType factType
RStoreFact
public RStoreFact()
- This is the default constructor only present for failsafe situations.
Normally the overloaded constructor: FactNode(String factName, int
factId, RStoreFactType factType) should be used.
RStoreFact
public RStoreFact(java.lang.String factName,
int factId,
RStoreFactType factType)
- The constructor with all the parameters to create a new Fact
- Parameters:
factName
- The Name of the FactfactId
- The unique identifier of the FactfactType
- The Type the fact is composed of
toString
public java.lang.String toString()
- toString method so in the tree it will be visible what the name of the
fact is and which FactType it is.
- Overrides:
toString
in class javax.swing.tree.DefaultMutableTreeNode
getFactName
public java.lang.String getFactName()
- getFactName method so we can determine the name without the FactType
getFactType
public RStoreFactType getFactType()
- get the FactType this fact is composed of.
- Returns:
- The factType
getRType
public nl.cwi.sen1.relationstores.types.RType getRType()
- This method is there to contain the RType.
- Returns:
- The RType itself
setRType
public void setRType(nl.cwi.sen1.relationstores.types.RType type)
- This method sets the RType of the FactNode
- Parameters:
type
- This is the actual RType
getFactId
public int getFactId()
- get the FactId so we can identify it's uniqueness
- Returns:
- The factId
update
public void update(java.util.Observable arg0,
java.lang.Object arg1)
- Whenever a new visualisation plugin is added for the specific FactType
this method is called as an update caller. This method will update the in
memory tree so it will display the current available visualisations
- Specified by:
update
in interface java.util.Observer
getType
public java.lang.String getType()