Package oracle.spatial.network.lod
Class LogicalNetNodeImpl
- java.lang.Object
-
- oracle.spatial.network.lod.LogicalNetNodeImpl
-
- All Implemented Interfaces:
LogicalNetNode,LogicalNode
public class LogicalNetNodeImpl extends java.lang.Object implements LogicalNetNode
Default implementation of LogicalNetNode.- Since:
- 11gR1
-
-
Constructor Summary
Constructors Constructor Description LogicalNetNodeImpl(long id, int partitionId, int linkLevel, double cost, boolean isActive, int maxLinkLevel, int numInLinks, int numOutLinks, CategorizedUserData userData)Constructs a LogicalNetNode object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddInLink(LogicalNetLink link)Adds an incoming link to this node.voidaddOutLink(LogicalNetLink link)Adds an outgoing link to this node.java.lang.Objectclone()Support cloneablelong[]getAdjacentNodeIds(boolean activeOnly)Returns the IDs of all the nodes with a direct link to or from this node.CategorizedUserDatagetCategorizedUserData()Returns categorized user data.CategorizedUserDatagetCategorizedUserData()doublegetCost()Returns the cost of this node.longgetId()Returns the node IDLogicalNetLink[]getIncidentLinks(boolean activeOnly)Returns the IDs of all the links incident to this node.LogicalNetLink[]getInLinks(boolean activeOnly)Returns the array of incoming links to this node.intgetLinkLevel()Returns the link level of the containing partition.intgetMaxLinkLevel()Returns the maximum link level of the links incident to this node.long[]getNextNodeIds(boolean activeOnly)Returns the IDs of all the nodes with a direct link from this node.intgetNumberOfInLinks()Returns the number of incoming links.intgetNumberOfOutLinks()Returns the number of outgoing links.LogicalNetLink[]getOutLinks(boolean activeOnly)Returns the array of outgoing links from this node.intgetPartitionId()Returns the partition ID.long[]getPreviousNodeIds(boolean activeOnly)Returns the IDs of all the nodes with a direct link to this node.UserDatagetUserData(int category)Returns user data for the specified category.UserDatagetUserData(int category)booleanisActive()Checks whether the node is active.booleanisDummyExternalNode()Returns true if the net node object is an external node andbooleanisPartiallyLoaded()Use max link level as an indicator for whether a node is external.voidremoveInLink(long linkId)Removes the incoming link with the specified link ID.voidremoveOutLink(long linkId)Removes the outgoing link with the specified link ID.voidsetCategorizedUserData(CategorizedUserData userData)Sets categorized user data.voidsetCategorizedUserData(CategorizedUserData cud)voidsetCost(double cost)Sets the cost of this node.voidsetIsActive(boolean isActive)Sets whether this node is active.voidsetMaxLinkLevel(int maxLinkLevel)Sets the maximum link level of the links incident to this node.voidsetPartitionId(int partitionId)Sets the partition ID.voidsetUserData(int category, UserData userData)Sets user data for the specified category.voidsetUserData(int category, UserData userData)LogicalNodetoStandAloneNode()Returns a new instance of a standalone node, which has the same properties as this node.voidupdate(LogicalNode node)Copies the attributes of the input node to this node.-
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.LogicalNode
getCost, getId, getMaxLinkLevel, isActive, setCost, setIsActive, setMaxLinkLevel, update
-
-
-
-
Constructor Detail
-
LogicalNetNodeImpl
public LogicalNetNodeImpl(long id, int partitionId, int linkLevel, double cost, boolean isActive, int maxLinkLevel, int numInLinks, int numOutLinks, CategorizedUserData userData)Constructs a LogicalNetNode object.- Parameters:
id- ID of the nodepartitionId- the partition which the node belongs tolinkLevel- link level of the partitioncost- cost of the nodeisActive- whether the node is activemaxLinkLevel- maximum link levelnumInLinks-numOutLinks-userData-
-
-
Method Detail
-
getLinkLevel
public int getLinkLevel()
Description copied from interface:LogicalNetNodeReturns the link level of the containing partition.- Specified by:
getLinkLevelin interfaceLogicalNetNode- Returns:
-
getPartitionId
public int getPartitionId()
Description copied from interface:LogicalNetNodeReturns the partition ID.- Specified by:
getPartitionIdin interfaceLogicalNetNode- Returns:
-
setPartitionId
public void setPartitionId(int partitionId)
Description copied from interface:LogicalNetNodeSets the partition ID.- Specified by:
setPartitionIdin interfaceLogicalNetNode
-
getInLinks
public LogicalNetLink[] getInLinks(boolean activeOnly)
Description copied from interface:LogicalNetNodeReturns the array of incoming links to this node.- Specified by:
getInLinksin interfaceLogicalNetNode- Returns:
- array of links
-
getOutLinks
public LogicalNetLink[] getOutLinks(boolean activeOnly)
Description copied from interface:LogicalNetNodeReturns the array of outgoing links from this node.- Specified by:
getOutLinksin interfaceLogicalNetNode- Returns:
- array of links
-
getIncidentLinks
public LogicalNetLink[] getIncidentLinks(boolean activeOnly)
Description copied from interface:LogicalNetNodeReturns the IDs of all the links incident to this node.- Specified by:
getIncidentLinksin interfaceLogicalNetNode- Returns:
- array of incident link IDs
-
getNumberOfInLinks
public int getNumberOfInLinks()
Description copied from interface:LogicalNetNodeReturns the number of incoming links.- Specified by:
getNumberOfInLinksin interfaceLogicalNetNode- Returns:
- number of incoming links
-
getNumberOfOutLinks
public int getNumberOfOutLinks()
Description copied from interface:LogicalNetNodeReturns the number of outgoing links.- Specified by:
getNumberOfOutLinksin interfaceLogicalNetNode- Returns:
- number of outgoing links
-
addInLink
public void addInLink(LogicalNetLink link)
Description copied from interface:LogicalNetNodeAdds an incoming link to this node.- Specified by:
addInLinkin interfaceLogicalNetNode- Parameters:
link- incoming link
-
addOutLink
public void addOutLink(LogicalNetLink link)
Description copied from interface:LogicalNetNodeAdds an outgoing link to this node.- Specified by:
addOutLinkin interfaceLogicalNetNode- Parameters:
link- outgoing link
-
getPreviousNodeIds
public long[] getPreviousNodeIds(boolean activeOnly)
Description copied from interface:LogicalNetNodeReturns the IDs of all the nodes with a direct link to this node.- Specified by:
getPreviousNodeIdsin interfaceLogicalNetNode- Returns:
- array of previous node IDs
-
getNextNodeIds
public long[] getNextNodeIds(boolean activeOnly)
Description copied from interface:LogicalNetNodeReturns the IDs of all the nodes with a direct link from this node.- Specified by:
getNextNodeIdsin interfaceLogicalNetNode- Returns:
- array of next node IDs
-
getAdjacentNodeIds
public long[] getAdjacentNodeIds(boolean activeOnly)
Description copied from interface:LogicalNetNodeReturns the IDs of all the nodes with a direct link to or from this node.- Specified by:
getAdjacentNodeIdsin interfaceLogicalNetNode- Returns:
- array of adjacent node IDs
-
removeInLink
public void removeInLink(long linkId)
Description copied from interface:LogicalNetNodeRemoves the incoming link with the specified link ID.- Specified by:
removeInLinkin interfaceLogicalNetNode- Parameters:
linkId- link ID
-
removeOutLink
public void removeOutLink(long linkId)
Description copied from interface:LogicalNetNodeRemoves the outgoing link with the specified link ID.- Specified by:
removeOutLinkin interfaceLogicalNetNode- Parameters:
linkId- link ID
-
isPartiallyLoaded
public boolean isPartiallyLoaded()
Use max link level as an indicator for whether a node is external. If the max link level is less than the minimum allowed number 1, then the node must be an external node that is partially loaded.- Specified by:
isPartiallyLoadedin interfaceLogicalNetNode- Returns:
-
toStandAloneNode
public LogicalNode toStandAloneNode()
Description copied from interface:LogicalNetNodeReturns a new instance of a standalone node, which has the same properties as this node.- Specified by:
toStandAloneNodein interfaceLogicalNetNode- Returns:
- a standalone node
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionSupport cloneable- Specified by:
clonein interfaceLogicalNetNode- Returns:
- cloned object
- Throws:
java.lang.CloneNotSupportedException
-
isDummyExternalNode
public boolean isDummyExternalNode()
Description copied from interface:LogicalNetNodeReturns true if the net node object is an external node and- Specified by:
isDummyExternalNodein interfaceLogicalNetNode- Returns:
-
getCategorizedUserData
public abstract CategorizedUserData getCategorizedUserData()
Returns categorized user data.- Returns:
-
setCategorizedUserData
public abstract void setCategorizedUserData(CategorizedUserData userData)
Sets categorized user data.- Parameters:
userData-
-
getUserData
public abstract UserData getUserData(int category)
Returns user data for the specified category.- Returns:
-
setUserData
public abstract void setUserData(int category, UserData userData)Sets user data for the specified category.- Parameters:
userData-
-
getId
public long getId()
Description copied from interface:LogicalNodeReturns the node ID- Specified by:
getIdin interfaceLogicalNode- Returns:
- node ID
-
getCost
public double getCost()
Description copied from interface:LogicalNodeReturns the cost of this node.- Specified by:
getCostin interfaceLogicalNode- Returns:
- node cost
-
setCost
public void setCost(double cost)
Description copied from interface:LogicalNodeSets the cost of this node.- Specified by:
setCostin interfaceLogicalNode- Parameters:
cost- node cost
-
getMaxLinkLevel
public int getMaxLinkLevel()
Description copied from interface:LogicalNodeReturns the maximum link level of the links incident to this node.- Specified by:
getMaxLinkLevelin interfaceLogicalNode- Returns:
- the maximum link level of the links incident to this node
-
setMaxLinkLevel
public void setMaxLinkLevel(int maxLinkLevel)
Description copied from interface:LogicalNodeSets the maximum link level of the links incident to this node.- Specified by:
setMaxLinkLevelin interfaceLogicalNode- Parameters:
maxLinkLevel- maximum link level of the links incident to this node
-
isActive
public boolean isActive()
Description copied from interface:LogicalNodeChecks whether the node is active.- Specified by:
isActivein interfaceLogicalNode- Returns:
- true if the node is active
-
setIsActive
public void setIsActive(boolean isActive)
Description copied from interface:LogicalNodeSets whether this node is active.- Specified by:
setIsActivein interfaceLogicalNode- Parameters:
isActive- true if the node is active; false otherwise.
-
update
public void update(LogicalNode node)
Description copied from interface:LogicalNodeCopies the attributes of the input node to this node.- Specified by:
updatein interfaceLogicalNode- Parameters:
node- node containing the attributes to copy from
-
getCategorizedUserData
public CategorizedUserData getCategorizedUserData()
-
setCategorizedUserData
public void setCategorizedUserData(CategorizedUserData cud)
-
getUserData
public UserData getUserData(int category)
-
setUserData
public void setUserData(int category, UserData userData)
-
-