Class NFENetworkElement
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEBasicModelObject
-
- oracle.spatial.network.nfe.model.network.NFENetworkElement
-
- All Implemented Interfaces:
NFEModelObject
public abstract class NFENetworkElement extends NFEBasicModelObject
This is the base class for nodes and links. It contains methods and properties common to both types of network elements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROP_ACTIVEActive propertystatic java.lang.StringPROP_COSTCost propertystatic java.lang.StringPROP_GEOMETRYGeometry propertystatic java.lang.StringPROP_IDID propertystatic java.lang.StringPROP_NAMEName property-
Fields inherited from interface oracle.spatial.network.nfe.model.NFEModelObject
EFLAG_EXISTING, EFLAG_REMOVED
-
-
Constructor Summary
Constructors Constructor Description NFENetworkElement()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract NFENetworkElementcreateCopy()Returns object copy.doublegetCost()Gets the cost of the network elementJGeometrygetGeometry()gets the network element's geometrylonggetId()Gets the ID of the network elementabstract java.lang.StringgetKey()Gets the network element's key.java.lang.StringgetName()Gets the network element's nameNFENetworkgetNetwork()Gets the network to which the network element belongsbooleanisActive()Tells whether the network element is active or notabstract booleanisLink()Tells whether the network element is a link or notabstract booleanisNode()Tells whether the network element is a node or notprotected voidnotifyPropertyChanged(java.lang.String propertyName, java.lang.Object previousValue)Notifies the container about a change made to a propertyvoidsetActive(boolean active)Sets the network element as active or inactivevoidsetCost(double cost)Sets the cost of the network elementvoidsetGeometry(JGeometry geometry)Sets the network element's geometryvoidsetId(long id)Sets the ID of the network elementvoidsetName(java.lang.String name)Sets the name of the network elementvoidsetNetwork(NFENetwork network)Sets the network to which the network element belongs-
Methods inherited from class oracle.spatial.network.nfe.model.NFEBasicModelObject
addEditionFlag, containsEditionFlag, getEditionFlags, removeEditionFlag, setEditionFlags
-
-
-
-
Field Detail
-
PROP_NAME
public static final java.lang.String PROP_NAME
Name property- See Also:
- Constant Field Values
-
PROP_ID
public static final java.lang.String PROP_ID
ID property- See Also:
- Constant Field Values
-
PROP_ACTIVE
public static final java.lang.String PROP_ACTIVE
Active property- See Also:
- Constant Field Values
-
PROP_GEOMETRY
public static final java.lang.String PROP_GEOMETRY
Geometry property- See Also:
- Constant Field Values
-
PROP_COST
public static final java.lang.String PROP_COST
Cost property- See Also:
- Constant Field Values
-
-
Method Detail
-
setId
public void setId(long id)
Sets the ID of the network element- Parameters:
id- a node or link ID
-
getId
public long getId()
Gets the ID of the network element- Returns:
- a node or link ID
-
setName
public void setName(java.lang.String name)
Sets the name of the network element- Parameters:
name- the network element's name
-
getName
public java.lang.String getName()
Gets the network element's name- Returns:
- the network element's name
-
setActive
public void setActive(boolean active)
Sets the network element as active or inactive- Parameters:
active- a boolean value indicating whether the network element is active or not
-
isActive
public boolean isActive()
Tells whether the network element is active or not- Returns:
- a boolean value indicating whether the network element is active or not
-
setCost
public void setCost(double cost)
Sets the cost of the network element- Parameters:
cost- the network element's cost
-
getCost
public double getCost()
Gets the cost of the network element- Returns:
- the network element's cost
-
setGeometry
public void setGeometry(JGeometry geometry)
Sets the network element's geometry- Parameters:
geometry- a line string geometry for links, a point geometry for nodes
-
getGeometry
public JGeometry getGeometry()
gets the network element's geometry- Returns:
- a line string geometry for links, a point geometry for nodes
-
setNetwork
public void setNetwork(NFENetwork network)
Sets the network to which the network element belongs- Parameters:
network- a network instance
-
getNetwork
public NFENetwork getNetwork()
Gets the network to which the network element belongs- Returns:
- a network instance or null the network element does not belong to any network
-
isNode
public abstract boolean isNode()
Tells whether the network element is a node or not- Returns:
- true if the network element is a node
-
isLink
public abstract boolean isLink()
Tells whether the network element is a link or not- Returns:
- true if the network element is a link
-
getKey
public abstract java.lang.String getKey()
Gets 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- Returns:
- the network element's key
-
createCopy
public abstract NFENetworkElement createCopy()
Returns object copy.- Returns:
- object copy
-
notifyPropertyChanged
protected void notifyPropertyChanged(java.lang.String propertyName, java.lang.Object previousValue)Notifies the container about a change made to a property- Parameters:
propertyName- the changed property namepreviousValue- the property value before changed
-
-