Package oracle.spatial.network.lod
Class LogicalPartitionImpl
- java.lang.Object
-
- 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
Constructors Modifier Constructor Description LogicalPartitionImpl(java.lang.String networkName, int partitionId, int linkLevel)protectedLogicalPartitionImpl(java.lang.String networkName, int partitionId, int linkLevel, int numInternalNodes, int numExternalNodes, int numInternalLinks, int numBoundaryLinks)protectedLogicalPartitionImpl(LogicalPartitionImpl partition)protectedLogicalPartitionImpl(oracle.spatial.network.lod.LogicalSubNetworkImpl network, int partitionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddFeatureLayer(int featureLayerId, FeatureLayer featureLayer)Adds the feature layer.voidaddLink(LogicalNetLink link)Adds a logical link to the network.voidaddNode(LogicalNetNode node)Adds a logical node to the network.voidaddNode(LogicalNetNode node, boolean isInternal)Adds a logical node to the sub-network.voidaddNode(LogicalNetNode node, int partitionId)Adds a node to the network partition.voidaddUserDataCategories(int[] userDataCategories)voidaddUserDataCategory(int userDataCategory)Adds the user data category that have been loaded to the network.java.lang.Objectclone()Supports cloneablelong[]getBoundaryLinkIds()Returns all the boundary link IDs in the sub-network.long[]getExternalNodeIds()Returns all the external node IDs in the sub-network.FeatureDatagetFeatureData()Returns the feature data associated to this 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.protected LongHashSetgetInternalNodes()long[]getInternalNonBoundaryNodeIds()Returns all the internal node IDs in the sub-network without a link to any external nodes.LogicalNetLinkgetLink(long linkId)Returns the logical link object for the specified link id.long[]getLinkIds()Returns all the link ids in the network.intgetLinkLevel()Returns the link level of 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.StringgetName()Returns the internal network name, for example, the network name stored in network metadata table.LogicalNetNodegetNode(long nodeId)Returns the logical node object for the specified node id.long[]getNodeIds()Returns all the node ids in the network.intgetNodePartitionId(long nodeId)Returns the ID of the partition that the input node belongs to.LogicalNetNode[]getNodes()Returns all the nodes in the network.intgetNumberOfBoundaryLinks()Returns the number of boundary links in the sub-network, which includes both incoming links and outgoing links.intgetNumberOfExternalNodes()Returns the number of external nodes in the sub-network.intgetNumberOfIncomingLinks()Returns the number of incoming links to the sub-network.intgetNumberOfInternalLinks()Returns the number of internal links in the sub-network.intgetNumberOfInternalNodes()Returns the number of internal nodes in the sub-network.intgetNumberOfLinks()Returns the total number of links in the network.intgetNumberOfNodes()Returns the total number of nodes in the network.intgetNumberOfOutgoingLinks()Returns the number of outgoing links from the sub-network.long[]getOutgoingLinkIds()Returns all the outgoing link IDs in the sub-network.intgetPartitionId()Returns the partition ID of this partition.int[]getUserDataCategories()Returns the user data categories loaded in the network.booleanisFeatureLayerLoaded(int featureLayerId)Returns whether the specified user data category is loaded.booleanisIncomingLink(long linkId)Checks whether the input link is an incoming link or not.booleanisInternalLink(long linkId)Checks whether the input link is an internal link or not.booleanisInternalNode(long nodeId)Checks whether the input node is an internal node or not.booleanisOutgoingLink(long linkId)Checks whether the input link is an outgoing link or not.booleanisUserDataCategoryLoaded(int category)Returns whether the specified user data category is loaded.booleanisUserDataLoaded()Deprecated.voidremoveLink(long linkId)Removes a link from the network.voidremoveNode(long nodeId)Removes a node from the network.voidsetFeatureData(FeatureData featureData)Sets the feature data associated to this network.voidsetIsUserDataLoaded(boolean isUserDataLoaded)Deprecated.voidsetNodePartitionId(long nodeId, int partitionId)Sets the partition the node belongs to.voidupdate(PartitionUpdate pu)Updates this network partition with the input partition update information.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.spatial.network.lod.LogicalBasicNetwork
addFeatureLayer, addLink, addNode, addUserDataCategory, getFeatureData, getLink, getLinkIds, getLinkLevel, getLinks, getName, getNode, getNodeIds, getNodes, getNumberOfLinks, getNumberOfNodes, getUserDataCategories, isFeatureLayerLoaded, isUserDataCategoryLoaded, isUserDataLoaded, removeLink, setFeatureData, setIsUserDataLoaded
-
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
-
-
-
-
Constructor Detail
-
LogicalPartitionImpl
public LogicalPartitionImpl(java.lang.String networkName, int partitionId, int linkLevel)
-
LogicalPartitionImpl
protected LogicalPartitionImpl(java.lang.String networkName, int partitionId, int linkLevel, int numInternalNodes, int numExternalNodes, int numInternalLinks, int numBoundaryLinks)
-
LogicalPartitionImpl
protected LogicalPartitionImpl(oracle.spatial.network.lod.LogicalSubNetworkImpl network, int partitionId)
-
LogicalPartitionImpl
protected LogicalPartitionImpl(LogicalPartitionImpl partition)
-
-
Method Detail
-
getPartitionId
public int getPartitionId()
Description copied from interface:LogicalPartitionReturns the partition ID of this partition.- Specified by:
getPartitionIdin interfaceLogicalPartition- Returns:
- partition ID of this partition
-
addNode
public void addNode(LogicalNetNode node, int partitionId)
Description copied from interface:LogicalPartitionAdds 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:
addNodein interfaceLogicalPartition- Parameters:
node- logical nodepartitionId- ID of the partition that the node belongs to
-
getNodePartitionId
public int getNodePartitionId(long nodeId) throws NodeNotFoundExceptionDescription copied from interface:LogicalPartitionReturns the ID of the partition that the input node belongs to.- Specified by:
getNodePartitionIdin interfaceLogicalPartition- Parameters:
nodeId- node ID- Returns:
- partition ID
- Throws:
NodeNotFoundException
-
setNodePartitionId
public void setNodePartitionId(long nodeId, int partitionId)Description copied from interface:LogicalPartitionSets the partition the node belongs to.- Specified by:
setNodePartitionIdin interfaceLogicalPartition- Parameters:
nodeId- node IDpartitionId- partition ID
-
getLinkPartitionIds
public int[] getLinkPartitionIds(long linkId) throws LinkNotFoundExceptionDescription copied from interface:LogicalPartitionReturns the ID of the partitions that the start and end nodes of the input link belongs to.- Specified by:
getLinkPartitionIdsin interfaceLogicalPartition- Parameters:
linkId- link ID- Returns:
- partition IDs
- Throws:
LinkNotFoundException
-
removeNode
public void removeNode(long nodeId)
Description copied from interface:LogicalBasicNetworkRemoves a node from the network.- Specified by:
removeNodein interfaceLogicalBasicNetwork- Parameters:
nodeId- ID of the node to be removed
-
update
public void update(PartitionUpdate pu) throws LODNetworkException
Description copied from interface:LogicalPartitionUpdates this network partition with the input partition update information.- Specified by:
updatein interfaceLogicalPartition- Parameters:
pu- partition update information- Throws:
LODNetworkException
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:LogicalBasicNetworkSupports cloneable- Specified by:
clonein interfaceLogicalBasicNetwork- Returns:
- cloned object
- Throws:
java.lang.CloneNotSupportedException
-
getNumberOfInternalNodes
public int getNumberOfInternalNodes()
Description copied from interface:LogicalSubNetworkReturns the number of internal nodes in the sub-network.- Specified by:
getNumberOfInternalNodesin interfaceLogicalSubNetwork- Returns:
- number of internal nodes
-
getNumberOfExternalNodes
public int getNumberOfExternalNodes()
Description copied from interface:LogicalSubNetworkReturns the number of external nodes in the sub-network.- Specified by:
getNumberOfExternalNodesin interfaceLogicalSubNetwork- Returns:
- number of external nodes
-
getInternalNodeIds
public long[] getInternalNodeIds()
Description copied from interface:LogicalSubNetworkReturns all the internal node IDs in the sub-network.- Specified by:
getInternalNodeIdsin interfaceLogicalSubNetwork- Returns:
- array of internal node IDs
-
getInternalBoundaryNodeIds
public long[] getInternalBoundaryNodeIds()
Description copied from interface:LogicalSubNetworkReturns all the internal node IDs in the sub-network without a link to any external nodes.- Specified by:
getInternalBoundaryNodeIdsin interfaceLogicalSubNetwork- Returns:
- array of internal boundary node IDs
-
getInternalNonBoundaryNodeIds
public long[] getInternalNonBoundaryNodeIds()
Description copied from interface:LogicalSubNetworkReturns all the internal node IDs in the sub-network without a link to any external nodes.- Specified by:
getInternalNonBoundaryNodeIdsin interfaceLogicalSubNetwork- Returns:
- array of internal non-boundary node IDs
-
getExternalNodeIds
public long[] getExternalNodeIds()
Description copied from interface:LogicalSubNetworkReturns all the external node IDs in the sub-network.- Specified by:
getExternalNodeIdsin interfaceLogicalSubNetwork- Returns:
- array of external node IDs
-
isInternalNode
public boolean isInternalNode(long nodeId)
Description copied from interface:LogicalSubNetworkChecks whether the input node is an internal node or not.- Specified by:
isInternalNodein interfaceLogicalSubNetwork- 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:LogicalSubNetworkChecks whether the input link is an internal link or not.- Specified by:
isInternalLinkin interfaceLogicalSubNetwork- 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:LogicalSubNetworkChecks whether the input link is an incoming link or not.- Specified by:
isIncomingLinkin interfaceLogicalSubNetwork- 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:LogicalSubNetworkChecks whether the input link is an outgoing link or not.- Specified by:
isOutgoingLinkin interfaceLogicalSubNetwork- Parameters:
linkId- link ID- Returns:
- true, if the input link is an outgoing link; false, otherwise.
-
getInternalLinkIds
public long[] getInternalLinkIds()
Description copied from interface:LogicalSubNetworkReturns all the internal link IDs in the sub-network.- Specified by:
getInternalLinkIdsin interfaceLogicalSubNetwork- Returns:
- array of internal link IDs.
-
getBoundaryLinkIds
public long[] getBoundaryLinkIds()
Description copied from interface:LogicalSubNetworkReturns all the boundary link IDs in the sub-network.- Specified by:
getBoundaryLinkIdsin interfaceLogicalSubNetwork- Returns:
- array of boundary link IDs.
-
getIncomingLinkIds
public long[] getIncomingLinkIds()
Description copied from interface:LogicalSubNetworkReturns all the incoming link IDs in the sub-network.- Specified by:
getIncomingLinkIdsin interfaceLogicalSubNetwork- Returns:
- array of incoming link IDs.
-
getOutgoingLinkIds
public long[] getOutgoingLinkIds()
Description copied from interface:LogicalSubNetworkReturns all the outgoing link IDs in the sub-network.- Specified by:
getOutgoingLinkIdsin interfaceLogicalSubNetwork- Returns:
- array of outgoing link IDs.
-
getNumberOfInternalLinks
public int getNumberOfInternalLinks()
Description copied from interface:LogicalSubNetworkReturns the number of internal links in the sub-network.- Specified by:
getNumberOfInternalLinksin interfaceLogicalSubNetwork- Returns:
- number of internal links
-
getNumberOfBoundaryLinks
public int getNumberOfBoundaryLinks()
Description copied from interface:LogicalSubNetworkReturns the number of boundary links in the sub-network, which includes both incoming links and outgoing links.- Specified by:
getNumberOfBoundaryLinksin interfaceLogicalSubNetwork- Returns:
- number of boundary links
-
getNumberOfIncomingLinks
public int getNumberOfIncomingLinks()
Description copied from interface:LogicalSubNetworkReturns the number of incoming links to the sub-network.- Specified by:
getNumberOfIncomingLinksin interfaceLogicalSubNetwork- Returns:
- number of incoming links
-
getNumberOfOutgoingLinks
public int getNumberOfOutgoingLinks()
Description copied from interface:LogicalSubNetworkReturns the number of outgoing links from the sub-network.- Specified by:
getNumberOfOutgoingLinksin interfaceLogicalSubNetwork- Returns:
- number of outgoing links
-
addNode
public void addNode(LogicalNetNode node, boolean isInternal)
Description copied from interface:LogicalSubNetworkAdds a logical node to the sub-network.- Specified by:
addNodein interfaceLogicalSubNetwork- Parameters:
node- logical nodeisInternal- set to true, if the node is an internal node; false, otherwise.
-
getInternalNodes
protected LongHashSet getInternalNodes()
-
getLinkLevel
public int getLinkLevel()
Description copied from interface:LogicalBasicNetworkReturns the link level of the network.- Specified by:
getLinkLevelin interfaceLogicalBasicNetwork- Returns:
-
addLink
public void addLink(LogicalNetLink link)
Description copied from interface:LogicalBasicNetworkAdds a logical link to the network.- Specified by:
addLinkin interfaceLogicalBasicNetwork- Parameters:
link- logical link
-
addNode
public void addNode(LogicalNetNode node)
Description copied from interface:LogicalBasicNetworkAdds a logical node to the network.- Specified by:
addNodein interfaceLogicalBasicNetwork
-
getName
public java.lang.String getName()
Description copied from interface:LogicalBasicNetworkReturns the internal network name, for example, the network name stored in network metadata table. Note that the internal network names for different networks are not guaranteed to be unique across multiple database connections.- Specified by:
getNamein interfaceLogicalBasicNetwork- Returns:
- network name
-
getNumberOfNodes
public int getNumberOfNodes()
Description copied from interface:LogicalBasicNetworkReturns the total number of nodes in the network.- Specified by:
getNumberOfNodesin interfaceLogicalBasicNetwork- Returns:
- number of nodes
-
getNumberOfLinks
public int getNumberOfLinks()
Description copied from interface:LogicalBasicNetworkReturns the total number of links in the network.- Specified by:
getNumberOfLinksin interfaceLogicalBasicNetwork- Returns:
- number of links
-
getNodes
public LogicalNetNode[] getNodes()
Description copied from interface:LogicalBasicNetworkReturns all the nodes in the network.- Specified by:
getNodesin interfaceLogicalBasicNetwork- Returns:
- array of nodes
-
getLinks
public LogicalNetLink[] getLinks()
Description copied from interface:LogicalBasicNetworkReturns all the links in the network.- Specified by:
getLinksin interfaceLogicalBasicNetwork- Returns:
- array of links
-
getNode
public LogicalNetNode getNode(long nodeId)
Description copied from interface:LogicalBasicNetworkReturns the logical node object for the specified node id.- Specified by:
getNodein interfaceLogicalBasicNetwork- Parameters:
nodeId- node id- Returns:
- logical node object
-
getLink
public LogicalNetLink getLink(long linkId)
Description copied from interface:LogicalBasicNetworkReturns the logical link object for the specified link id.- Specified by:
getLinkin interfaceLogicalBasicNetwork- Parameters:
linkId- link id- Returns:
- logical link object
-
getNodeIds
public long[] getNodeIds()
Description copied from interface:LogicalBasicNetworkReturns all the node ids in the network.- Specified by:
getNodeIdsin interfaceLogicalBasicNetwork- Returns:
- array of node ids
-
getLinkIds
public long[] getLinkIds()
Description copied from interface:LogicalBasicNetworkReturns all the link ids in the network.- Specified by:
getLinkIdsin interfaceLogicalBasicNetwork- Returns:
- array of link ids
-
isUserDataLoaded
public boolean isUserDataLoaded()
Deprecated.Description copied from interface:LogicalBasicNetworkReturns whether the user data are loaded to the network.- Specified by:
isUserDataLoadedin interfaceLogicalBasicNetwork- Returns:
- true, if the user data are loaded; false, otherwise.
-
setIsUserDataLoaded
public void setIsUserDataLoaded(boolean isUserDataLoaded)
Deprecated.Description copied from interface:LogicalBasicNetworkSets whether the user data is loaded to the network.- Specified by:
setIsUserDataLoadedin interfaceLogicalBasicNetwork- Parameters:
isUserDataLoaded- true, if the user data are loaded; false, otherwise.
-
getUserDataCategories
public int[] getUserDataCategories()
Description copied from interface:LogicalBasicNetworkReturns the user data categories loaded in the network.- Specified by:
getUserDataCategoriesin interfaceLogicalBasicNetwork- Returns:
-
addUserDataCategories
public void addUserDataCategories(int[] userDataCategories)
-
addUserDataCategory
public void addUserDataCategory(int userDataCategory)
Description copied from interface:LogicalBasicNetworkAdds the user data category that have been loaded to the network.- Specified by:
addUserDataCategoryin interfaceLogicalBasicNetwork- Parameters:
userDataCategory- user data category
-
isUserDataCategoryLoaded
public boolean isUserDataCategoryLoaded(int category)
Description copied from interface:LogicalBasicNetworkReturns whether the specified user data category is loaded.- Specified by:
isUserDataCategoryLoadedin interfaceLogicalBasicNetwork- Returns:
-
removeLink
public void removeLink(long linkId)
Description copied from interface:LogicalBasicNetworkRemoves a link from the network.- Specified by:
removeLinkin interfaceLogicalBasicNetwork- Parameters:
linkId- ID of the link to be removed
-
getFeatureData
public FeatureData getFeatureData()
Returns the feature data associated to this network.- Specified by:
getFeatureDatain interfaceLogicalBasicNetwork- Returns:
-
setFeatureData
public void setFeatureData(FeatureData featureData)
Sets the feature data associated to this network.- Specified by:
setFeatureDatain interfaceLogicalBasicNetwork- Parameters:
featureData-
-
addFeatureLayer
public void addFeatureLayer(int featureLayerId, FeatureLayer featureLayer)Description copied from interface:LogicalBasicNetworkAdds the feature layer.- Specified by:
addFeatureLayerin interfaceLogicalBasicNetwork
-
isFeatureLayerLoaded
public boolean isFeatureLayerLoaded(int featureLayerId)
Description copied from interface:LogicalBasicNetworkReturns whether the specified user data category is loaded.- Specified by:
isFeatureLayerLoadedin interfaceLogicalBasicNetwork- Returns:
-
-