org.h2gis.network.graph_creator
Class GraphCreator<V extends org.javanetworkanalyzer.data.VId,E extends org.javanetworkanalyzer.model.Edge>
java.lang.Object
org.h2gis.network.graph_creator.GraphCreator<V,E>
public class GraphCreator<V extends org.javanetworkanalyzer.data.VId,E extends org.javanetworkanalyzer.model.Edge>
- extends Object
Creates a JGraphT graph from an edges table produced by org.h2gis.h2spatialext.function.spatial.graph.ST_Graph. The graph has the
vertex and edge classes passed to the constructor. Its global and edge
orientations and weights are specified by the strings passed to the
constructor.
- Author:
- Adam Gouge
|
Method Summary |
protected org.javanetworkanalyzer.model.KeyedGraph<V,E> |
prepareGraph()
Prepares a graph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DIRECTED_EDGE
public static final int DIRECTED_EDGE
- See Also:
- Constant Field Values
REVERSED_EDGE
public static final int REVERSED_EDGE
- See Also:
- Constant Field Values
UNDIRECTED_EDGE
public static final int UNDIRECTED_EDGE
- See Also:
- Constant Field Values
GraphCreator
public GraphCreator(Connection connection,
String inputTable,
GraphFunctionParser.Orientation globalOrientation,
String edgeOrientationColumnName,
String weightColumn,
Class<? extends V> vertexClass,
Class<? extends E> edgeClass)
- Constructor.
- Parameters:
connection - ConnectioninputTable - Name of edges table from org.h2gis.h2spatialext.function.spatial.graph.ST_Graph.globalOrientation - Global orientationedgeOrientationColumnName - Edge orientationweightColumn - Weight column namevertexClass - Vertex classedgeClass - Edge class
prepareGraph
protected org.javanetworkanalyzer.model.KeyedGraph<V,E> prepareGraph()
throws SQLException
- Prepares a graph.
- Returns:
- The newly prepared graph, or null if the graph could not
be created
- Throws:
SQLException
Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.