org.h2gis.network.graph_creator
Class GraphFunction

java.lang.Object
  extended by org.h2gis.h2spatialapi.AbstractFunction
      extended by org.h2gis.network.graph_creator.GraphFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
ST_Accessibility, ST_ConnectedComponents, ST_GraphAnalysis, ST_ShortestPath, ST_ShortestPathLength, ST_ShortestPathTree

public class GraphFunction
extends AbstractFunction

Helper class for Graph Functions.

Author:
Adam Gouge

Field Summary
static String ARG_ERROR
           
 
Fields inherited from interface org.h2gis.h2spatialapi.Function
PROP_NAME, PROP_REMARKS
 
Constructor Summary
GraphFunction()
           
 
Method Summary
protected static void logTime(org.slf4j.Logger logger, long startTime)
          Log the time elapsed from startTime until now.
protected static org.javanetworkanalyzer.model.KeyedGraph prepareGraph(Connection connection, String inputTable, String orientation, String weight, Class vertexClass, Class edgeClass)
          Return a JGraphT graph from the input edges table.
 
Methods inherited from class org.h2gis.h2spatialapi.AbstractFunction
addProperty, getProperty, removeProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARG_ERROR

public static final String ARG_ERROR
See Also:
Constant Field Values
Constructor Detail

GraphFunction

public GraphFunction()
Method Detail

prepareGraph

protected static org.javanetworkanalyzer.model.KeyedGraph prepareGraph(Connection connection,
                                                                       String inputTable,
                                                                       String orientation,
                                                                       String weight,
                                                                       Class vertexClass,
                                                                       Class edgeClass)
                                                                throws SQLException
Return a JGraphT graph from the input edges table.

Parameters:
connection - Connection
inputTable - Input table name
orientation - Orientation string
weight - Weight column name, null for unweighted graphs
Returns:
Graph
Throws:
SQLException

logTime

protected static void logTime(org.slf4j.Logger logger,
                              long startTime)
Log the time elapsed from startTime until now.

Parameters:
logger - Logger
startTime - Start time in milliseconds


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.