| org.geotools.graph.build.GraphBuilder
All known Subclasses: org.geotools.graph.build.basic.BasicGraphBuilder,
GraphBuilder | public interface GraphBuilder (Code) | | Build the physical components of a Graph. The GraphBuilder manages the
details of component creation, addition, and removal from the graph.
Graph components are created through calls to buildNode() and buildEdge(Node,
Node), and then added to the graph through calls to addNode(Node), and
addEdge(Edge).
The GraphBuilder class is the lower level of the graph construction process.
The builder does not manage the entities being modelled by the graph
components. This is done at a higher level by the GraphGenerator.
class.
See Also: Graph See Also: GraphGenerator author: Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net |
addEdge | public void addEdge(Edge edge)(Code) | | Adds an edge to the graph.
Parameters: edge - Edge to be added to graph. |
addNode | public void addNode(Node node)(Code) | | Adds a node to the graph.
Parameters: node - Node to be added to graph. |
buildEdge | public Edge buildEdge(Node nodeA, Node nodeB)(Code) | | Builds a new edge for the graph. This method does not add the new node to
the graph, this must be done with the addEdge(Edge) method.
Parameters: nodeA - Adjacent node to edge. Parameters: nodeB - Adjacent node to edge. Edge the newly built Edge. |
buildNode | public Node buildNode()(Code) | | Builds a new node for the graph. This method does not add the new node to
the graph, this must be done with the addNode(Node) method.
Node The newly built node. |
clone | public Object clone(boolean deep) throws Exception(Code) | | Returns a clone of the builder. A deep clone copies the underlying
graph structure, a non deep clone results in an empty builder
Parameters: deep - Deep or non deep clone. A graph builder. |
getGraph | public Graph getGraph()(Code) | | Returns the graph being built.
Graph The graph being built. |
importGraph | public void importGraph(Graph g)(Code) | | Constructs a graph builder from a pre built graph. The nodes and edges
of the existing graph are imported into the builder. Relationships between
nodes and edges are assummed to be preexistant.
Parameters: g - A pre built graph. |
removeEdge | public void removeEdge(Edge edge)(Code) | | Removes an edge from the graph.
Parameters: edge - Edge to be removed from graph. |
removeEdges | public void removeEdges(Collection edges)(Code) | | Removes a collection of edges from the graph.
Parameters: edges - Collection of edges to be removed from the graph. |
removeNode | public void removeNode(Node node)(Code) | | Removes an node from the graph.
Parameters: node - Node to be removed from graph. |
removeNodes | public void removeNodes(Collection nodes)(Code) | | Removes a collection of nodes from the graph.
Parameters: nodes - A collection of nodes to be removed from the graph. |
|
|