public interface Graph<S extends Node>
Nodes that are linked together.  Edges are implicit.| Modifier and Type | Method and Description | 
|---|---|
void | 
addNode(S node)
Store a node in the  
Graph. | 
void | 
checkForCycles(Node node,
              Node childNode)
Assertain whether this graph contains any cycles. 
 | 
Collection<? extends S> | 
getAllNodes()
Lookup all nodes in the SDRF graph 
 | 
<T extends S>  | 
getNode(String nodeName,
       Class<T> nodeType)
Lookup a node by name and class type in the SDRF graph. 
 | 
S | 
getNode(String nodeName,
       String nodeType)
Lookup a node by name and type in the SDRF graph. 
 | 
int | 
getNodeCount()
Returns the total number of nodes stored by this SDRF graph. 
 | 
<T extends S>  | 
getNodes(Class<T> nodeType)
Lookup all nodes of the given class type in the SDRF graph. 
 | 
Collection<? extends S> | 
getNodes(String nodeType)
Lookup all nodes of the given type (by SDRF spec name) in the SDRF graph. 
 | 
Collection<? extends S> | 
getRootNodes()
Lookup all 'root' nodes in the SDRF graph. 
 | 
void | 
removeNode(S node)
Remove a node that was previously stored in the  
Graph. | 
void | 
resolveGraphStructure(S node)
Update this node being stored with appropriate references to it's parents and update any child node references
 that are already present in the graph. 
 | 
void | 
updateNode(S node)
Updates an node in the SDRF graph, on the assumption that its position in the graph, or its children, have been
 altered. 
 | 
void addNode(S node) throws ParseException
Graph.  This node will be added to the internal graph representation of nodes
 represented by the graph object.  In this way, this graph object represents the data encoded by the spreadsheet
 rather than directly representing the spreadsheet data structure.node - the node to storeParseException - if the node being stored would violate the principle that the graph is acyclicvoid removeNode(S node)
Graph.  This node will be taken out of the internal graph
 representation of nodes represented by this object.
 
 Note: this method also removes any references elsewhere in the graph to this Node, from parent and child nodes.
 You should relink your graph around the removed node once you have taken it out: but be warned, this may
 compromise the structure of the graph.node - the node to removevoid updateNode(S node) throws ParseException
node - the node that needs updatingParseException - if the node being stored would violate the principle that the graph is acyclic<T extends S> T getNode(String nodeName, Class<T> nodeType)
T - the generic node type to lookupnodeName - the node namenodeType - the class type of the nodeS getNode(String nodeName, String nodeType)
nodeName - the node namenodeType - the tag that describes the node in the SDRF spec<T extends S> Collection<T> getNodes(Class<T> nodeType)
T - the generic node type to lookupnodeType - the class type of the nodeCollection<? extends S> getNodes(String nodeType)
nodeType - the class type of the nodeCollection<? extends S> getRootNodes()
getNodes(Class), substituting the class parameter
 for the known root node type.Collection<? extends S> getAllNodes()
int getNodeCount()
void resolveGraphStructure(S node) throws ParseException
node - the node being storedParseException - if the node being stored would violate the principle that the graph is acyclicvoid checkForCycles(Node node, Node childNode) throws ParseException
node - the node to checkchildNode - the child node that should be addedParseException - if a cycle is detectedCopyright © 2014. All rights reserved.