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 void
addInLink(LogicalNetLink link)
Adds an incoming link to this node.void
addOutLink(LogicalNetLink link)
Adds an outgoing link to this node.java.lang.Object
clone()
Support cloneablelong[]
getAdjacentNodeIds(boolean activeOnly)
Returns the IDs of all the nodes with a direct link to or from this node.CategorizedUserData
getCategorizedUserData()
Returns categorized user data.CategorizedUserData
getCategorizedUserData()
double
getCost()
Returns the cost of this node.long
getId()
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.int
getLinkLevel()
Returns the link level of the containing partition.int
getMaxLinkLevel()
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.int
getNumberOfInLinks()
Returns the number of incoming links.int
getNumberOfOutLinks()
Returns the number of outgoing links.LogicalNetLink[]
getOutLinks(boolean activeOnly)
Returns the array of outgoing links from this node.int
getPartitionId()
Returns the partition ID.long[]
getPreviousNodeIds(boolean activeOnly)
Returns the IDs of all the nodes with a direct link to this node.UserData
getUserData(int category)
Returns user data for the specified category.UserData
getUserData(int category)
boolean
isActive()
Checks whether the node is active.boolean
isDummyExternalNode()
Returns true if the net node object is an external node andboolean
isPartiallyLoaded()
Use max link level as an indicator for whether a node is external.void
removeInLink(long linkId)
Removes the incoming link with the specified link ID.void
removeOutLink(long linkId)
Removes the outgoing link with the specified link ID.void
setCategorizedUserData(CategorizedUserData userData)
Sets categorized user data.void
setCategorizedUserData(CategorizedUserData cud)
void
setCost(double cost)
Sets the cost of this node.void
setIsActive(boolean isActive)
Sets whether this node is active.void
setMaxLinkLevel(int maxLinkLevel)
Sets the maximum link level of the links incident to this node.void
setPartitionId(int partitionId)
Sets the partition ID.void
setUserData(int category, UserData userData)
Sets user data for the specified category.void
setUserData(int category, UserData userData)
LogicalNode
toStandAloneNode()
Returns a new instance of a standalone node, which has the same properties as this node.void
update(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:LogicalNetNode
Returns the link level of the containing partition.- Specified by:
getLinkLevel
in interfaceLogicalNetNode
- Returns:
-
getPartitionId
public int getPartitionId()
Description copied from interface:LogicalNetNode
Returns the partition ID.- Specified by:
getPartitionId
in interfaceLogicalNetNode
- Returns:
-
setPartitionId
public void setPartitionId(int partitionId)
Description copied from interface:LogicalNetNode
Sets the partition ID.- Specified by:
setPartitionId
in interfaceLogicalNetNode
-
getInLinks
public LogicalNetLink[] getInLinks(boolean activeOnly)
Description copied from interface:LogicalNetNode
Returns the array of incoming links to this node.- Specified by:
getInLinks
in interfaceLogicalNetNode
- Returns:
- array of links
-
getOutLinks
public LogicalNetLink[] getOutLinks(boolean activeOnly)
Description copied from interface:LogicalNetNode
Returns the array of outgoing links from this node.- Specified by:
getOutLinks
in interfaceLogicalNetNode
- Returns:
- array of links
-
getIncidentLinks
public LogicalNetLink[] getIncidentLinks(boolean activeOnly)
Description copied from interface:LogicalNetNode
Returns the IDs of all the links incident to this node.- Specified by:
getIncidentLinks
in interfaceLogicalNetNode
- Returns:
- array of incident link IDs
-
getNumberOfInLinks
public int getNumberOfInLinks()
Description copied from interface:LogicalNetNode
Returns the number of incoming links.- Specified by:
getNumberOfInLinks
in interfaceLogicalNetNode
- Returns:
- number of incoming links
-
getNumberOfOutLinks
public int getNumberOfOutLinks()
Description copied from interface:LogicalNetNode
Returns the number of outgoing links.- Specified by:
getNumberOfOutLinks
in interfaceLogicalNetNode
- Returns:
- number of outgoing links
-
addInLink
public void addInLink(LogicalNetLink link)
Description copied from interface:LogicalNetNode
Adds an incoming link to this node.- Specified by:
addInLink
in interfaceLogicalNetNode
- Parameters:
link
- incoming link
-
addOutLink
public void addOutLink(LogicalNetLink link)
Description copied from interface:LogicalNetNode
Adds an outgoing link to this node.- Specified by:
addOutLink
in interfaceLogicalNetNode
- Parameters:
link
- outgoing link
-
getPreviousNodeIds
public long[] getPreviousNodeIds(boolean activeOnly)
Description copied from interface:LogicalNetNode
Returns the IDs of all the nodes with a direct link to this node.- Specified by:
getPreviousNodeIds
in interfaceLogicalNetNode
- Returns:
- array of previous node IDs
-
getNextNodeIds
public long[] getNextNodeIds(boolean activeOnly)
Description copied from interface:LogicalNetNode
Returns the IDs of all the nodes with a direct link from this node.- Specified by:
getNextNodeIds
in interfaceLogicalNetNode
- Returns:
- array of next node IDs
-
getAdjacentNodeIds
public long[] getAdjacentNodeIds(boolean activeOnly)
Description copied from interface:LogicalNetNode
Returns the IDs of all the nodes with a direct link to or from this node.- Specified by:
getAdjacentNodeIds
in interfaceLogicalNetNode
- Returns:
- array of adjacent node IDs
-
removeInLink
public void removeInLink(long linkId)
Description copied from interface:LogicalNetNode
Removes the incoming link with the specified link ID.- Specified by:
removeInLink
in interfaceLogicalNetNode
- Parameters:
linkId
- link ID
-
removeOutLink
public void removeOutLink(long linkId)
Description copied from interface:LogicalNetNode
Removes the outgoing link with the specified link ID.- Specified by:
removeOutLink
in 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:
isPartiallyLoaded
in interfaceLogicalNetNode
- Returns:
-
toStandAloneNode
public LogicalNode toStandAloneNode()
Description copied from interface:LogicalNetNode
Returns a new instance of a standalone node, which has the same properties as this node.- Specified by:
toStandAloneNode
in interfaceLogicalNetNode
- Returns:
- a standalone node
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Support cloneable- Specified by:
clone
in interfaceLogicalNetNode
- Returns:
- cloned object
- Throws:
java.lang.CloneNotSupportedException
-
isDummyExternalNode
public boolean isDummyExternalNode()
Description copied from interface:LogicalNetNode
Returns true if the net node object is an external node and- Specified by:
isDummyExternalNode
in 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:LogicalNode
Returns the node ID- Specified by:
getId
in interfaceLogicalNode
- Returns:
- node ID
-
getCost
public double getCost()
Description copied from interface:LogicalNode
Returns the cost of this node.- Specified by:
getCost
in interfaceLogicalNode
- Returns:
- node cost
-
setCost
public void setCost(double cost)
Description copied from interface:LogicalNode
Sets the cost of this node.- Specified by:
setCost
in interfaceLogicalNode
- Parameters:
cost
- node cost
-
getMaxLinkLevel
public int getMaxLinkLevel()
Description copied from interface:LogicalNode
Returns the maximum link level of the links incident to this node.- Specified by:
getMaxLinkLevel
in interfaceLogicalNode
- Returns:
- the maximum link level of the links incident to this node
-
setMaxLinkLevel
public void setMaxLinkLevel(int maxLinkLevel)
Description copied from interface:LogicalNode
Sets the maximum link level of the links incident to this node.- Specified by:
setMaxLinkLevel
in interfaceLogicalNode
- Parameters:
maxLinkLevel
- maximum link level of the links incident to this node
-
isActive
public boolean isActive()
Description copied from interface:LogicalNode
Checks whether the node is active.- Specified by:
isActive
in interfaceLogicalNode
- Returns:
- true if the node is active
-
setIsActive
public void setIsActive(boolean isActive)
Description copied from interface:LogicalNode
Sets whether this node is active.- Specified by:
setIsActive
in interfaceLogicalNode
- Parameters:
isActive
- true if the node is active; false otherwise.
-
update
public void update(LogicalNode node)
Description copied from interface:LogicalNode
Copies the attributes of the input node to this node.- Specified by:
update
in 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)
-
-