Class NFEBasicNode
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEBasicModelObject
-
- oracle.spatial.network.nfe.model.network.NFENetworkElement
-
- oracle.spatial.network.nfe.model.network.NFENode
-
- oracle.spatial.network.nfe.model.network.NFEBasicNode
-
- All Implemented Interfaces:
NFEModelObject
public class NFEBasicNode extends NFENode
The default implementation ofNFENode
-
-
Field Summary
-
Fields inherited from class oracle.spatial.network.nfe.model.network.NFENode
PROP_HIERARCHY_LEVEL, PROP_PARENT_NODE_ID
-
Fields inherited from class oracle.spatial.network.nfe.model.network.NFENetworkElement
PROP_ACTIVE, PROP_COST, PROP_GEOMETRY, PROP_ID, PROP_NAME
-
Fields inherited from interface oracle.spatial.network.nfe.model.NFEModelObject
EFLAG_EXISTING, EFLAG_REMOVED
-
-
Constructor Summary
Constructors Constructor Description NFEBasicNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaddLink(NFELink link, boolean addInLink)Connects a link to the node.NFENetworkElementcreateCopy()Returns object copy.intgetHierarchyLevel()Gets the node's hierarchy leveljava.util.Collection<NFELink>getInLinks()Gets all the in-links connected to the nodejava.util.Collection<NFELink>getLinks()Gets all the links (in and out) connected to the nodeintgetNumberOfInLinks()Gets the number of in-links connected to the nodeintgetNumberOfLinks()Gets the number of links (in and out) connected to the nodeintgetNumberOfOutLinks()Gets the number of out-links connected to the nodejava.util.Collection<NFELink>getOutLinks()Gets all the out-links connected to the nodelonggetParentNodeId()Gets the node's parent node id if anylonggetPartitionId()Gets the node's partition idprotected booleanremoveLink(NFELink link, boolean removeInLink)Removes the link from the nodevoidsetHierarchyLevel(int hierarchyLevel)Sets the node's hierarchy levelvoidsetParentNodeId(long parentNodeId)Sets the node's parent node idvoidsetPartitionId(long partitionId)Sets the node's partition id-
Methods inherited from class oracle.spatial.network.nfe.model.network.NFENode
getKey, isLink, isNode
-
Methods inherited from class oracle.spatial.network.nfe.model.network.NFENetworkElement
getCost, getGeometry, getId, getName, getNetwork, isActive, notifyPropertyChanged, setActive, setCost, setGeometry, setId, setName, setNetwork
-
Methods inherited from class oracle.spatial.network.nfe.model.NFEBasicModelObject
addEditionFlag, containsEditionFlag, getEditionFlags, removeEditionFlag, setEditionFlags
-
-
-
-
Method Detail
-
setHierarchyLevel
public void setHierarchyLevel(int hierarchyLevel)
Description copied from class:NFENodeSets the node's hierarchy level- Specified by:
setHierarchyLevelin classNFENode- Parameters:
hierarchyLevel- the node's hierarchy level
-
getHierarchyLevel
public int getHierarchyLevel()
Description copied from class:NFENodeGets the node's hierarchy level- Specified by:
getHierarchyLevelin classNFENode- Returns:
- the nodes hierarchy level
-
setParentNodeId
public void setParentNodeId(long parentNodeId)
Description copied from class:NFENodeSets the node's parent node id- Specified by:
setParentNodeIdin classNFENode- Parameters:
parentNodeId- the node's parent node id
-
getParentNodeId
public long getParentNodeId()
Description copied from class:NFENodeGets the node's parent node id if any- Specified by:
getParentNodeIdin classNFENode- Returns:
- the node's parent node id or -1 if it does not have a parent node
-
getLinks
public java.util.Collection<NFELink> getLinks()
Description copied from class:NFENodeGets all the links (in and out) connected to the node
-
getInLinks
public java.util.Collection<NFELink> getInLinks()
Description copied from class:NFENodeGets all the in-links connected to the node- Specified by:
getInLinksin classNFENode- Returns:
- a collection containing all the in-links connected to the node as instances of NFELink
-
getOutLinks
public java.util.Collection<NFELink> getOutLinks()
Description copied from class:NFENodeGets all the out-links connected to the node- Specified by:
getOutLinksin classNFENode- Returns:
- a collection containing all the out-links connected to the node as instances of NFELink
-
getNumberOfLinks
public int getNumberOfLinks()
Description copied from class:NFENodeGets the number of links (in and out) connected to the node- Specified by:
getNumberOfLinksin classNFENode- Returns:
- the total number of connected links
-
getNumberOfInLinks
public int getNumberOfInLinks()
Description copied from class:NFENodeGets the number of in-links connected to the node- Specified by:
getNumberOfInLinksin classNFENode- Returns:
- the total number of connected in-links
-
getNumberOfOutLinks
public int getNumberOfOutLinks()
Description copied from class:NFENodeGets the number of out-links connected to the node- Specified by:
getNumberOfOutLinksin classNFENode- Returns:
- the total number of connected out-links
-
getPartitionId
public long getPartitionId()
Description copied from class:NFENodeGets the node's partition id- Specified by:
getPartitionIdin classNFENode- Returns:
- the node's partition id
-
setPartitionId
public void setPartitionId(long partitionId)
Description copied from class:NFENodeSets the node's partition id- Specified by:
setPartitionIdin classNFENode- Parameters:
partitionId- the node's partition id
-
addLink
protected boolean addLink(NFELink link, boolean addInLink)
Description copied from class:NFENodeConnects a link to the node. Whether the link is in or out is specified by the addStartLink parameter
-
removeLink
protected boolean removeLink(NFELink link, boolean removeInLink)
Description copied from class:NFENodeRemoves the link from the node- Specified by:
removeLinkin classNFENode- Parameters:
link- an NFELink instance to be disconnectedremoveInLink- if true, the link is disconnected as in-link, otherwise it is disconnected as out-link.- Returns:
- true if the link was removed. It returns false if the link was not previously connected to the node or if the link was not connected as specified by the removeInLink boolean parameter.
-
createCopy
public NFENetworkElement createCopy()
Description copied from class:NFENetworkElementReturns object copy.- Specified by:
createCopyin classNFENetworkElement- Returns:
- object copy
-
-