Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


oracle.spatial.network.lod
Class LogicalPartitionImpl

java.lang.Object
  extended by oracle.spatial.network.lod.LogicalPartitionImpl

All Implemented Interfaces:
java.lang.Cloneable, LogicalBasicNetwork, LogicalPartition, LogicalSubNetwork

public class LogicalPartitionImpl
extends java.lang.Object
implements LogicalPartition

Default implementation of LogicalPartition.

Since:
11gR1

Constructor Summary
LogicalPartitionImpl(java.lang.String networkName, int partitionId)
           

 

Method Summary
 void addLink(LogicalNetLink link)
          Add a logical link to the network.
 void addNode(LogicalNetNode node)
          Add a logical node to the network.
 void addNode(LogicalNetNode node, boolean isInternal)
          Adds a logical node to the sub-network.
 void addNode(LogicalNetNode node, int partitionId)
          Adds a node to the network partition.
 void addUserData(java.lang.String tableType, long[] ids, java.util.Map<java.lang.String,java.lang.Object>[] userData)
          Deprecated.  
 void addUserDataCategories(int[] userDataCategories)
           
 void addUserDataCategory(int userDataCategory)
          Adds the user data category that have been loaded to the network.
 java.lang.Object clone()
          Support cloneable
 long[] getBoundaryLinkIds()
          Returns all the boundary link IDs in the sub-network.
 long[] getExternalNodeIds()
          Returns all the external node IDs in the sub-network.
 long[] getIncomingLinkIds()
          Returns all the incoming link IDs in the sub-network.
 long[] getInternalBoundaryNodeIds()
          Returns all the internal node IDs in the sub-network without a link to any external nodes.
 long[] getInternalLinkIds()
          Returns all the internal link IDs in the sub-network.
 long[] getInternalNodeIds()
          Returns all the internal node IDs in the sub-network.
 long[] getInternalNonBoundaryNodeIds()
          Returns all the internal node IDs in the sub-network without a link to any external nodes.
 LogicalNetLink getLink(long linkId)
          Returns the logical link object for the specified link id.
 long[] getLinkIds()
          Returns all the link ids in the network.
 int[] getLinkPartitionIds(long linkId)
          Returns the ID of the partitions that the start and end nodes of the input link belongs to.
 LogicalNetLink[] getLinks()
          Returns all the links in the network.
 java.lang.String getName()
          Returns the internal network name, for example, the network name stored in spatial network metadata table.
 LogicalNetNode getNode(long nodeId)
          Returns the logical node object for the specified node id.
 long[] getNodeIds()
          Returns all the node ids in the network.
 int getNodePartitionId(long nodeId)
          Returns the ID of the partition that the input node belongs to.
 LogicalNetNode[] getNodes()
          Returns all the nodes in the network.
 int getNumberOfBoundaryLinks()
          Returns the number of boundary links in the sub-network, which includes both incoming links and outgoing links.
 int getNumberOfExternalNodes()
          Returns the number of external nodes in the sub-network.
 int getNumberOfIncomingLinks()
          Returns the number of incoming links to the sub-network.
 int getNumberOfInternalLinks()
          Returns the number of internal links in the sub-network.
 int getNumberOfInternalNodes()
          Returns the number of internal nodes in the sub-network.
 int getNumberOfLinks()
          Returns the total number of links in the network.
 int getNumberOfNodes()
          Returns the total number of nodes in the network.
 int getNumberOfOutgoingLinks()
          Returns the number of outgoing links from the sub-network.
 long[] getOutgoingLinkIds()
          Returns all the outgoing link IDs in the sub-network.
 int getPartitionId()
          Returns the partition ID of this partition.
 int[] getUserDataCategories()
          Returns the user data categories loaded in the network.
 boolean isIncomingLink(long linkId)
          Checks whether the input link is an incoming link or not.
 boolean isInternalLink(long linkId)
          Checks whether the input link is an internal link or not.
 boolean isInternalNode(long nodeId)
          Checks whether the input node is an internal node or not.
 boolean isOutgoingLink(long linkId)
          Checks whether the input link is an outgoing link or not.
 boolean isUserDataCategoryLoaded(int category)
          Returns whether the specified user data category is loaded.
 boolean isUserDataLoaded()
          Deprecated.  
 void removeLink(long linkId)
          Removes a link from the network.
 void removeNode(int nodeId)
           
 void removeNode(long nodeId)
          Removes a node from the network.
 void setIsUserDataLoaded(boolean isUserDataLoaded)
          Deprecated.  
 void setNodePartitionId(long nodeId, int partitionId)
          Sets the partition the node belongs to.
 void update(PartitionUpdate pu)
          Updates this network partition with the input partition update information.

 

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

 

Methods inherited from interface oracle.spatial.network.lod.LogicalSubNetwork
addNode, getBoundaryLinkIds, getExternalNodeIds, getIncomingLinkIds, getInternalBoundaryNodeIds, getInternalLinkIds, getInternalNodeIds, getInternalNonBoundaryNodeIds, getNumberOfBoundaryLinks, getNumberOfExternalNodes, getNumberOfIncomingLinks, getNumberOfInternalLinks, getNumberOfInternalNodes, getNumberOfOutgoingLinks, getOutgoingLinkIds, isIncomingLink, isInternalLink, isInternalNode, isOutgoingLink

 

Methods inherited from interface oracle.spatial.network.lod.LogicalBasicNetwork
addLink, addNode, addUserData, addUserDataCategory, getLink, getLinkIds, getLinks, getName, getNode, getNodeIds, getNodes, getNumberOfLinks, getNumberOfNodes, getUserDataCategories, isUserDataCategoryLoaded, isUserDataLoaded, removeLink, setIsUserDataLoaded

 

Constructor Detail

LogicalPartitionImpl

public LogicalPartitionImpl(java.lang.String networkName,
                            int partitionId)

Method Detail

getPartitionId

public int getPartitionId()
Description copied from interface: LogicalPartition
Returns the partition ID of this partition.
Specified by:
getPartitionId in interface LogicalPartition
Returns:
partition ID of this partition

addNode

public void addNode(LogicalNetNode node,
                    int partitionId)
Description copied from interface: LogicalPartition
Adds a node to the network partition. The input partition ID can be the same as the partition ID of this network partition, in which case, the node to be added is an internal node; otherwise, the node is an external node, belong to a neighboring partition.
Specified by:
addNode in interface LogicalPartition
Parameters:
node - logical node
partitionId - ID of the partition that the node belongs to

getNodePartitionId

public int getNodePartitionId(long nodeId)
                       throws NodeNotFoundException
Description copied from interface: LogicalPartition
Returns the ID of the partition that the input node belongs to.
Specified by:
getNodePartitionId in interface LogicalPartition
Parameters:
nodeId - node ID
Returns:
partition ID
Throws:
NodeNotFoundException

setNodePartitionId

public void setNodePartitionId(long nodeId,
                               int partitionId)
Description copied from interface: LogicalPartition
Sets the partition the node belongs to.
Specified by:
setNodePartitionId in interface LogicalPartition
Parameters:
nodeId - node ID
partitionId - partition ID

getLinkPartitionIds

public int[] getLinkPartitionIds(long linkId)
                          throws LinkNotFoundException
Description copied from interface: LogicalPartition
Returns the ID of the partitions that the start and end nodes of the input link belongs to.
Specified by:
getLinkPartitionIds in interface LogicalPartition
Parameters:
linkId - link ID
Returns:
partition IDs
Throws:
LinkNotFoundException

removeNode

public void removeNode(long nodeId)
Description copied from interface: LogicalBasicNetwork
Removes a node from the network.
Specified by:
removeNode in interface LogicalBasicNetwork
Parameters:
nodeId - ID of the node to be removed

update

public void update(PartitionUpdate pu)
            throws LODNetworkException
Description copied from interface: LogicalPartition
Updates this network partition with the input partition update information.
Specified by:
update in interface LogicalPartition
Parameters:
pu - partition update information
Throws:
LODNetworkException

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: LogicalBasicNetwork
Support cloneable
Specified by:
clone in interface LogicalBasicNetwork
Returns:
cloned object
Throws:
java.lang.CloneNotSupportedException

getNumberOfInternalNodes

public int getNumberOfInternalNodes()
Description copied from interface: LogicalSubNetwork
Returns the number of internal nodes in the sub-network.
Specified by:
getNumberOfInternalNodes in interface LogicalSubNetwork
Returns:
number of internal nodes

getNumberOfExternalNodes

public int getNumberOfExternalNodes()
Description copied from interface: LogicalSubNetwork
Returns the number of external nodes in the sub-network.
Specified by:
getNumberOfExternalNodes in interface LogicalSubNetwork
Returns:
number of external nodes

getInternalNodeIds

public long[] getInternalNodeIds()
Description copied from interface: LogicalSubNetwork
Returns all the internal node IDs in the sub-network.
Specified by:
getInternalNodeIds in interface LogicalSubNetwork
Returns:
array of internal node IDs

getInternalBoundaryNodeIds

public long[] getInternalBoundaryNodeIds()
Description copied from interface: LogicalSubNetwork
Returns all the internal node IDs in the sub-network without a link to any external nodes.
Specified by:
getInternalBoundaryNodeIds in interface LogicalSubNetwork
Returns:
array of internal boundary node IDs

getInternalNonBoundaryNodeIds

public long[] getInternalNonBoundaryNodeIds()
Description copied from interface: LogicalSubNetwork
Returns all the internal node IDs in the sub-network without a link to any external nodes.
Specified by:
getInternalNonBoundaryNodeIds in interface LogicalSubNetwork
Returns:
array of internal non-boundary node IDs

getExternalNodeIds

public long[] getExternalNodeIds()
Description copied from interface: LogicalSubNetwork
Returns all the external node IDs in the sub-network.
Specified by:
getExternalNodeIds in interface LogicalSubNetwork
Returns:
array of external node IDs

isInternalNode

public boolean isInternalNode(long nodeId)
Description copied from interface: LogicalSubNetwork
Checks whether the input node is an internal node or not.
Specified by:
isInternalNode in interface LogicalSubNetwork
Parameters:
nodeId - node id
Returns:
true, if the input node is an internal node; false, otherwise.

isInternalLink

public boolean isInternalLink(long linkId)
Description copied from interface: LogicalSubNetwork
Checks whether the input link is an internal link or not.
Specified by:
isInternalLink in interface LogicalSubNetwork
Parameters:
linkId - link ID
Returns:
true, if the input link is an internal link; false, otherwise.

isIncomingLink

public boolean isIncomingLink(long linkId)
Description copied from interface: LogicalSubNetwork
Checks whether the input link is an incoming link or not.
Specified by:
isIncomingLink in interface LogicalSubNetwork
Parameters:
linkId - link ID
Returns:
true, if the input link is an incoming link; false, otherwise.

isOutgoingLink

public boolean isOutgoingLink(long linkId)
Description copied from interface: LogicalSubNetwork
Checks whether the input link is an outgoing link or not.
Specified by:
isOutgoingLink in interface LogicalSubNetwork
Parameters:
linkId - link ID
Returns:
true, if the input link is an outgoing link; false, otherwise.

getInternalLinkIds

public long[] getInternalLinkIds()
Description copied from interface: LogicalSubNetwork
Returns all the internal link IDs in the sub-network.
Specified by:
getInternalLinkIds in interface LogicalSubNetwork
Returns:
array of internal link IDs.

getBoundaryLinkIds

public long[] getBoundaryLinkIds()
Description copied from interface: LogicalSubNetwork
Returns all the boundary link IDs in the sub-network.
Specified by:
getBoundaryLinkIds in interface LogicalSubNetwork
Returns:
array of boundary link IDs.

getIncomingLinkIds

public long[] getIncomingLinkIds()
Description copied from interface: LogicalSubNetwork
Returns all the incoming link IDs in the sub-network.
Specified by:
getIncomingLinkIds in interface LogicalSubNetwork
Returns:
array of incoming link IDs.

getOutgoingLinkIds

public long[] getOutgoingLinkIds()
Description copied from interface: LogicalSubNetwork
Returns all the outgoing link IDs in the sub-network.
Specified by:
getOutgoingLinkIds in interface LogicalSubNetwork
Returns:
array of outgoing link IDs.

getNumberOfInternalLinks

public int getNumberOfInternalLinks()
Description copied from interface: LogicalSubNetwork
Returns the number of internal links in the sub-network.
Specified by:
getNumberOfInternalLinks in interface LogicalSubNetwork
Returns:
number of internal links

getNumberOfBoundaryLinks

public int getNumberOfBoundaryLinks()
Description copied from interface: LogicalSubNetwork
Returns the number of boundary links in the sub-network, which includes both incoming links and outgoing links.
Specified by:
getNumberOfBoundaryLinks in interface LogicalSubNetwork
Returns:
number of boundary links

getNumberOfIncomingLinks

public int getNumberOfIncomingLinks()
Description copied from interface: LogicalSubNetwork
Returns the number of incoming links to the sub-network.
Specified by:
getNumberOfIncomingLinks in interface LogicalSubNetwork
Returns:
number of incoming links

getNumberOfOutgoingLinks

public int getNumberOfOutgoingLinks()
Description copied from interface: LogicalSubNetwork
Returns the number of outgoing links from the sub-network.
Specified by:
getNumberOfOutgoingLinks in interface LogicalSubNetwork
Returns:
number of outgoing links

addNode

public void addNode(LogicalNetNode node,
                    boolean isInternal)
Description copied from interface: LogicalSubNetwork
Adds a logical node to the sub-network.
Specified by:
addNode in interface LogicalSubNetwork
Parameters:
node - logical node
isInternal - set to true, if the node is an internal node; false, otherwise.

removeNode

public void removeNode(int nodeId)

addLink

public void addLink(LogicalNetLink link)
Description copied from interface: LogicalBasicNetwork
Add a logical link to the network.
Specified by:
addLink in interface LogicalBasicNetwork
Parameters:
link - logical link

addNode

public void addNode(LogicalNetNode node)
Description copied from interface: LogicalBasicNetwork
Add a logical node to the network.
Specified by:
addNode in interface LogicalBasicNetwork

getName

public java.lang.String getName()
Description copied from interface: LogicalBasicNetwork
Returns the internal network name, for example, the network name stored in spatial network metadata table. Note that the internal network names for different networks are not garanteed to be unique across multiple database connections.
Specified by:
getName in interface LogicalBasicNetwork
Returns:
network name

getNumberOfNodes

public int getNumberOfNodes()
Description copied from interface: LogicalBasicNetwork
Returns the total number of nodes in the network.
Specified by:
getNumberOfNodes in interface LogicalBasicNetwork
Returns:
number of nodes

getNumberOfLinks

public int getNumberOfLinks()
Description copied from interface: LogicalBasicNetwork
Returns the total number of links in the network.
Specified by:
getNumberOfLinks in interface LogicalBasicNetwork
Returns:
number of links

getNodes

public LogicalNetNode[] getNodes()
Description copied from interface: LogicalBasicNetwork
Returns all the nodes in the network.
Specified by:
getNodes in interface LogicalBasicNetwork
Returns:
array of nodes

getLinks

public LogicalNetLink[] getLinks()
Description copied from interface: LogicalBasicNetwork
Returns all the links in the network.
Specified by:
getLinks in interface LogicalBasicNetwork
Returns:
array of links

getNode

public LogicalNetNode getNode(long nodeId)
Description copied from interface: LogicalBasicNetwork
Returns the logical node object for the specified node id.
Specified by:
getNode in interface LogicalBasicNetwork
Parameters:
nodeId - node id
Returns:
logical node object

getLink

public LogicalNetLink getLink(long linkId)
Description copied from interface: LogicalBasicNetwork
Returns the logical link object for the specified link id.
Specified by:
getLink in interface LogicalBasicNetwork
Parameters:
linkId - link id
Returns:
logical link object

getNodeIds

public long[] getNodeIds()
Description copied from interface: LogicalBasicNetwork
Returns all the node ids in the network.
Specified by:
getNodeIds in interface LogicalBasicNetwork
Returns:
array of node ids

getLinkIds

public long[] getLinkIds()
Description copied from interface: LogicalBasicNetwork
Returns all the link ids in the network.
Specified by:
getLinkIds in interface LogicalBasicNetwork
Returns:
array of link ids

isUserDataLoaded

public boolean isUserDataLoaded()
Deprecated. 
Description copied from interface: LogicalBasicNetwork
Returns whether the user data are loaded to the network.
Specified by:
isUserDataLoaded in interface LogicalBasicNetwork
Returns:
true, if the user data are loaded; false, otherwise.

setIsUserDataLoaded

public void setIsUserDataLoaded(boolean isUserDataLoaded)
Deprecated. 
Description copied from interface: LogicalBasicNetwork
Sets whether the user data is loaded to the network.
Specified by:
setIsUserDataLoaded in interface LogicalBasicNetwork
Parameters:
isUserDataLoaded - true, if the user data are loaded; false, otherwise.

getUserDataCategories

public int[] getUserDataCategories()
Description copied from interface: LogicalBasicNetwork
Returns the user data categories loaded in the network.
Specified by:
getUserDataCategories in interface LogicalBasicNetwork
Returns:

addUserDataCategories

public void addUserDataCategories(int[] userDataCategories)

addUserDataCategory

public void addUserDataCategory(int userDataCategory)
Description copied from interface: LogicalBasicNetwork
Adds the user data category that have been loaded to the network.
Specified by:
addUserDataCategory in interface LogicalBasicNetwork
Parameters:
userDataCategory - user data category

isUserDataCategoryLoaded

public boolean isUserDataCategoryLoaded(int category)
Description copied from interface: LogicalBasicNetwork
Returns whether the specified user data category is loaded.
Specified by:
isUserDataCategoryLoaded in interface LogicalBasicNetwork
Returns:

addUserData

public void addUserData(java.lang.String tableType,
                        long[] ids,
                        java.util.Map<java.lang.String,java.lang.Object>[] userData)
Deprecated. 
Description copied from interface: LogicalBasicNetwork
Adds user data to the network.
Specified by:
addUserData in interface LogicalBasicNetwork
Parameters:
tableType - table type of the user data
ids - IDs of the objects to which the user data are added
userData - arrays of user data maps

removeLink

public void removeLink(long linkId)
Description copied from interface: LogicalBasicNetwork
Removes a link from the network.
Specified by:
removeLink in interface LogicalBasicNetwork
Parameters:
linkId - ID of the link to be removed

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 2 (11.2)
E11829-02


Copyright © 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.