|
Oracle® Spatial Java API Reference 10g Release 2 (10.2) B14373-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.spatial.network.NetworkManager
public class NetworkManager
This class defines methods for the network data I/O and network analysis.
Method Summary | |
---|---|
static Path[] |
allPaths(Network network, int startNodeID, int goalNodeID, int depthLimit, double costLimit, int noOfSolutions) Returns all paths between the start node and the goal node. |
static Path[] |
allPaths(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint, int noOfSolutions) Returns all paths between the start node and the goal node. |
static Path[] |
allPaths(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint, int noOfSolutions, oracle.spatial.network.AStarCostFunction costFunction, double searchMultiplier) Returns all paths between the start node and the goal node. |
static Path[] |
allPaths(Path complexPath, int depthLimit, double costLimit, int noOfSolutions) Returns all paths between the start node and the goal node of the complex path. |
static void |
clearNetworkCache() Clears the network cache |
static void |
createNetworkHiearchy(Network network, int numHierarchy, int[] ndNumLevel) Creates a network hiearchy with the given number of levels. |
static void |
createNetworkPartitionTable(java.sql.Connection conn, java.lang.String partitionTableName) Creates a network partition table. |
static void |
createRefConstraints(java.sql.Connection conn, java.lang.String networkName) Creates the referential constraints on the link and the path tables. |
static void |
deregisterNetworkConstraint(java.sql.Connection conn, java.lang.String networkConstraintName) Deregister given constraint from user_sdo_network_constraints |
static void |
disableRefConstraints(java.sql.Connection conn, java.lang.String networkName) Disables the referential constraints on the link and the path tables. |
static void |
dropNetwork(java.sql.Connection conn, java.lang.String networkName) Drops the network from the database. |
static void |
dropRefConstraints(java.sql.Connection conn, java.lang.String networkName) Drops the referential constraints on the link and the path tables. |
static void |
enableRefConstraints(java.sql.Connection conn, java.lang.String networkName) Enables the referential constraints on the link and the path tables. |
static int |
findConnectedComponents(Network network) Returns the number of connected components in the network. |
static java.util.Vector |
findConnectedComponentVector(Network network) Returns connected components of the network in a Vector. |
static int |
findMaxNodeDegree(Network network, int degreeType) Finds the maximum node degree of the network |
static MBR |
findMBR(Node[] nodeArray, double expandFactor) Returns the MBR of the node array and expanded it by the specified factor. |
static int |
findMinNodeDegree(Network network, int degreeType) Finds the minimum node degree of the network |
static Node[] |
findNodesWithinDegreeBounds(Network network, int degreeType, int minDegree, int maxDegree) Finds nodes with degree within the given degree bounds. |
static Node[] |
findReachableNodes(Network network, int sourceNodeID) Returns all nodes that can be reached from the source node. |
static Node[] |
findReachableNodes(Network network, int sourceNodeID, MBR mbr) Returns all nodes that can be reached from the source node. |
static Node[] |
findReachableNodes(Network network, int sourceNodeID, MBR mbr, int depthLimit) Returns all nodes that can be reached from the source node. |
static Node[] |
findReachableNodes(Network network, int sourceNodeID, MBR mbr, int depthLimit, int maxNoOfNodes) Returns all nodes that can be reached from the source node. |
static Node[] |
findReachableNodes(Network network, int sourceNodeID, NetworkConstraint constraint) Returns all nodes that can be reached from the source node. |
static Node[] |
findReachingNodes(Network network, int targetNodeID) Returns all nodes that can reach the target node. |
static Node[] |
findReachingNodes(Network network, int targetNodeID, MBR mbr) Returns all nodes that can reach the target node. |
static Node[] |
findReachingNodes(Network network, int targetNodeID, MBR mbr, int depthLimit) Returns all nodes that can reach the target node. |
static Node[] |
findReachingNodes(Network network, int targetNodeID, NetworkConstraint constraint) Returns all nodes that can reach the target node. |
static long |
getMaxFlow(Network network, int sourceNodeID, int sinkNodeID, java.util.Vector linkFlowVec) Retunrs the max flow between the source node and the sink node |
static java.util.HashMap |
getNetworkCacheMap() Returns the network cache as a HashMap with network name (type: String) as keys and networks (type: Network) as values |
static Network |
getNetworkFromCache(java.lang.String networkName) Gets the network from the network cache if the specified network is not in the cache, an NetworkDataException exception will be thrown. |
static int |
getNetworkIDFromName(java.sql.Connection conn, java.lang.String networkName) Returns the network ID from a given network name |
static java.util.HashMap |
getNetworkIDs(java.sql.Connection conn) Retunrs network names and IDs from the database. |
static java.lang.String |
getNetworkNameFromID(java.sql.Connection conn, int networkID) Returns the network name from a given network ID |
static java.util.HashMap |
getNetworkNames(java.sql.Connection conn) Retunrs network names and IDs from the database. |
static int |
getNodePartitionID(java.sql.Connection conn, java.lang.String networkName, int nodeID) Returns the partition ID of the given node |
static int[] |
getPartitionIDArray(java.sql.Connection conn, java.lang.String networkName) Returns node partition IDs in an array |
static java.lang.String |
getVersion() Returns the version of the SDO networkAdapter. |
static void |
insertGeomMetadata(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomColumnName, int srid, SDODimArray dimArray) Inserts the geometry metadata to the database. |
static boolean |
isNetworkPartitioned(java.sql.Connection conn, java.lang.String networkName) |
static boolean |
isPartitionedByNode(java.sql.Connection conn, java.lang.String networkName) |
static boolean |
isReachable(Network network, int sourceNodeID, int targetNodeID) Checks if the source node can reach the target node. |
static boolean |
isReachable(Network network, int sourceNodeID, int targetNodeID, MBR mbr, int depthLimit) Checks if the source node can reach the target node. |
static boolean |
isReachable(Network network, int sourceNodeID, int targetNodeID, NetworkConstraint constraint) Checks if the source node can reach the target node. |
static void |
makeLogical(Network network) Convert a spatial network to a logical network Note this only updates the network metadata information original spatial information remains unahcnged |
static void |
makeSpatial(Network network, java.lang.String nodeGeomColumn, java.lang.String linkGeomColumn, java.lang.String pathGeomColumn) Convert a logical network to a spatial network Note this only updates the network metadata information |
static Network |
mcst(Network network) Returns the minimum cost spanning tree (Kruskal Algorithm) as a network. |
static Link[] |
mcstLinkArray(Network network) Returns the minimum cost spanning tree (Kruskal Algorithm). |
static Path[] |
nearestNeighbors(Network network, int startNodeID, int noOfNeighbors) Returns the shortest paths of the N nearest neighbors from the start node. |
static Path[] |
nearestNeighbors(Network network, int startNodeID, int noOfNeighbors, NetworkConstraint constraint) Returns the shortest paths of the N nearest neighbors from the start node. |
static Path[] |
nearestNeighbors(Network network, int startNodeID, int noOfNeighbors, NetworkConstraint constraint, GoalNode goalNodeFilter) Returns the shortest paths of the N nearest neighbors from the specified start node. |
static Path[] |
nearestReachingNeighbors(Network network, int startNodeID, int noOfNeighbors) Returns the shortest paths of the N nearest reaching neighbors to the specified start node. |
static Path[] |
nearestReachingNeighbors(Network network, int startNodeID, int noOfNeighbors, GoalNode goalNodeFilter) Returns the shortest paths of the N nearest reaching neighbors to the specified start node. |
static Path[] |
nearestReachingNeighbors(Network network, int startNodeID, int noOfNeighbors, NetworkConstraint constraint, GoalNode goalNodeFilter) Returns the shortest paths of the N nearest reaching neighbors to the specified start node. |
static boolean |
networkExists(java.sql.Connection conn, java.lang.String networkName) Checks if the given network exists in the database. |
static double |
partitionNetwork(java.sql.Connection connection, java.lang.String networkName, int numPartition) Partitions the spatial network with K-Means method. |
static double |
partitionNetwork(Network net, int numPartition) Partitions the given network into the given numPartition partitions. |
static void |
putNetworkToCache(java.lang.String networkName, Network network) Puts a network in the network cahce |
static Network |
readBlobNetwork(java.sql.Connection conn, java.lang.String networkName) Returns the network from a partition table. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName) Returns the read-only network from the database. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, boolean readForUpdate) Returns the network from the database. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, boolean readForUpdate, UserDataIO ioFunction, java.lang.String sqlNodeFilter, java.lang.String sqlLinkFilter, java.lang.String sqlPathFilter) Returns the network with regard to the given filters. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, boolean readForUpdate, UserDataIO ioFunction, java.lang.String sqlNodeFilter, java.lang.String sqlLinkFilter, java.lang.String sqlPathFilter, boolean linksWithinNodeSet) Returns the network with regard to the given filters. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, int linkLevel, boolean readForUpdate) Returns the network with the specified link level. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, int linkLevel, boolean readForUpdate, UserDataIO ioFunction) Returns the network with the specified link level. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, MBR mbr, boolean readForUpdate) Returns the network that is inside the specified MBR. |
static Network |
readNetwork(java.sql.Connection conn, java.lang.String networkName, MBR mbr, boolean readForUpdate, UserDataIO ioFunction) Returns the network that is inside the specified MBR. |
static Network |
readNetworkByLinkPartition(java.sql.Connection conn, java.lang.String networkName, int partitionID, boolean readForUpdate, UserDataIO ioFunction) Returns the network with the specified link partition ID. |
static Network |
readNetworkByNodePartition(java.sql.Connection conn, java.lang.String networkName, int partitionID, boolean readForUpdate, UserDataIO ioFunction) Returns the network with the specified node partition ID. |
static NetworkConstraint |
readNetworkConstraint(java.sql.Connection conn, java.lang.String networkConstraintName) Reads in the given network constraint from the database to memory |
static java.util.HashMap |
readNetworkConstraints(java.sql.Connection conn) Reads in the given network constraints from the database to memory |
static Network |
readNetworkFromXML(java.io.Reader reader) Reads from XML into an instance of the Network class according to the XML schema defined in oracle/spatial/network/xmlschemas/network.xsd |
static java.util.HashMap |
readNetworkMetadata(java.sql.Connection conn) Returns all network metadata from the database. |
static NetworkMetadata |
readNetworkMetadata(java.sql.Connection conn, int networkID) Returns the network metadata from the database by network ID. |
static NetworkMetadata |
readNetworkMetadata(java.sql.Connection conn, java.lang.String networkName) Returns the network metadata from the database by network name. |
static Network |
readNetworkPartition(java.sql.Connection conn, java.lang.String networkName, int partitionID) Reads the network partition from the database. |
static Network |
readNetworkPartition(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionTableName) Reads the network partition from the partition table. |
static Network |
readNetworkPartition(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionTableName, int partitionID) Reads the network partition from the database. |
static void |
registerNetworkConstraint(java.sql.Connection conn, java.lang.String networkConstraintName, java.lang.String className, java.lang.String directoryName, java.lang.String description) Register given network constraint into user_sdo_network_constraints |
static void |
removeNetworkToCache(java.lang.String networkName, Network network) Removes a network from the network cahce |
static Path |
shortestPath(Network network, int startNodeID, int goalNodeID) Returns the shortest path based on the Dijkstra algorithm. |
static Path |
shortestPath(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint) Returns the shortest path based on the Dijkstra algorithm. |
static Path |
shortestPath(Path complexPath, NetworkConstraint constraint) Returns the shortest path based on the Dijkstra algorithm. |
static Path |
shortestPathAStar(Network network, int startNodeID, int goalNodeID) Returns the shortest path based on the A* search algorithm. |
static Path |
shortestPathAStar(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint) Returns the shortest path based on the A* search algorithm. |
static Path |
shortestPathAStar(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint, oracle.spatial.network.AStarCostFunction userCostFunction, double searchMultiplier) Returns the shortest path based on the A* search algorithm. |
static Path |
shortestPathDijkstra(Network network, int startNodeID, int goalNodeID) Returns the shortest path based on the Dijkstra algorithm. |
static Path |
shortestPathDijkstra(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint) Returns the shortest path based on the Dijkstra algorithm. |
static Path |
shortestPathDijkstra(Path complexPath, NetworkConstraint constraint) Returns the shortest path based on the Dijkstra algorithm. |
static Path[] |
shortestPaths(Network network, int startNodeID) Returns all shortest paths from the given start node based on the Dijkstra algorithm. |
static Path[] |
shortestPaths(Network network, int startNodeID, NetworkConstraint constraint) Returns the shortest paths from the specified source node to any other nodes based on the Dijkstra algorithm. |
static java.util.Set[] |
spatialCluster(Network network, int noOfClusters) |
static Path |
tspPath(Network network, int[] nodeIDArray, boolean isClosed, boolean useExactCost, NetworkConstraint constraint) Returns a TSP tour. |
static Path |
tspPath(Network network, int[] nodeIDArray, NetworkConstraint constraint) Returns a TSP tour. |
static Path |
tspPath(Node[] nodeArray, boolean isClosed, boolean useExactCost, NetworkConstraint constraint) Returns a TSP tour. |
static java.lang.String |
validateNetwork(Network network) Validates the reference relationship of the given network return the validation result as a String |
static java.lang.String |
validateNetworkSchema(java.sql.Connection conn, java.lang.String networkName) Validates the network tables and reports any errors if exist. |
static Path[] |
withinCost(Network network, int startNodeID, double cost) Returns the shortest paths of the nodes that are within the specified cost from the given node. |
static Path[] |
withinCost(Network network, int startNodeID, double cost, NetworkConstraint constraint) Returns all paths that are within the specified cost. |
static Path[] |
withinReachingCost(Network network, int startNodeID, double cost) Returns all reaching paths that are within the specified cost. |
static Path[] |
withinReachingCost(Network network, int startNodeID, double cost, NetworkConstraint constraint) Returns all reaching paths that are within the specified cost. |
static void |
writeNetwork(java.sql.Connection conn, Network network) Writes the network to the database. |
static void |
writeNetwork(java.sql.Connection conn, Network network, UserDataIO ioFunction) Writes the network to the database. |
static void |
writeNetworkMetadata(java.sql.Connection conn, NetworkMetadata metadata) Writes the network metadata to the database. |
static void |
writeNetworkPartition(java.sql.Connection conn, Network network, java.lang.String partitionTableName) Writes the network partitions to the partition table. |
static void |
writeNetworkPartition(java.sql.Connection conn, Network network, java.lang.String partitionTableName, boolean writeOriginalNetwork) Writes the network partitions to the partition table. |
static void |
writeNetworkPartition(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionTableName) Writes the network partitions to the partition table. |
static void |
writeNetworkToXML(Network network, java.io.Writer writer) writeNetworkToXML() writes an instance of the Network class to XML according the the XML schema defined in oracle/spatial/network/xmlschemas/network.xsd. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getVersion()
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, boolean readForUpdate) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namereadForUpdate
- the update mode if true or the read-only mode if falsejava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, MBR mbr, boolean readForUpdate) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namembr
- the bounding MBRreadForUpdate
- the update mode if true or the read-only mode if falsejava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, int linkLevel, boolean readForUpdate) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namelinkLevel
- the link levelreadForUpdate
- the update mode if true, read-only mode otherwisejava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, MBR mbr, boolean readForUpdate, UserDataIO ioFunction) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namembr
- the bounding MBRreadForUpdate
- the update mode if true or the read-only mode otherwiseioFunction
- the UserDataIO implementation for reading user datajava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, boolean readForUpdate, UserDataIO ioFunction, java.lang.String sqlNodeFilter, java.lang.String sqlLinkFilter, java.lang.String sqlPathFilter, boolean linksWithinNodeSet) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namereadForUpdate
- the update mode if true or the read-only mode otherwiseioFunction
- the UserDataIO implementation for reading user datasqlNodeFilter
- SQL node filtersqlLinkFilter
- SQL link filtersqlPathFilter
- SQL path filterjava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, boolean readForUpdate, UserDataIO ioFunction, java.lang.String sqlNodeFilter, java.lang.String sqlLinkFilter, java.lang.String sqlPathFilter) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namereadForUpdate
- the update mode if true or the read-only mode otherwiseioFunction
- the UserDataIO implementation for reading user datasqlNodeFilter
- SQL node filtersqlLinkFilter
- SQL link filtersqlPathFilter
- SQL path filterjava.sql.SQLException
NetworkDataException
public static Network readBlobNetwork(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network name Note that the blob network is read onlyjava.sql.SQLException
NetworkDataException
public static Network readNetworkByNodePartition(java.sql.Connection conn, java.lang.String networkName, int partitionID, boolean readForUpdate, UserDataIO ioFunction) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namepartitionID
- the node partition IDreadForUpdate
- the update mode if true or the read-only mode otherwiseioFunction
- the UserDataIO implementation for reading user datajava.sql.SQLException
NetworkDataException
public static Network readNetworkByLinkPartition(java.sql.Connection conn, java.lang.String networkName, int partitionID, boolean readForUpdate, UserDataIO ioFunction) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namepartitionID
- the link partition IDreadForUpdate
- the update mode if true or the read-only mode otherwiseioFunction
- the UserDataIO implementation for reading user datajava.sql.SQLException
NetworkDataException
public static Network readNetwork(java.sql.Connection conn, java.lang.String networkName, int linkLevel, boolean readForUpdate, UserDataIO ioFunction) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namelinkLevel
- the link levelreadForUpdate
- the update mode if true or the read-only mode otherwiseioFunction
- the UserDataIO implementation for reading user datajava.sql.SQLException
NetworkDataException
public static java.util.HashMap readNetworkMetadata(java.sql.Connection conn) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionjava.sql.SQLException
NetworkDataException
public static NetworkMetadata readNetworkMetadata(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
NetworkDataException
public static NetworkMetadata readNetworkMetadata(java.sql.Connection conn, int networkID) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetworkID
- the network namejava.sql.SQLException
NetworkDataException
public static void writeNetworkMetadata(java.sql.Connection conn, NetworkMetadata metadata) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionmetadata
- the network metadatajava.sql.SQLException
NetworkDataException
public static void writeNetwork(java.sql.Connection conn, Network network) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetwork
- the specified networkjava.sql.SQLException
NetworkDataException
public static void writeNetwork(java.sql.Connection conn, Network network, UserDataIO ioFunction) throws java.sql.SQLException, NetworkDataException
conn
- the database connectionnetwork
- the specified networkioFunction
- the UserDataIO implementation for writing user datajava.sql.SQLException
NetworkDataException
public static java.util.HashMap readNetworkConstraints(java.sql.Connection conn) throws java.sql.SQLException, NetworkDataException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
conn
- database connectionjava.sql.SQLException
NetworkDataException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static NetworkConstraint readNetworkConstraint(java.sql.Connection conn, java.lang.String networkConstraintName) throws java.sql.SQLException, NetworkDataException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
conn
- database connectionnetworkConstraintName
- the name of the network constraintjava.sql.SQLException
NetworkDataException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static void registerNetworkConstraint(java.sql.Connection conn, java.lang.String networkConstraintName, java.lang.String className, java.lang.String directoryName, java.lang.String description) throws java.sql.SQLException, NetworkDataException
conn
-networkConstraintName
-className
- Should be given without suffix ".class"directoryName
- Must be the name of a valid Oracle directory objectdescription
-java.sql.SQLException
NetworkDataException
public static void deregisterNetworkConstraint(java.sql.Connection conn, java.lang.String networkConstraintName) throws java.sql.SQLException, NetworkDataException
conn
-networkConstraintName
-java.sql.SQLException
NetworkDataException
public static Network mcst(Network network)
network
- the specified networkpublic static Link[] mcstLinkArray(Network network)
network
- the specified networkpublic static boolean isReachable(Network network, int sourceNodeID, int targetNodeID, MBR mbr, int depthLimit) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDtargetNodeID
- the target node IDmbr
- the bounding MBRdepthLimit
- the depth limitNetworkDataException
public static boolean isReachable(Network network, int sourceNodeID, int targetNodeID) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDtargetNodeID
- the target node IDNetworkDataException
public static boolean isReachable(Network network, int sourceNodeID, int targetNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDtargetNodeID
- the target node IDconstraint
- the network constraintNetworkDataException
public static int findConnectedComponents(Network network)
network
- the specified networkpublic static java.util.Vector findConnectedComponentVector(Network network)
network
- the specified networkpublic static Node[] findReachableNodes(Network network, int sourceNodeID) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDNetworkDataException
public static Node[] findReachableNodes(Network network, int sourceNodeID, MBR mbr) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDmbr
- the bounding MBRNetworkDataException
public static Node[] findReachableNodes(Network network, int sourceNodeID, MBR mbr, int depthLimit) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDmbr
- the MBRdepthLimit
- the depth limitNetworkDataException
public static Node[] findReachableNodes(Network network, int sourceNodeID, MBR mbr, int depthLimit, int maxNoOfNodes) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDmbr
- the MBRdepthLimit
- the depth limitmaxNoOfNodes
- max. no of nodes returnedNetworkDataException
public static Node[] findReachableNodes(Network network, int sourceNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the specified networksourceNodeID
- the source node IDconstraint
- the network constraintNetworkDataException
public static Node[] findReachingNodes(Network network, int targetNodeID) throws NetworkDataException
network
- the specified networktargetNodeID
- the target node IDNetworkDataException
public static Node[] findReachingNodes(Network network, int targetNodeID, MBR mbr) throws NetworkDataException
network
- the specified networktargetNodeID
- the target node IDmbr
- the MBRNetworkDataException
public static Node[] findReachingNodes(Network network, int targetNodeID, MBR mbr, int depthLimit) throws NetworkDataException
network
- the specified networktargetNodeID
- the target node IDmbr
- the MBRdepthLimit
- the depth limitNetworkDataException
public static Node[] findReachingNodes(Network network, int targetNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the specified networktargetNodeID
- the target node IDconstraint
- the network constraintNetworkDataException
public static Path shortestPathAStar(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint, oracle.spatial.network.AStarCostFunction userCostFunction, double searchMultiplier) throws NetworkDataException
network
- the specified networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDconstraint
- the network constraint, null if noneuserCostFunction
- a user-defined A* heuristic cost functionsearchMultiplier
- a multiplier that applied to the user cost (default = 1.0)NetworkDataException
public static Path shortestPathAStar(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the specified networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDconstraint
- the network constraint, null if noneNetworkDataException
public static Path shortestPathAStar(Network network, int startNodeID, int goalNodeID) throws NetworkDataException
network
- the specified networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDNetworkDataException
public static Path shortestPath(Network network, int startNodeID, int goalNodeID) throws NetworkDataException
network
- the specified networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDNetworkDataException
public static Path shortestPath(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDconstraint
- the network constraint, null if noneNetworkDataException
public static Path shortestPath(Path complexPath, NetworkConstraint constraint) throws NetworkDataException
complexPath
- the given complex pathconstraint
- the network constraint, null if noneNetworkDataException
public static Path shortestPathDijkstra(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDconstraint
- the network constraint, null if noneNetworkDataException
public static Path shortestPathDijkstra(Network network, int startNodeID, int goalNodeID) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDNetworkDataException
public static Path shortestPathDijkstra(Path complexPath, NetworkConstraint constraint) throws NetworkDataException
complexPath
- the given complex pathconstraint
- the network constraint, null if noneNetworkDataException
public static Path[] shortestPaths(Network network, int startNodeID, NetworkConstraint constraint) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDconstraint
- the network constraint, null if noneNetworkDataException
public static Path[] shortestPaths(Network network, int startNodeID) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDNetworkDataException
public static Path[] allPaths(Network network, int startNodeID, int goalNodeID, int depthLimit, double costLimit, int noOfSolutions) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDdepthLimit
- the depth limitcostLimit
- the cost limitnoOfSolutions
- the number of solutions specifiedNetworkDataException
public static Path[] allPaths(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint, int noOfSolutions) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDconstraint
- the network constraintnoOfSolutions
- the number of solutions specifiedNetworkDataException
public static Path[] allPaths(Network network, int startNodeID, int goalNodeID, NetworkConstraint constraint, int noOfSolutions, oracle.spatial.network.AStarCostFunction costFunction, double searchMultiplier) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDgoalNodeID
- the goal node IDconstraint
- the network constraintnoOfSolutions
- the number of solutions specifiedcostFunction
- the user defined cost functionsearchMultiplier
- the search multiplierNetworkDataException
public static Path[] allPaths(Path complexPath, int depthLimit, double costLimit, int noOfSolutions) throws NetworkDataException
complexPath
- the given complex pathdepthLimit
- the depth limitcostLimit
- the cost limitNetworkDataException
public static Path[] withinCost(Network network, int startNodeID, double cost, NetworkConstraint constraint) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDcost
- the cost limitconstraint
- the network constraint, null if noneNetworkDataException
public static Path[] withinCost(Network network, int startNodeID, double cost) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDcost
- the cost limitNetworkDataException
public static Path[] withinReachingCost(Network network, int startNodeID, double cost) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDcost
- the cost limitNetworkDataException
public static Path[] withinReachingCost(Network network, int startNodeID, double cost, NetworkConstraint constraint) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDcost
- the cost limitconstraint
- the network constraint, null if noneNetworkDataException
public static Path[] nearestNeighbors(Network network, int startNodeID, int noOfNeighbors, NetworkConstraint constraint, GoalNode goalNodeFilter) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDnoOfNeighbors
- the number of neighborsconstraint
- the network constraintgoalNodeFilter
- the goal node filterNetworkDataException
public static Path[] nearestNeighbors(Network network, int startNodeID, int noOfNeighbors, NetworkConstraint constraint) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDnoOfNeighbors
- the number of neighborsconstraint
- the network constraintNetworkDataException
public static Path[] nearestNeighbors(Network network, int startNodeID, int noOfNeighbors) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDnoOfNeighbors
- the number of neighborsNetworkDataException
public static Path[] nearestReachingNeighbors(Network network, int startNodeID, int noOfNeighbors, NetworkConstraint constraint, GoalNode goalNodeFilter) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDnoOfNeighbors
- the number of neighborsconstraint
- the network constraintgoalNodeFilter
- the goal node filterNetworkDataException
public static Path[] nearestReachingNeighbors(Network network, int startNodeID, int noOfNeighbors, GoalNode goalNodeFilter) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDnoOfNeighbors
- the number of neighborsgoalNodeFilter
- the goal node filterNetworkDataException
public static Path[] nearestReachingNeighbors(Network network, int startNodeID, int noOfNeighbors) throws NetworkDataException
network
- the given networkstartNodeID
- the start node IDnoOfNeighbors
- the number of neighborsNetworkDataException
public static java.lang.String validateNetworkSchema(java.sql.Connection conn, java.lang.String networkName)
public static boolean networkExists(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
public static void dropNetwork(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network to be droppedjava.sql.SQLException
public static void writeNetworkPartition(java.sql.Connection conn, Network network, java.lang.String partitionTableName, boolean writeOriginalNetwork) throws NetworkDataException, java.sql.SQLException
NetworkDataException
java.sql.SQLException
public static void writeNetworkPartition(java.sql.Connection conn, Network network, java.lang.String partitionTableName) throws NetworkDataException, java.sql.SQLException
NetworkDataException
java.sql.SQLException
public static void writeNetworkPartition(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionTableName) throws NetworkDataException, java.sql.SQLException
NetworkDataException
java.sql.SQLException
public static Network readNetworkPartition(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionTableName) throws java.sql.SQLException, NetworkDataException
java.sql.SQLException
NetworkDataException
public static void createNetworkHiearchy(Network network, int numHierarchy, int[] ndNumLevel) throws NetworkDataException, java.sql.SQLException
network
- the network whose hierarchy will be built. The assumption is that no hierarchy exists in this network before invoking this function.numHierarchy
- the extra number of hierarchy levels for this network. This number should be greater than one and less than the number o nodes in the given network. Since we assume the original network is at the level 1, after this operation, we will have numHierarchy+1 levels of network hierarchy. specifies the additional numHierarchy levels on top of the original network which is at the level one.ndNumLevel
- the number of nodes specified at each level. Here the node number should decrease with the increase of the level as we assume the original network is at the bottom level, i.e. level 1.NetworkDataException
java.sql.SQLException
public static void createNetworkPartitionTable(java.sql.Connection conn, java.lang.String partitionTableName) throws java.sql.SQLException
java.sql.SQLException
public static Network readNetworkPartition(java.sql.Connection conn, java.lang.String networkName, java.lang.String partitionTableName, int partitionID) throws java.sql.SQLException, NetworkDataException
java.sql.SQLException
NetworkDataException
public static Network readNetworkPartition(java.sql.Connection conn, java.lang.String networkName, int partitionID) throws java.sql.SQLException, NetworkDataException
java.sql.SQLException
NetworkDataException
public static void createRefConstraints(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
public static void enableRefConstraints(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
public static long getMaxFlow(Network network, int sourceNodeID, int sinkNodeID, java.util.Vector linkFlowVec) throws NetworkDataException, java.io.IOException
network
- network to be analyzedsourceNodeID
- source Node IDsinkNodeID
- sink node IDlinkFlowVec
- link flow returned in a VectorNetworkDataException
java.io.IOException
public static void disableRefConstraints(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
public static void dropRefConstraints(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
public static MBR findMBR(Node[] nodeArray, double expandFactor)
public static Path tspPath(Network network, int[] nodeIDArray, NetworkConstraint constraint) throws NetworkDataException
network
- the specified networknodeIDArray
- an array containing IDs of nodes to be visitedconstraint
- the network constraintNetworkDataException
public static Path tspPath(Network network, int[] nodeIDArray, boolean isClosed, boolean useExactCost, NetworkConstraint constraint) throws NetworkDataException
network
- the specified networknodeIDArray
- an array containing IDs of nodes to be visitedisClosed
- is the tour is closed?useExactCost
- if true, use the real cost, use the Cartesian distance otherwiseconstraint
- the network constraintNetworkDataException
public static Path tspPath(Node[] nodeArray, boolean isClosed, boolean useExactCost, NetworkConstraint constraint) throws NetworkDataException
nodeArray
- an array containing nodes to be visitedisClosed
- is the tour closed?useExactCost
- if true, use the real cost, use the Cartesian distance otherwiseconstraint
- network constraintNetworkDataException
public static double partitionNetwork(Network net, int numPartition) throws NetworkDataException
net
- the network to be partitionednumPartition
- the number of partitionNetworkDataException
public static double partitionNetwork(java.sql.Connection connection, java.lang.String networkName, int numPartition) throws NetworkDataException, java.sql.SQLException
connection
- the connection to the databasenetworkName
- the name of the network to be partitionednumPartition
- the required number of partitionsNetworkDataException
java.sql.SQLException
public static java.util.Set[] spatialCluster(Network network, int noOfClusters)
public static Network readNetworkFromXML(java.io.Reader reader) throws java.io.IOException, oracle.xml.util.XMLException, oracle.xml.parser.v2.XMLParseException, oracle.xml.parser.schema.XSDException, NetworkDataException
reader
- - A character stream that produces an XML document that conforms to the XML Schema in oracle/spatial/network/xmlschemas/network.xsdjava.io.IOException
oracle.xml.util.XMLException
oracle.xml.parser.v2.XMLParseException
oracle.xml.parser.schema.XSDException
NetworkDataException
public static void writeNetworkToXML(Network network, java.io.Writer writer) throws java.io.IOException, NetworkDataException
network
- - instance of Network class to serialize to XMLwriter
- - instance of Writer class to write the XML tojava.io.IOException
NetworkDataException
public static void makeSpatial(Network network, java.lang.String nodeGeomColumn, java.lang.String linkGeomColumn, java.lang.String pathGeomColumn)
network
- network to be convertednodeGeomColumn
- geometry column name for node tablelinkGeomColumn
- geometry column name for link tablepathGeomColumn
- geometry column name for path tablepublic static void makeLogical(Network network)
network
- network to be convertedpublic static void insertGeomMetadata(java.sql.Connection conn, java.lang.String tableName, java.lang.String geomColumnName, int srid, SDODimArray dimArray) throws java.sql.SQLException
conn
- the database connectiontableName
- the geometry table namegeomColumnName
- the geometry column namesrid
- the SRIDdimArray
- the SDODimArrayjava.sql.SQLException
public static java.lang.String getNetworkNameFromID(java.sql.Connection conn, int networkID) throws java.sql.SQLException
conn
- the database connectionnetworkID
- the network IDjava.sql.SQLException
public static int getNetworkIDFromName(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException
conn
- the database connectionnetworkName
- the network namejava.sql.SQLException
public static java.util.HashMap getNetworkNames(java.sql.Connection conn) throws java.sql.SQLException
conn
- the database connectionjava.sql.SQLException
public static java.util.HashMap getNetworkIDs(java.sql.Connection conn) throws java.sql.SQLException
conn
- the database connectionjava.sql.SQLException
public static int[] getPartitionIDArray(java.sql.Connection conn, java.lang.String networkName) throws java.sql.SQLException, NetworkDataException
conn
- database connectionnetworkName
- network name in databasejava.sql.SQLException
NetworkDataException
public static int getNodePartitionID(java.sql.Connection conn, java.lang.String networkName, int nodeID) throws java.sql.SQLException, NetworkDataException
conn
- database connectionnetworkName
- network name in databasenodeID
- given node IDjava.sql.SQLException
NetworkDataException
public static boolean isNetworkPartitioned(java.sql.Connection conn, java.lang.String networkName) throws NetworkDataException, java.sql.SQLException
NetworkDataException
java.sql.SQLException
public static boolean isPartitionedByNode(java.sql.Connection conn, java.lang.String networkName) throws NetworkDataException, java.sql.SQLException
NetworkDataException
java.sql.SQLException
public static java.lang.String validateNetwork(Network network)
public static Network getNetworkFromCache(java.lang.String networkName) throws NetworkDataException
networkName
- network nameNetworkDataException
public static void putNetworkToCache(java.lang.String networkName, Network network)
networkName
- network namenetwork
- network to be cachedpublic static void removeNetworkToCache(java.lang.String networkName, Network network)
networkName
- network namepublic static java.util.HashMap getNetworkCacheMap()
public static void clearNetworkCache()
public static Node[] findNodesWithinDegreeBounds(Network network, int degreeType, int minDegree, int maxDegree)
degreeType
- type of node degree, -1 : in-degree, 1: out-degree and 0: degreeminDegree
- minmum node degreemaxDegree
- maximum node degreepublic static int findMaxNodeDegree(Network network, int degreeType)
degreeType
- type of node degree, -1 : in-degree, 1: out-degree and 0: degreepublic static int findMinNodeDegree(Network network, int degreeType)
degreeType
- type of node degree, -1 : in-degree, 1: out-degree and 0: degree
|
Oracle® Spatial Java API Reference 10g Release 2 (10.2) B14373-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |