Oracle® Spatial Java API Reference
10g Release 2 (10.2)

B14373-01


oracle.spatial.network
Class NetworkFactory

java.lang.Object
  extended byoracle.spatial.network.NetworkFactory


public class NetworkFactory
extends java.lang.Object

This class handles network element creation for Oracle Spatial Network Data Model.


Method Summary
static void addBidirectedLinkColumn(java.sql.Connection conn, Network network)
add a bidirected column to the network link table
static void addColumn(java.sql.Connection conn, java.lang.String tableName, java.lang.String columnName, java.lang.String columnDataType)
Add a column in a database table
static Path createComplexPath(int id, Node startNode, Node endNode, Link[] links)
Creates a complex path with the specified start node and end node
static MDPoint[] createConvexHull(JGeometry geom)
Creates a convex hull as an array of MDpoint for the specified geometry.
static MDPoint[] createConvexHull(MDPoint[] points)
Creates the convex hull as an array of MDpoint for the specified array of MDPoints.
static MDPoint[] createConvexHull(Network network)
Creates the convex hull as an array of MDpoint for the specified network.
static Network createDirectedNetwork()
static GeometryMetadata createGeometryMetadata(java.lang.String tableName)
Creates a logical geometry metadataand.
static GeometryMetadata createGeometryMetadata(java.lang.String tableName, java.lang.String geomColumnName, int srid, int noOfDims)
Creates a spatial geometry metadata.
static Link createLink(int id, Network network, int startNodeID, int endNodeID, double cost)
Creates a logical network link.
static Link createLink(int id, Node startNode, Node endNode, double cost)
Creates a logical network link.
static Link createLink(int id, java.lang.String name, Node startNode, Node endNode, double cost)
Creates a logical network link.
JGeometry createLinkGeometry(int srid, int noOfDims, double[] ordArray)
Returns a link geometry (a linestring JGeometry).
static void createLinkTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomType, java.lang.String geomColumnName, java.lang.String costColumnName, int noOfHierarchyLevels)
Creates an empty network link table in the database.
static Link createLogicalLink(int linkID, java.lang.String linkName, Node startNode, Node endNode, double cost)
Creates a logical link.
static Network createLogicalNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected)
Creates an empty logical network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST".
static Network createLogicalNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, boolean isComplex)
Creates an empty logical network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST".
static Network createLogicalNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, java.lang.String nodeTableName, java.lang.String nodeCostColumn, java.lang.String linkTableName, java.lang.String linkCostColumn, java.lang.String pathTableName, java.lang.String pathLinkTableName)
Creates an empty logical network.
static Network createLogicalNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, java.lang.String nodeTableName, java.lang.String nodeCostColumn, java.lang.String linkTableName, java.lang.String linkCostColumn, java.lang.String pathTableName, java.lang.String pathLinkTableName, boolean isComplex)
Creates an empty logical network.
static Node createLogicalNode(int nodeID, java.lang.String nodeName)
Creates a logical node.
static Node createLogicalNode(int nodeID, java.lang.String nodeName, int externalNetworkID, int externalNodeID)
Creates a logical node.
static Link createLRSLink(int linkID, java.lang.String linkName, Node startNode, Node endNode, double cost, int geomID, double startMeasure, double endMeasure, JGeometry geom)
Creates an LRS geometry link.
static Network createLRSNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, java.lang.String lrsTableName, java.lang.String lrsGeomColumn)
Creates an empty spatial LRS_GEOMETRY network.
static Network createLRSNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, java.lang.String lrsTableName, java.lang.String lrsGeomColumn, boolean isComplex)
Creates an empty spatial LRS_GEOMETRY network.
static Network createLRSNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, java.lang.String nodeTableName, java.lang.String nodeCostColumn, java.lang.String linkTableName, java.lang.String linkCostColumn, java.lang.String lrsTableName, java.lang.String lrsGeomColumn, java.lang.String pathTableName, java.lang.String pathGeomColumn, java.lang.String pathLinkTableName)
Creates an empty spatial LRS_GEOMETRY network.
static Network createLRSNetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, java.lang.String nodeTableName, java.lang.String nodeCostColumn, java.lang.String linkTableName, java.lang.String linkCostColumn, java.lang.String lrsTableName, java.lang.String lrsGeomColumn, java.lang.String pathTableName, java.lang.String pathGeomColumn, java.lang.String pathLinkTableName, boolean isComplex)
Creates an empty spatial LRS_GEOMETRY network.
static Node createLRSNode(int nodeID, java.lang.String nodeName, int geomID, double measure, JGeometry geom)
Creates an LRS geometry node.
static Node createLRSNode(int nodeID, java.lang.String nodeName, int geomID, double measure, JGeometry geom, int externalNetworkID, int externalNodeID)
Creates an LRS geometry node.
static void createLRSTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomColumnName)
Creates an empty network LRS table in the database.
static MBR createMBR(double[] min, double[] max)
Creates an MBR.
static MBR createMBR(JGeometry geom)
Creates an MBR of the specified geometry.
static MDPoint createMDPoint(double x)
Creates a 1D MDPoint.
static MDPoint createMDPoint(double[] pt)
Creates an MDPoint.
static MDPoint createMDPoint(double x, double y)
Creates a 2D MDPoint.
static MDPoint createMDPoint(double x, double y, double z)
Creates a 3D MDPoint.
static Network createNetwork(Network network)
Creates an empty network from the specified network (metadata).
static void createNetworkTables(java.sql.Connection conn, Network network)
Creates the network tables based on the specified network metadata.
static Node createNode(int id)
Creates a logical network node.
static Node createNode(int id, double x, double y)
Creates a spatial network node.
static Node createNode(int id, double x, double y, int externalNetworkID, int externalNodeID)
Creates a spatial network node.
static Node createNode(int id, java.lang.String name)
Creates a logical network node.
static Node createNode(int id, java.lang.String name, int externalNetworkID, int externalNodeID)
Creates a logical network node.
JGeometry createNodeGeometry(int srid, int noOfDims, double[] ordArray)
Returns a node point geometry (JGeometry).
static void createNodeTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomType, java.lang.String geomColumnName, java.lang.String costColumnName, int noOfHierarchyLevels)
Creates an empty network node table in the database.
static void createNodeTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomType, java.lang.String geomColumnName, java.lang.String costColumnName, int noOfHierarchyLevels, boolean isComplex)
Creates an empty network node table in the database.
static void createNodeTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomType, java.lang.String geomColumnName, java.lang.String costColumnName, java.lang.String partitionColumnName, int noOfHierarchyLevels, boolean isComplex)
Creates an empty network node table in the database.
static Network createPartitionNetwork(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionNetworkName)
Returns the partition network with the partitions as nodes and the connections between partitions as links.
static Network createPartitionNetwork(Network network, java.lang.String partitionNetworkName)
Returns the partition network with the partitions as nodes and the connections between partitions as links.
static void createPartitionTable(java.sql.Connection conn, java.lang.String tableName)
Creates an empty network partition table in the database.
static Path createPath(int id, Node startNode, Node endNode, Link[] links)
Creates a path with the specified start node and the specified end node.
static Path createPath(Node startNode, Node endNode)
Creates an empty path with the specified start node and end node.
static Path createPath(Node startNode, Node endNode, Link[] links)
Creates a path with the specified start node and the specified end node.
static void createPathLinkTable(java.sql.Connection conn, java.lang.String tableName)
Creates an empty network path-link table in the database.
static void createPathTable(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomColumnName)
Creates an empty network path table in the database.
static SDODimArray createSDODimArray(boolean isGeodetic, double lowerBound, double upperBound, double tolerance)
Creates a java 2D SDO_DIM_ARRAY.
static SDODimArray createSDODimArray(java.lang.String[] dimNames, double[] lowerBounds, double[] upperBounds, double[] tolerances)
Creates a java SDO_DIM_ARRAY.
static Link createSDOLink(int linkID, java.lang.String linkName, Node startNode, Node endNode, double cost, double[] ords, int dimNo, int srid)
Creates an SDO geometry link.
static Link createSDOLink(int linkID, java.lang.String linkName, Node startNode, Node endNode, double cost, JGeometry geom)
Creates an SDO geometry link.
static Network createSDONetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims)
Creates an empty spatial SDO_GEOMETRY network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST"
static Network createSDONetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, boolean isComplex)
Creates an empty spatial SDO_GEOMETRY network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST"
static Network createSDONetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, java.lang.String nodeTableName, java.lang.String nodeGeomColumn, java.lang.String nodeCostColumn, java.lang.String linkTableName, java.lang.String linkGeomColumn, java.lang.String linkCostColumn, java.lang.String pathTableName, java.lang.String pathGeomColumn, java.lang.String pathLinkTableName)
Creates an empty spatial SDO_GEOMETRY network.
static Network createSDONetwork(java.lang.String networkName, int noOfHierarchyLevels, boolean isDirected, int srid, int noOfDims, java.lang.String nodeTableName, java.lang.String nodeGeomColumn, java.lang.String nodeCostColumn, java.lang.String linkTableName, java.lang.String linkGeomColumn, java.lang.String linkCostColumn, java.lang.String pathTableName, java.lang.String pathGeomColumn, java.lang.String pathLinkTableName, boolean isComplex)
Creates an empty spatial SDO_GEOMETRY network.
static Node createSDONode(int nodeID, java.lang.String nodeName, double x, double y)
Creates a spatial node (SDO_GEOMETRY with SRID = 0).
static Node createSDONode(int nodeID, java.lang.String nodeName, double x, double y, int srid)
Creates a spatial node (SDO_GEOMETRY).
static Node createSDONode(int nodeID, java.lang.String nodeName, double x, double y, int externalNetworkID, int externalNodeID)
Creates a spatial node (SDO_GEOMETRY).
static Path createSimplePath(int id, Node startNode, Node endNode, Link[] links)
Creates a simple path with the specified start node and end node.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

createDirectedNetwork

public static Network createDirectedNetwork()

createNetwork

public static Network createNetwork(Network network)
Creates an empty network from the specified network (metadata).
Parameters:
network - the specified network

createNode

public static Node createNode(int id)
Creates a logical network node.
Parameters:
id - the node ID

createNode

public static Node createNode(int id,
                              java.lang.String name,
                              int externalNetworkID,
                              int externalNodeID)
Creates a logical network node.
Parameters:
id - the node ID
name - node Name
externalNetworkID - external network ID
externalNodeID - external node ID

createNode

public static Node createNode(int id,
                              java.lang.String name)
Creates a logical network node.
Parameters:
id - the node ID
name - node Name

createNode

public static Node createNode(int id,
                              double x,
                              double y,
                              int externalNetworkID,
                              int externalNodeID)
Creates a spatial network node.
Parameters:
id - the node ID
x - the x ordinate
y - the y ordinate
externalNetworkID - external network ID
externalNodeID - external node ID

createNode

public static Node createNode(int id,
                              double x,
                              double y)
Creates a spatial network node.
Parameters:
id - the node ID
x - the x ordinate
y - the y ordinate

createLink

public static Link createLink(int id,
                              java.lang.String name,
                              Node startNode,
                              Node endNode,
                              double cost)
Creates a logical network link.
Parameters:
id - the link ID
name - the link name
startNode - the start node
endNode - the end node
cost - the link cost

createLink

public static Link createLink(int id,
                              Node startNode,
                              Node endNode,
                              double cost)
Creates a logical network link.
Parameters:
id - the link ID
startNode - the start node
endNode - the end node
cost - the link cost

createLink

public static Link createLink(int id,
                              Network network,
                              int startNodeID,
                              int endNodeID,
                              double cost)
                       throws NetworkDataException
Creates a logical network link.
Parameters:
id - the link ID
network - the specified network
startNodeID - the start node ID
endNodeID - the end node ID
cost - the link cost
Throws:
NetworkDataException

createPath

public static Path createPath(Node startNode,
                              Node endNode)
Creates an empty path with the specified start node and end node.
Parameters:
startNode - the start node
endNode - the end node

createSimplePath

public static Path createSimplePath(int id,
                                    Node startNode,
                                    Node endNode,
                                    Link[] links)
                             throws NetworkDataException
Creates a simple path with the specified start node and end node.
Parameters:
id - the path ID
startNode - the start node
endNode - the end node
links - the array of the path links
Throws:
NetworkDataException

createComplexPath

public static Path createComplexPath(int id,
                                     Node startNode,
                                     Node endNode,
                                     Link[] links)
                              throws NetworkDataException
Creates a complex path with the specified start node and end node
Parameters:
id - the path ID
startNode - the start node
endNode - the end node
links - the array of the path links
Throws:
NetworkDataException

createPath

public static Path createPath(Node startNode,
                              Node endNode,
                              Link[] links)
Creates a path with the specified start node and the specified end node.
Parameters:
startNode - the start node
endNode - the end node
links - the array of the path links

createPath

public static Path createPath(int id,
                              Node startNode,
                              Node endNode,
                              Link[] links)
Creates a path with the specified start node and the specified end node.
Parameters:
id - the path ID
startNode - the start node
endNode - the end node
links - the array of the path links

createMBR

public static MBR createMBR(double[] min,
                            double[] max)
Creates an MBR.
Parameters:
min - the ordinates of low point
max - the ordinates of high point

createMBR

public static MBR createMBR(JGeometry geom)
Creates an MBR of the specified geometry.
Parameters:
geom - the specified geometry

createMDPoint

public static MDPoint createMDPoint(double[] pt)
Creates an MDPoint.
Parameters:
pt - the point ordinates

createMDPoint

public static MDPoint createMDPoint(double x)
Creates a 1D MDPoint.
Parameters:
x - the x ordinate

createMDPoint

public static MDPoint createMDPoint(double x,
                                    double y)
Creates a 2D MDPoint.
Parameters:
x - the x ordinate
y - the y ordinate

createMDPoint

public static MDPoint createMDPoint(double x,
                                    double y,
                                    double z)
Creates a 3D MDPoint.
Parameters:
x - the x ordinate
y - the y ordinate
z - the z ordinate

createConvexHull

public static MDPoint[] createConvexHull(JGeometry geom)
Creates a convex hull as an array of MDpoint for the specified geometry.
Parameters:
geom - the specified geometry

createConvexHull

public static MDPoint[] createConvexHull(MDPoint[] points)
Creates the convex hull as an array of MDpoint for the specified array of MDPoints.
Parameters:
points -

createConvexHull

public static MDPoint[] createConvexHull(Network network)
Creates the convex hull as an array of MDpoint for the specified network.
Parameters:
network - network from which the convex hull is to be created

createGeometryMetadata

public static GeometryMetadata createGeometryMetadata(java.lang.String tableName)
Creates a logical geometry metadataand.

createGeometryMetadata

public static GeometryMetadata createGeometryMetadata(java.lang.String tableName,
                                                      java.lang.String geomColumnName,
                                                      int srid,
                                                      int noOfDims)
Creates a spatial geometry metadata.
Parameters:
tableName - the geometry table Name
geomColumnName - the geometry column name
srid - the SRID
noOfDims - the number of dimensions

createLogicalNetwork

public static Network createLogicalNetwork(java.lang.String networkName,
                                           int noOfHierarchyLevels,
                                           boolean isDirected,
                                           java.lang.String nodeTableName,
                                           java.lang.String nodeCostColumn,
                                           java.lang.String linkTableName,
                                           java.lang.String linkCostColumn,
                                           java.lang.String pathTableName,
                                           java.lang.String pathLinkTableName,
                                           boolean isComplex)
Creates an empty logical network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
nodeTableName - the node table name name
nodeCostColumn - the node cost column
linkTableName - the link table name
linkCostColumn - the link cost column name
pathTableName - the path table name
pathLinkTableName - the path-link table name
isComplex - is this network a complex network that referes to other networks

createLogicalNetwork

public static Network createLogicalNetwork(java.lang.String networkName,
                                           int noOfHierarchyLevels,
                                           boolean isDirected,
                                           java.lang.String nodeTableName,
                                           java.lang.String nodeCostColumn,
                                           java.lang.String linkTableName,
                                           java.lang.String linkCostColumn,
                                           java.lang.String pathTableName,
                                           java.lang.String pathLinkTableName)
Creates an empty logical network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
nodeTableName - the node table name name
nodeCostColumn - the node cost column
linkTableName - the link table name
linkCostColumn - the link cost column name
pathTableName - the path table name
pathLinkTableName - the path-link table name

createLogicalNetwork

public static Network createLogicalNetwork(java.lang.String networkName,
                                           int noOfHierarchyLevels,
                                           boolean isDirected,
                                           boolean isComplex)
Creates an empty logical network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST".
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
isComplex - is this network a complex network that referes to other networks

createLogicalNetwork

public static Network createLogicalNetwork(java.lang.String networkName,
                                           int noOfHierarchyLevels,
                                           boolean isDirected)
Creates an empty logical network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST".
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?

createSDONetwork

public static Network createSDONetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       java.lang.String nodeTableName,
                                       java.lang.String nodeGeomColumn,
                                       java.lang.String nodeCostColumn,
                                       java.lang.String linkTableName,
                                       java.lang.String linkGeomColumn,
                                       java.lang.String linkCostColumn,
                                       java.lang.String pathTableName,
                                       java.lang.String pathGeomColumn,
                                       java.lang.String pathLinkTableName,
                                       boolean isComplex)
Creates an empty spatial SDO_GEOMETRY network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
nodeTableName - the node table name
nodeGeomColumn - the node geometry column name
nodeCostColumn - the node cost column name
linkTableName - the link table name
linkGeomColumn - the link geometry column name
linkCostColumn - the link cost column name
pathTableName - the path table name
pathGeomColumn - the path geometry column name
pathLinkTableName - the path link table name
isComplex - is the network a complex network that refers to other networks

createSDONetwork

public static Network createSDONetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       java.lang.String nodeTableName,
                                       java.lang.String nodeGeomColumn,
                                       java.lang.String nodeCostColumn,
                                       java.lang.String linkTableName,
                                       java.lang.String linkGeomColumn,
                                       java.lang.String linkCostColumn,
                                       java.lang.String pathTableName,
                                       java.lang.String pathGeomColumn,
                                       java.lang.String pathLinkTableName)
Creates an empty spatial SDO_GEOMETRY network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
nodeTableName - the node table name
nodeGeomColumn - the node geometry column name
nodeCostColumn - the node cost column name
linkTableName - the link table name
linkGeomColumn - the link geometry column name
linkCostColumn - the link cost column name
pathTableName - the path table name
pathGeomColumn - the path geometry column name
pathLinkTableName - the path link table name

createSDONetwork

public static Network createSDONetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       boolean isComplex)
Creates an empty spatial SDO_GEOMETRY network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST"
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
isComplex - if the network is acomplex network that refers other networks

createSDONetwork

public static Network createSDONetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims)
Creates an empty spatial SDO_GEOMETRY network with the default naming convension: node table name = network_name + "_NODE$", link table name = network_name + "_LINK$, path table name = network_name + "_PATH$", path-link table name = network_name + "PLINK$", all geometry column name="GEOMETRY" and all cost column name="COST"
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions

createLRSNetwork

public static Network createLRSNetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       java.lang.String nodeTableName,
                                       java.lang.String nodeCostColumn,
                                       java.lang.String linkTableName,
                                       java.lang.String linkCostColumn,
                                       java.lang.String lrsTableName,
                                       java.lang.String lrsGeomColumn,
                                       java.lang.String pathTableName,
                                       java.lang.String pathGeomColumn,
                                       java.lang.String pathLinkTableName,
                                       boolean isComplex)
Creates an empty spatial LRS_GEOMETRY network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
nodeTableName - the node table name
nodeCostColumn - the node cost column name
linkTableName - the link table name
linkCostColumn - the link cost column name
lrsTableName - the LRS table name
lrsGeomColumn - the LRS geometry column name
pathTableName - the path table name
pathGeomColumn - the path geometry column
pathLinkTableName - the path link table name
isComplex - if the network is a complex network that refers other networks

createLRSNetwork

public static Network createLRSNetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       java.lang.String nodeTableName,
                                       java.lang.String nodeCostColumn,
                                       java.lang.String linkTableName,
                                       java.lang.String linkCostColumn,
                                       java.lang.String lrsTableName,
                                       java.lang.String lrsGeomColumn,
                                       java.lang.String pathTableName,
                                       java.lang.String pathGeomColumn,
                                       java.lang.String pathLinkTableName)
Creates an empty spatial LRS_GEOMETRY network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
nodeTableName - the node table name
nodeCostColumn - the node cost column name
linkTableName - the link table name
linkCostColumn - the link cost column name
lrsTableName - the LRS table name
lrsGeomColumn - the LRS geometry column name
pathTableName - the path table name
pathGeomColumn - the path geometry column
pathLinkTableName - the path link table name

createLRSNetwork

public static Network createLRSNetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       java.lang.String lrsTableName,
                                       java.lang.String lrsGeomColumn,
                                       boolean isComplex)
Creates an empty spatial LRS_GEOMETRY network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
lrsTableName - the LRS table name
lrsGeomColumn - the LRS geometry column name
isComplex - if the network is a complex network that refers other networks

createLRSNetwork

public static Network createLRSNetwork(java.lang.String networkName,
                                       int noOfHierarchyLevels,
                                       boolean isDirected,
                                       int srid,
                                       int noOfDims,
                                       java.lang.String lrsTableName,
                                       java.lang.String lrsGeomColumn)
Creates an empty spatial LRS_GEOMETRY network.
Parameters:
networkName - the network name
noOfHierarchyLevels - the number of hierarchy levels
isDirected - is the network directed?
srid - the SRID
noOfDims - the number of dimensions
lrsTableName - the LRS table name
lrsGeomColumn - the LRS geometry column name

createNodeTable

public static void createNodeTable(java.sql.Connection conn,
                                   java.lang.String tableName,
                                   java.lang.String geomType,
                                   java.lang.String geomColumnName,
                                   java.lang.String costColumnName,
                                   java.lang.String partitionColumnName,
                                   int noOfHierarchyLevels,
                                   boolean isComplex)
                            throws java.sql.SQLException
Creates an empty network node table in the database.
Parameters:
conn - the database connection
tableName - the node table name
geomType - the geometry type: (null | "SDO_GEOMETRY" |"LRS_GEOMETRY" | "TOPO_GEOMETRY"
geomColumnName - the geometry column name
costColumnName - the node cost column
partitionColumnName - the node partition column name
noOfHierarchyLevels - the number of hierarchy levels
isComplex - is the network is a complex network that refers other networks
Throws:
java.sql.SQLException

createNodeTable

public static void createNodeTable(java.sql.Connection conn,
                                   java.lang.String tableName,
                                   java.lang.String geomType,
                                   java.lang.String geomColumnName,
                                   java.lang.String costColumnName,
                                   int noOfHierarchyLevels)
                            throws java.sql.SQLException
Creates an empty network node table in the database.
Parameters:
conn - the database connection
tableName - the node table name
geomType - the geometry type: (null | "SDO_GEOMETRY" |"LRS_GEOMETRY" | "TOPO_GEOMETRY"
geomColumnName - the geometry column name
costColumnName - the node cost column
noOfHierarchyLevels - the number of hierarchy levels
Throws:
java.sql.SQLException

createNodeTable

public static void createNodeTable(java.sql.Connection conn,
                                   java.lang.String tableName,
                                   java.lang.String geomType,
                                   java.lang.String geomColumnName,
                                   java.lang.String costColumnName,
                                   int noOfHierarchyLevels,
                                   boolean isComplex)
                            throws java.sql.SQLException
Creates an empty network node table in the database.
Parameters:
conn - the database connection
tableName - the node table name
geomType - the geometry type: (null | "SDO_GEOMETRY" |"LRS_GEOMETRY" | "TOPO_GEOMETRY"
geomColumnName - the geometry column name
costColumnName - the node cost column
noOfHierarchyLevels - the number of hierarchy levels
isComplex - is the network is a complex network that refers other networks
Throws:
java.sql.SQLException

createLinkTable

public static void createLinkTable(java.sql.Connection conn,
                                   java.lang.String tableName,
                                   java.lang.String geomType,
                                   java.lang.String geomColumnName,
                                   java.lang.String costColumnName,
                                   int noOfHierarchyLevels)
                            throws java.sql.SQLException
Creates an empty network link table in the database.
Parameters:
conn - the database connection
tableName - the link table name
geomType - geometry type: (null | "SDO_GEOMETRY" |"LRS_GEOMETRY" | "TOPO_GEOMETRY"
geomColumnName - the geometry column name
costColumnName - the link cost column name
noOfHierarchyLevels - the number of hierarchy levels
Throws:
java.sql.SQLException

createLRSTable

public static void createLRSTable(java.sql.Connection conn,
                                  java.lang.String tableName,
                                  java.lang.String geomColumnName)
                           throws java.sql.SQLException
Creates an empty network LRS table in the database.
Parameters:
conn - the database connection
tableName - the LRS table name
geomColumnName - the LRS geometry column name
Throws:
java.sql.SQLException

createPathTable

public static void createPathTable(java.sql.Connection conn,
                                   java.lang.String tableName,
                                   java.lang.String geomColumnName)
                            throws java.sql.SQLException
Creates an empty network path table in the database.
Parameters:
conn - the database connection
tableName - the path table name
geomColumnName - the path geometry column name
Throws:
java.sql.SQLException

createPathLinkTable

public static void createPathLinkTable(java.sql.Connection conn,
                                       java.lang.String tableName)
                                throws java.sql.SQLException
Creates an empty network path-link table in the database.
Parameters:
conn - the database connection
tableName - the path-link table name
Throws:
java.sql.SQLException

createPartitionTable

public static void createPartitionTable(java.sql.Connection conn,
                                        java.lang.String tableName)
                                 throws java.sql.SQLException
Creates an empty network partition table in the database.
Parameters:
conn - the database connection
tableName - the partition table name
Throws:
java.sql.SQLException

createLogicalNode

public static Node createLogicalNode(int nodeID,
                                     java.lang.String nodeName,
                                     int externalNetworkID,
                                     int externalNodeID)
Creates a logical node.
Parameters:
nodeID - the node ID
nodeName - the node name
externalNetworkID - external network ID
externalNodeID - external node ID

createLogicalNode

public static Node createLogicalNode(int nodeID,
                                     java.lang.String nodeName)
Creates a logical node.
Parameters:
nodeID - the node ID
nodeName - the node name

createSDONode

public static Node createSDONode(int nodeID,
                                 java.lang.String nodeName,
                                 double x,
                                 double y,
                                 int externalNetworkID,
                                 int externalNodeID)
Creates a spatial node (SDO_GEOMETRY).
Parameters:
nodeID - the node ID
nodeName - the node name
x - the x ordiaate
y - the y ordinate
externalNetworkID - external network ID
externalNodeID - external node ID

createSDONode

public static Node createSDONode(int nodeID,
                                 java.lang.String nodeName,
                                 double x,
                                 double y,
                                 int srid)
Creates a spatial node (SDO_GEOMETRY).
Parameters:
nodeID - the node ID
nodeName - the node name
x - the x ordiaate
y - the y ordinate
srid - SRID for the node geometry

createSDONode

public static Node createSDONode(int nodeID,
                                 java.lang.String nodeName,
                                 double x,
                                 double y)
Creates a spatial node (SDO_GEOMETRY with SRID = 0).
Parameters:
nodeID - the node ID
nodeName - the node name
x - the x ordiaate
y - the y ordinate

createLRSNode

public static Node createLRSNode(int nodeID,
                                 java.lang.String nodeName,
                                 int geomID,
                                 double measure,
                                 JGeometry geom,
                                 int externalNetworkID,
                                 int externalNodeID)
Creates an LRS geometry node.
Parameters:
nodeID - the node ID
nodeName - the node name
geomID - the LRS geometry ID
measure - the LRS node measure
geom - the node geometry
externalNetworkID - external network ID
externalNodeID - external node ID

createLRSNode

public static Node createLRSNode(int nodeID,
                                 java.lang.String nodeName,
                                 int geomID,
                                 double measure,
                                 JGeometry geom)
Creates an LRS geometry node.
Parameters:
nodeID - the node ID
nodeName - the node name
geomID - the LRS geometry ID
measure - the LRS node measure
geom - the node geometry

createLogicalLink

public static Link createLogicalLink(int linkID,
                                     java.lang.String linkName,
                                     Node startNode,
                                     Node endNode,
                                     double cost)
Creates a logical link.
Parameters:
linkID - the link ID
linkName - the link name
startNode - the start node
endNode - the end node
cost - the link cost

createSDOLink

public static Link createSDOLink(int linkID,
                                 java.lang.String linkName,
                                 Node startNode,
                                 Node endNode,
                                 double cost,
                                 double[] ords,
                                 int dimNo,
                                 int srid)
Creates an SDO geometry link.
Parameters:
linkID - the link ID
linkName - the link name
startNode - the start node
endNode - the end node
cost - the link cost
ords - the geometry odrinates
dimNo - the number of dimensions
srid - the SRID

createSDOLink

public static Link createSDOLink(int linkID,
                                 java.lang.String linkName,
                                 Node startNode,
                                 Node endNode,
                                 double cost,
                                 JGeometry geom)
Creates an SDO geometry link.
Parameters:
linkID - the link ID
linkName - the link name
startNode - the start node
endNode - the end node
cost - the link cost
geom - the link geometry

createLRSLink

public static Link createLRSLink(int linkID,
                                 java.lang.String linkName,
                                 Node startNode,
                                 Node endNode,
                                 double cost,
                                 int geomID,
                                 double startMeasure,
                                 double endMeasure,
                                 JGeometry geom)
Creates an LRS geometry link.
Parameters:
linkID - the link ID
linkName - the link name
startNode - the start node
endNode - the end node
cost - the link cost
geom - the link geometry
geomID - the LRS geometry ID
startMeasure - the LRS start measure
endMeasure - the LRS end measure

createNetworkTables

public static void createNetworkTables(java.sql.Connection conn,
                                       Network network)
                                throws java.sql.SQLException,
                                       NetworkDataException
Creates the network tables based on the specified network metadata. The following tables will be created: node table, link table, path table and path-link table (if specified)
Parameters:
conn - the database connection
network - the specified network
Throws:
java.sql.SQLException
NetworkDataException

createSDODimArray

public static SDODimArray createSDODimArray(java.lang.String[] dimNames,
                                            double[] lowerBounds,
                                            double[] upperBounds,
                                            double[] tolerances)
Creates a java SDO_DIM_ARRAY.
Parameters:
dimNames - the dimension names
lowerBounds - the lower bounds
upperBounds - the upper bounds
tolerances - the tolerances

createSDODimArray

public static SDODimArray createSDODimArray(boolean isGeodetic,
                                            double lowerBound,
                                            double upperBound,
                                            double tolerance)
Creates a java 2D SDO_DIM_ARRAY.
Parameters:
isGeodetic - is it in a geodetic coordinate (lat., lon.)?
lowerBound - the lower bound
upperBound - the upper bound
tolerance - the tolerance

createNodeGeometry

public JGeometry createNodeGeometry(int srid,
                                    int noOfDims,
                                    double[] ordArray)
Returns a node point geometry (JGeometry).
Parameters:
srid - the SRID
noOfDims - the number of dimensions
ordArray - the ordinate array of the point geometry

createLinkGeometry

public JGeometry createLinkGeometry(int srid,
                                    int noOfDims,
                                    double[] ordArray)
Returns a link geometry (a linestring JGeometry).
Parameters:
srid - the SRID
noOfDims - the number of the dimensions
ordArray - the ordinate array of the link geometry(x1,y1,....xn,yn)

createPartitionNetwork

public static Network createPartitionNetwork(java.sql.Connection conn,
                                             java.lang.String networkName,
                                             java.lang.String partitionNetworkName)
                                      throws java.sql.SQLException,
                                             NetworkDataException
Returns the partition network with the partitions as nodes and the connections between partitions as links. The partition network represents the connection relationship between the partitions of the specified partitioned network
Parameters:
conn - the database connection
networkName - the network name
partitionNetworkName - the resulting partition network name
Throws:
java.sql.SQLException
NetworkDataException

createPartitionNetwork

public static Network createPartitionNetwork(Network network,
                                             java.lang.String partitionNetworkName)
                                      throws NetworkDataException
Returns the partition network with the partitions as nodes and the connections between partitions as links. The partition network represents the connection relationship between the partitions of the specified partitioned network
Parameters:
network - the network name
partitionNetworkName - the resulting partition network name
Throws:
NetworkDataException

addColumn

public static void addColumn(java.sql.Connection conn,
                             java.lang.String tableName,
                             java.lang.String columnName,
                             java.lang.String columnDataType)
                      throws java.sql.SQLException,
                             NetworkDataException
Add a column in a database table
Parameters:
conn - database connection
tableName - table name
columnName - column name to be added
columnDataType - data type for the column
Throws:
java.sql.SQLException
NetworkDataException

addBidirectedLinkColumn

public static void addBidirectedLinkColumn(java.sql.Connection conn,
                                           Network network)
                                    throws java.sql.SQLException,
                                           NetworkDataException
add a bidirected column to the network link table
Parameters:
conn - database connection
network - network object
Throws:
java.sql.SQLException
NetworkDataException

Oracle® Spatial Java API Reference
10g Release 2 (10.2)

B14373-01


Copyright © 2005, Oracle. All Rights Reserved.