Class NFENode
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEBasicModelObject
-
- oracle.spatial.network.nfe.model.network.NFENetworkElement
-
- oracle.spatial.network.nfe.model.network.NFENode
-
- All Implemented Interfaces:
NFEModelObject
- Direct Known Subclasses:
NFEBasicNode
public abstract class NFENode extends NFENetworkElement
Base class for representing a network node.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROP_HIERARCHY_LEVELThe hierarchy level propertystatic java.lang.StringPROP_PARENT_NODE_IDThe parent node id property-
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 NFENode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanaddLink(NFELink link, boolean addStartLink)Connects a link to the node.abstract intgetHierarchyLevel()Gets the node's hierarchy levelabstract java.util.Collection<NFELink>getInLinks()Gets all the in-links connected to the nodejava.lang.StringgetKey()Gets the network element's key.abstract java.util.Collection<NFELink>getLinks()Gets all the links (in and out) connected to the nodeabstract intgetNumberOfInLinks()Gets the number of in-links connected to the nodeabstract intgetNumberOfLinks()Gets the number of links (in and out) connected to the nodeabstract intgetNumberOfOutLinks()Gets the number of out-links connected to the nodeabstract java.util.Collection<NFELink>getOutLinks()Gets all the out-links connected to the nodeabstract longgetParentNodeId()Gets the node's parent node id if anyabstract longgetPartitionId()Gets the node's partition idbooleanisLink()Tells whether the network element is a link or notbooleanisNode()Tells whether the network element is a node or notprotected abstract booleanremoveLink(NFELink link, boolean removeInLink)Removes the link from the nodeabstract voidsetHierarchyLevel(int hierarchyLevel)Sets the node's hierarchy levelabstract voidsetParentNodeId(long parentNodeId)Sets the node's parent node idabstract voidsetPartitionId(long partitionId)Sets the node's partition id-
Methods inherited from class oracle.spatial.network.nfe.model.network.NFENetworkElement
createCopy, 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
-
-
-
-
Field Detail
-
PROP_HIERARCHY_LEVEL
public static final java.lang.String PROP_HIERARCHY_LEVEL
The hierarchy level property- See Also:
- Constant Field Values
-
PROP_PARENT_NODE_ID
public static final java.lang.String PROP_PARENT_NODE_ID
The parent node id property- See Also:
- Constant Field Values
-
-
Method Detail
-
setHierarchyLevel
public abstract void setHierarchyLevel(int hierarchyLevel)
Sets the node's hierarchy level- Parameters:
hierarchyLevel- the node's hierarchy level
-
getHierarchyLevel
public abstract int getHierarchyLevel()
Gets the node's hierarchy level- Returns:
- the nodes hierarchy level
-
setParentNodeId
public abstract void setParentNodeId(long parentNodeId)
Sets the node's parent node id- Parameters:
parentNodeId- the node's parent node id
-
getParentNodeId
public abstract long getParentNodeId()
Gets the node's parent node id if any- Returns:
- the node's parent node id or -1 if it does not have a parent node
-
getLinks
public abstract java.util.Collection<NFELink> getLinks()
Gets all the links (in and out) connected to the node- Returns:
- a collection containing all the links connected to the node as instances of NFELink
-
getInLinks
public abstract java.util.Collection<NFELink> getInLinks()
Gets all the in-links connected to the node- Returns:
- a collection containing all the in-links connected to the node as instances of NFELink
-
getOutLinks
public abstract java.util.Collection<NFELink> getOutLinks()
Gets all the out-links connected to the node- Returns:
- a collection containing all the out-links connected to the node as instances of NFELink
-
getNumberOfLinks
public abstract int getNumberOfLinks()
Gets the number of links (in and out) connected to the node- Returns:
- the total number of connected links
-
getNumberOfInLinks
public abstract int getNumberOfInLinks()
Gets the number of in-links connected to the node- Returns:
- the total number of connected in-links
-
getNumberOfOutLinks
public abstract int getNumberOfOutLinks()
Gets the number of out-links connected to the node- Returns:
- the total number of connected out-links
-
getPartitionId
public abstract long getPartitionId()
Gets the node's partition id- Returns:
- the node's partition id
-
setPartitionId
public abstract void setPartitionId(long partitionId)
Sets the node's partition id- Parameters:
partitionId- the node's partition id
-
addLink
protected abstract boolean addLink(NFELink link, boolean addStartLink)
Connects a link to the node. Whether the link is in or out is specified by the addStartLink parameter- Parameters:
link- an NFELink instance to be connectedaddStartLink- if true, the link is connected as in-link, otherwise, it is connected as out-link- Returns:
-
removeLink
protected abstract boolean removeLink(NFELink link, boolean removeInLink)
Removes the link from the node- 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.
-
isNode
public boolean isNode()
Description copied from class:NFENetworkElementTells whether the network element is a node or not- Specified by:
isNodein classNFENetworkElement- Returns:
- true if the network element is a node
-
isLink
public boolean isLink()
Description copied from class:NFENetworkElementTells whether the network element is a link or not- Specified by:
isLinkin classNFENetworkElement- Returns:
- true if the network element is a link
-
getKey
public java.lang.String getKey()
Description copied from class:NFENetworkElementGets the network element's key. The key is a unique value to differentiate a network element among other network elements in the same network. There could be a node and a link with the same ID but cannot exist two network elements (node or links) with the same key- Specified by:
getKeyin classNFENetworkElement- Returns:
- the network element's key
-
-