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, wait
addNode, getBoundaryLinkIds, getExternalNodeIds, getIncomingLinkIds, getInternalBoundaryNodeIds, getInternalLinkIds, getInternalNodeIds, getInternalNonBoundaryNodeIds, getNumberOfBoundaryLinks, getNumberOfExternalNodes, getNumberOfIncomingLinks, getNumberOfInternalLinks, getNumberOfInternalNodes, getNumberOfOutgoingLinks, getOutgoingLinkIds, isIncomingLink, isInternalLink, isInternalNode, isOutgoingLink
addFeatureLayer, 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()
LogicalPartition
getPartitionId
in interface LogicalPartition
public void addNode(LogicalNetNode node, int partitionId)
LogicalPartition
addNode
in interface LogicalPartition
node
- logical nodepartitionId
- ID of the partition that the node belongs topublic int getNodePartitionId(long nodeId) throws NodeNotFoundException
LogicalPartition
getNodePartitionId
in interface LogicalPartition
nodeId
- node IDNodeNotFoundException
public void setNodePartitionId(long nodeId, int partitionId)
LogicalPartition
setNodePartitionId
in interface LogicalPartition
nodeId
- node IDpartitionId
- partition IDpublic int[] getLinkPartitionIds(long linkId) throws LinkNotFoundException
LogicalPartition
getLinkPartitionIds
in interface LogicalPartition
linkId
- link IDLinkNotFoundException
public void removeNode(long nodeId)
LogicalBasicNetwork
removeNode
in interface LogicalBasicNetwork
nodeId
- ID of the node to be removedpublic void update(PartitionUpdate pu) throws LODNetworkException
LogicalPartition
update
in interface LogicalPartition
pu
- partition update informationLODNetworkException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
LogicalBasicNetwork
clone
in interface LogicalBasicNetwork
java.lang.CloneNotSupportedException
public int getNumberOfInternalNodes()
LogicalSubNetwork
getNumberOfInternalNodes
in interface LogicalSubNetwork
public int getNumberOfExternalNodes()
LogicalSubNetwork
getNumberOfExternalNodes
in interface LogicalSubNetwork
public long[] getInternalNodeIds()
LogicalSubNetwork
getInternalNodeIds
in interface LogicalSubNetwork
public long[] getInternalBoundaryNodeIds()
LogicalSubNetwork
getInternalBoundaryNodeIds
in interface LogicalSubNetwork
public long[] getInternalNonBoundaryNodeIds()
LogicalSubNetwork
getInternalNonBoundaryNodeIds
in interface LogicalSubNetwork
public long[] getExternalNodeIds()
LogicalSubNetwork
getExternalNodeIds
in interface LogicalSubNetwork
public boolean isInternalNode(long nodeId)
LogicalSubNetwork
isInternalNode
in interface LogicalSubNetwork
nodeId
- node idpublic boolean isInternalLink(long linkId)
LogicalSubNetwork
isInternalLink
in interface LogicalSubNetwork
linkId
- link IDpublic boolean isIncomingLink(long linkId)
LogicalSubNetwork
isIncomingLink
in interface LogicalSubNetwork
linkId
- link IDpublic boolean isOutgoingLink(long linkId)
LogicalSubNetwork
isOutgoingLink
in interface LogicalSubNetwork
linkId
- link IDpublic long[] getInternalLinkIds()
LogicalSubNetwork
getInternalLinkIds
in interface LogicalSubNetwork
public long[] getBoundaryLinkIds()
LogicalSubNetwork
getBoundaryLinkIds
in interface LogicalSubNetwork
public long[] getIncomingLinkIds()
LogicalSubNetwork
getIncomingLinkIds
in interface LogicalSubNetwork
public long[] getOutgoingLinkIds()
LogicalSubNetwork
getOutgoingLinkIds
in interface LogicalSubNetwork
public int getNumberOfInternalLinks()
LogicalSubNetwork
getNumberOfInternalLinks
in interface LogicalSubNetwork
public int getNumberOfBoundaryLinks()
LogicalSubNetwork
getNumberOfBoundaryLinks
in interface LogicalSubNetwork
public int getNumberOfIncomingLinks()
LogicalSubNetwork
getNumberOfIncomingLinks
in interface LogicalSubNetwork
public int getNumberOfOutgoingLinks()
LogicalSubNetwork
getNumberOfOutgoingLinks
in interface LogicalSubNetwork
public void addNode(LogicalNetNode node, boolean isInternal)
LogicalSubNetwork
addNode
in interface LogicalSubNetwork
node
- logical nodeisInternal
- set to true, if the node is an internal node; false, otherwise.public int getLinkLevel()
LogicalBasicNetwork
getLinkLevel
in interface LogicalBasicNetwork
public void addLink(LogicalNetLink link)
LogicalBasicNetwork
addLink
in interface LogicalBasicNetwork
link
- logical linkpublic void addNode(LogicalNetNode node)
LogicalBasicNetwork
addNode
in interface LogicalBasicNetwork
public java.lang.String getName()
LogicalBasicNetwork
getName
in interface LogicalBasicNetwork
public int getNumberOfNodes()
LogicalBasicNetwork
getNumberOfNodes
in interface LogicalBasicNetwork
public int getNumberOfLinks()
LogicalBasicNetwork
getNumberOfLinks
in interface LogicalBasicNetwork
public LogicalNetNode[] getNodes()
LogicalBasicNetwork
getNodes
in interface LogicalBasicNetwork
public LogicalNetLink[] getLinks()
LogicalBasicNetwork
getLinks
in interface LogicalBasicNetwork
public LogicalNetNode getNode(long nodeId)
LogicalBasicNetwork
getNode
in interface LogicalBasicNetwork
nodeId
- node idpublic LogicalNetLink getLink(long linkId)
LogicalBasicNetwork
getLink
in interface LogicalBasicNetwork
linkId
- link idpublic long[] getNodeIds()
LogicalBasicNetwork
getNodeIds
in interface LogicalBasicNetwork
public long[] getLinkIds()
LogicalBasicNetwork
getLinkIds
in interface LogicalBasicNetwork
public boolean isUserDataLoaded()
LogicalBasicNetwork
isUserDataLoaded
in interface LogicalBasicNetwork
public void setIsUserDataLoaded(boolean isUserDataLoaded)
LogicalBasicNetwork
setIsUserDataLoaded
in interface LogicalBasicNetwork
isUserDataLoaded
- true, if the user data are loaded; false, otherwise.public int[] getUserDataCategories()
LogicalBasicNetwork
getUserDataCategories
in interface LogicalBasicNetwork
public void addUserDataCategories(int[] userDataCategories)
public void addUserDataCategory(int userDataCategory)
LogicalBasicNetwork
addUserDataCategory
in interface LogicalBasicNetwork
userDataCategory
- user data categorypublic boolean isUserDataCategoryLoaded(int category)
LogicalBasicNetwork
isUserDataCategoryLoaded
in interface LogicalBasicNetwork
public void removeLink(long linkId)
LogicalBasicNetwork
removeLink
in interface LogicalBasicNetwork
linkId
- ID of the link to be removedpublic FeatureData getFeatureData()
getFeatureData
in interface LogicalBasicNetwork
public void setFeatureData(FeatureData featureData)
setFeatureData
in interface LogicalBasicNetwork
featureData
-public void addFeatureLayer(int featureLayerId, FeatureLayer featureLayer)
LogicalBasicNetwork
addFeatureLayer
in interface LogicalBasicNetwork
public boolean isFeatureLayerLoaded(int featureLayerId)
LogicalBasicNetwork
isFeatureLayerLoaded
in interface LogicalBasicNetwork