org.geotools.graph.build
Interface GraphGenerator

All Known Subinterfaces:
LineGraphGenerator
All Known Implementing Classes:
BasicGraphGenerator, BasicLineGraphGenerator, OptLineGraphGenerator, PolygonGraphGenerator

public interface GraphGenerator

Contructs a graph based on relationships between the entities (objects) modelled by the graph.

The underlying graph is generated by continually adding objects to the generator. The Generator determines the relationships between the objects and decides how to model the relationship and the objects themselves in the graph.

The GraphGenerator is the upper level of the graph construction process. It is a wrapper around the GraphBuilder class that is intended to instruct the builder how to build the underyling graph structure.

Author:
Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
See Also:
GraphBuilder

Method Summary
 Graphable add(java.lang.Object obj)
          Adds an object to the graph.
 Graphable get(java.lang.Object obj)
          Retrieves a component of the graph.
 Graph getGraph()
          Returns the graph being generated.
 GraphBuilder getGraphBuilder()
          Returns the underlying builder.
 Graphable remove(java.lang.Object obj)
          Removes an object from the graph.
 void setGraphBuilder(GraphBuilder builder)
          Sets the underlying builder used to physically construct the graph.
 

Method Detail

add

public Graphable add(java.lang.Object obj)
Adds an object to the graph.

Parameters:
obj - The object to be modelled in the graph.
Returns:
The graph component used to model the object.

get

public Graphable get(java.lang.Object obj)
Retrieves a component of the graph.

Parameters:
obj - The object modelled by the component.
Returns:
The graph component used to model the object.

remove

public Graphable remove(java.lang.Object obj)
Removes an object from the graph.

Parameters:
obj - The object modelled by the component.
Returns:
The graph component used to model the object.

setGraphBuilder

public void setGraphBuilder(GraphBuilder builder)
Sets the underlying builder used to physically construct the graph.

Parameters:
builder - The new underlying GraphBuilder.

getGraphBuilder

public GraphBuilder getGraphBuilder()
Returns the underlying builder.

Returns:
The underyling builder.

getGraph

public Graph getGraph()
Returns the graph being generated.

Returns:
The generated graph.


Copyright © GeoTools. All Rights Reserved.