org.geotools.graph.build.basic
Class BasicGraphGenerator

java.lang.Object
  extended byorg.geotools.graph.build.basic.BasicGraphGenerator
All Implemented Interfaces:
GraphGenerator
Direct Known Subclasses:
BasicDirectedGraphGenerator

public class BasicGraphGenerator
extends java.lang.Object
implements GraphGenerator

An implementation of GraphGenerator. Graphs are generated as follows:

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

Constructor Summary
BasicGraphGenerator()
          Constructs a new generator.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicGraphGenerator

public BasicGraphGenerator()
Constructs a new generator.

Method Detail

add

public Graphable add(java.lang.Object obj)
Description copied from interface: GraphGenerator
Adds an object to the graph.

Specified by:
add in interface GraphGenerator
Parameters:
obj - The object to be modelled in the graph.
Returns:
The graph component used to model the object.
See Also:
GraphGenerator.add(Object)

get

public Graphable get(java.lang.Object obj)
Description copied from interface: GraphGenerator
Retrieves a component of the graph.

Specified by:
get in interface GraphGenerator
Parameters:
obj - The object modelled by the component.
Returns:
The graph component used to model the object.
See Also:
GraphGenerator.get(Object)

remove

public Graphable remove(java.lang.Object obj)
Description copied from interface: GraphGenerator
Removes an object from the graph.

Specified by:
remove in interface GraphGenerator
Parameters:
obj - The object modelled by the component.
Returns:
The graph component used to model the object.
See Also:
GraphGenerator.remove(Object)

setGraphBuilder

public void setGraphBuilder(GraphBuilder builder)
Description copied from interface: GraphGenerator
Sets the underlying builder used to physically construct the graph.

Specified by:
setGraphBuilder in interface GraphGenerator
Parameters:
builder - The new underlying GraphBuilder.
See Also:
GraphGenerator.setGraphBuilder(GraphBuilder)

getGraphBuilder

public GraphBuilder getGraphBuilder()
Description copied from interface: GraphGenerator
Returns the underlying builder.

Specified by:
getGraphBuilder in interface GraphGenerator
Returns:
The underyling builder.
See Also:
GraphGenerator.getGraphBuilder()

getGraph

public Graph getGraph()
Description copied from interface: GraphGenerator
Returns the graph being generated.

Specified by:
getGraph in interface GraphGenerator
Returns:
The generated graph.
See Also:
GraphGenerator.getGraph()


Copyright © GeoTools. All Rights Reserved.