public class LogicalPartitionImpl extends java.lang.Object implements LogicalPartition
| Constructor and Description |
|---|
LogicalPartitionImpl(java.lang.String networkName, int partitionId, int linkLevel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeatureLayer(int featureLayerId, FeatureLayer featureLayer)
Adds the feature layer.
|
void |
addLink(LogicalNetLink link)
Adds a logical link to the network.
|
void |
addNode(LogicalNetNode node)
Adds 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 |
addUserDataCategories(int[] userDataCategories) |
void |
addUserDataCategory(int userDataCategory)
Adds the user data category that have been loaded to the network.
|
java.lang.Object |
clone()
Supports 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.
|
FeatureData |
getFeatureData()
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.
|
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 |
getLinkLevel()
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.String |
getName()
Returns the internal network name, for example, the network name stored in 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 |
isFeatureLayerLoaded(int featureLayerId)
Returns whether the specified user data category is loaded.
|
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(long nodeId)
Removes a node from the network.
|
void |
setFeatureData(FeatureData featureData)
Sets the feature data associated to this 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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddNode, getBoundaryLinkIds, getExternalNodeIds, getIncomingLinkIds, getInternalBoundaryNodeIds, getInternalLinkIds, getInternalNodeIds, getInternalNonBoundaryNodeIds, getNumberOfBoundaryLinks, getNumberOfExternalNodes, getNumberOfIncomingLinks, getNumberOfInternalLinks, getNumberOfInternalNodes, getNumberOfOutgoingLinks, getOutgoingLinkIds, isIncomingLink, isInternalLink, isInternalNode, isOutgoingLinkaddFeatureLayer, addLink, addNode, addUserDataCategory, getFeatureData, getLink, getLinkIds, getLinkLevel, getLinks, getName, getNode, getNodeIds, getNodes, getNumberOfLinks, getNumberOfNodes, getUserDataCategories, isFeatureLayerLoaded, isUserDataCategoryLoaded, isUserDataLoaded, removeLink, setFeatureData, setIsUserDataLoaded
public LogicalPartitionImpl(java.lang.String networkName,
int partitionId,
int linkLevel)
public int getPartitionId()
LogicalPartitiongetPartitionId in interface LogicalPartitionpublic void addNode(LogicalNetNode node, int partitionId)
LogicalPartitionaddNode in interface LogicalPartitionnode - logical nodepartitionId - ID of the partition that the node belongs to
public int getNodePartitionId(long nodeId)
throws NodeNotFoundException
LogicalPartitiongetNodePartitionId in interface LogicalPartitionnodeId - node IDNodeNotFoundException
public void setNodePartitionId(long nodeId,
int partitionId)
LogicalPartitionsetNodePartitionId in interface LogicalPartitionnodeId - node IDpartitionId - partition ID
public int[] getLinkPartitionIds(long linkId)
throws LinkNotFoundException
LogicalPartitiongetLinkPartitionIds in interface LogicalPartitionlinkId - link IDLinkNotFoundExceptionpublic void removeNode(long nodeId)
LogicalBasicNetworkremoveNode in interface LogicalBasicNetworknodeId - ID of the node to be removedpublic void update(PartitionUpdate pu) throws LODNetworkException
LogicalPartitionupdate in interface LogicalPartitionpu - partition update informationLODNetworkException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
LogicalBasicNetworkclone in interface LogicalBasicNetworkjava.lang.CloneNotSupportedExceptionpublic int getNumberOfInternalNodes()
LogicalSubNetworkgetNumberOfInternalNodes in interface LogicalSubNetworkpublic int getNumberOfExternalNodes()
LogicalSubNetworkgetNumberOfExternalNodes in interface LogicalSubNetworkpublic long[] getInternalNodeIds()
LogicalSubNetworkgetInternalNodeIds in interface LogicalSubNetworkpublic long[] getInternalBoundaryNodeIds()
LogicalSubNetworkgetInternalBoundaryNodeIds in interface LogicalSubNetworkpublic long[] getInternalNonBoundaryNodeIds()
LogicalSubNetworkgetInternalNonBoundaryNodeIds in interface LogicalSubNetworkpublic long[] getExternalNodeIds()
LogicalSubNetworkgetExternalNodeIds in interface LogicalSubNetworkpublic boolean isInternalNode(long nodeId)
LogicalSubNetworkisInternalNode in interface LogicalSubNetworknodeId - node idpublic boolean isInternalLink(long linkId)
LogicalSubNetworkisInternalLink in interface LogicalSubNetworklinkId - link IDpublic boolean isIncomingLink(long linkId)
LogicalSubNetworkisIncomingLink in interface LogicalSubNetworklinkId - link IDpublic boolean isOutgoingLink(long linkId)
LogicalSubNetworkisOutgoingLink in interface LogicalSubNetworklinkId - link IDpublic long[] getInternalLinkIds()
LogicalSubNetworkgetInternalLinkIds in interface LogicalSubNetworkpublic long[] getBoundaryLinkIds()
LogicalSubNetworkgetBoundaryLinkIds in interface LogicalSubNetworkpublic long[] getIncomingLinkIds()
LogicalSubNetworkgetIncomingLinkIds in interface LogicalSubNetworkpublic long[] getOutgoingLinkIds()
LogicalSubNetworkgetOutgoingLinkIds in interface LogicalSubNetworkpublic int getNumberOfInternalLinks()
LogicalSubNetworkgetNumberOfInternalLinks in interface LogicalSubNetworkpublic int getNumberOfBoundaryLinks()
LogicalSubNetworkgetNumberOfBoundaryLinks in interface LogicalSubNetworkpublic int getNumberOfIncomingLinks()
LogicalSubNetworkgetNumberOfIncomingLinks in interface LogicalSubNetworkpublic int getNumberOfOutgoingLinks()
LogicalSubNetworkgetNumberOfOutgoingLinks in interface LogicalSubNetworkpublic void addNode(LogicalNetNode node, boolean isInternal)
LogicalSubNetworkaddNode in interface LogicalSubNetworknode - logical nodeisInternal - set to true, if the node is an internal node; false, otherwise.public int getLinkLevel()
LogicalBasicNetworkgetLinkLevel in interface LogicalBasicNetworkpublic void addLink(LogicalNetLink link)
LogicalBasicNetworkaddLink in interface LogicalBasicNetworklink - logical linkpublic void addNode(LogicalNetNode node)
LogicalBasicNetworkaddNode in interface LogicalBasicNetworkpublic java.lang.String getName()
LogicalBasicNetworkgetName in interface LogicalBasicNetworkpublic int getNumberOfNodes()
LogicalBasicNetworkgetNumberOfNodes in interface LogicalBasicNetworkpublic int getNumberOfLinks()
LogicalBasicNetworkgetNumberOfLinks in interface LogicalBasicNetworkpublic LogicalNetNode[] getNodes()
LogicalBasicNetworkgetNodes in interface LogicalBasicNetworkpublic LogicalNetLink[] getLinks()
LogicalBasicNetworkgetLinks in interface LogicalBasicNetworkpublic LogicalNetNode getNode(long nodeId)
LogicalBasicNetworkgetNode in interface LogicalBasicNetworknodeId - node idpublic LogicalNetLink getLink(long linkId)
LogicalBasicNetworkgetLink in interface LogicalBasicNetworklinkId - link idpublic long[] getNodeIds()
LogicalBasicNetworkgetNodeIds in interface LogicalBasicNetworkpublic long[] getLinkIds()
LogicalBasicNetworkgetLinkIds in interface LogicalBasicNetworkpublic boolean isUserDataLoaded()
LogicalBasicNetworkisUserDataLoaded in interface LogicalBasicNetworkpublic void setIsUserDataLoaded(boolean isUserDataLoaded)
LogicalBasicNetworksetIsUserDataLoaded in interface LogicalBasicNetworkisUserDataLoaded - true, if the user data are loaded; false, otherwise.public int[] getUserDataCategories()
LogicalBasicNetworkgetUserDataCategories in interface LogicalBasicNetworkpublic void addUserDataCategories(int[] userDataCategories)
public void addUserDataCategory(int userDataCategory)
LogicalBasicNetworkaddUserDataCategory in interface LogicalBasicNetworkuserDataCategory - user data categorypublic boolean isUserDataCategoryLoaded(int category)
LogicalBasicNetworkisUserDataCategoryLoaded in interface LogicalBasicNetworkpublic void removeLink(long linkId)
LogicalBasicNetworkremoveLink in interface LogicalBasicNetworklinkId - ID of the link to be removedpublic FeatureData getFeatureData()
getFeatureData in interface LogicalBasicNetworkpublic void setFeatureData(FeatureData featureData)
setFeatureData in interface LogicalBasicNetworkfeatureData -
public void addFeatureLayer(int featureLayerId,
FeatureLayer featureLayer)
LogicalBasicNetworkaddFeatureLayer in interface LogicalBasicNetworkpublic boolean isFeatureLayerLoaded(int featureLayerId)
LogicalBasicNetworkisFeatureLayerLoaded in interface LogicalBasicNetwork