Class NFEFeature
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEBasicModelObject
-
- oracle.spatial.network.nfe.model.feature.NFEFeature
-
- All Implemented Interfaces:
NFEModelObject
- Direct Known Subclasses:
NFEBasicFeature
public abstract class NFEFeature extends NFEBasicModelObject
This is the base class for representing a single network feature in memory. A feature must belong to a feature layer, otherwise, it is considered a standalone feature. When a feature belongs to a feature layer, any change to a feature property is notified to its parent feature layer. Also, any change notified from a feature's feature element, is notified to the feature layer.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_PARENT_FEATURE_ID
Feature's parent feature ID propertystatic java.lang.String
PROP_PARENT_FEATURE_LAYER_ID
Feature's feature layer ID property-
Fields inherited from interface oracle.spatial.network.nfe.model.NFEModelObject
EFLAG_EXISTING, EFLAG_REMOVED
-
-
Constructor Summary
Constructors Constructor Description NFEFeature()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
addFeatureElement(NFEFeatureElement featureElement)
Adds a feature element to the featureabstract void
addFeatureElements(java.util.List<NFEFeatureElement> featureElements)
Adds all the feature elements in the collection to the featureabstract NFEFeature
createCopy()
Returns object copy.abstract java.lang.Object
getAttribute(java.lang.String attributeName)
Gets the value of the attribute with the given nameabstract NFEFeatureClass
getFeatureClass()
Gets the feature class of the featureabstract java.util.List<NFEFeatureElement>
getFeatureElements()
Gets all the feature elements in the featureabstract NFEFeatureLayer
getFeatureLayer()
Gets the feature's feature layerabstract long
getId()
Gets the feature's IDabstract java.lang.String
getKey()
Returns the feature's key.abstract long
getParentFeatureId()
Gets the feature's parent feature ID (if any)abstract long
getParentFeatureLayerId()
Gets the feature layer ID of the feature's parent featureprotected void
notifyModelObjectAdded(java.lang.Object modelObject)
protected void
notifyModelObjectRemoved(java.lang.Object modelObject)
protected <T> void
notifyModelObjectsAdded(java.util.Collection<T> modelObjects, java.lang.Class<T> modelObjectsClass)
protected <T> void
notifyModelObjectsRemoved(java.util.Collection<T> modelObjects, java.lang.Class<T> modelObjectsClass)
protected void
notifyPropertyChanged(java.lang.Object modelObject, java.lang.String propertyName, java.lang.Object previousValue)
abstract boolean
removeFeatureElement(NFEFeatureElement featureElement)
Removes the given feature element from the featureabstract void
removeFeatureElements(java.util.Collection<NFEFeatureElement> featureElements)
Removes from the feature all the feature elements in the collectionabstract void
setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
Sets the value of the attribute with the given nameabstract void
setFeatureClass(NFEFeatureClass featureClass)
Sets the feature class of the featureabstract void
setFeatureLayer(NFEFeatureLayer featureLayer)
Sets the feature's feature layerabstract void
setId(long id)
Sets the feature's IDabstract void
setParentFeatureId(long parentFeatureId)
Sets the feature's parent feature IDabstract void
setParentFeatureLayerId(long parentFeatureLayerId)
Sets the feature layer ID of the feature's parent feature.-
Methods inherited from class oracle.spatial.network.nfe.model.NFEBasicModelObject
addEditionFlag, containsEditionFlag, getEditionFlags, removeEditionFlag, setEditionFlags
-
-
-
-
Field Detail
-
PROP_PARENT_FEATURE_ID
public static final java.lang.String PROP_PARENT_FEATURE_ID
Feature's parent feature ID property- See Also:
- Constant Field Values
-
PROP_PARENT_FEATURE_LAYER_ID
public static final java.lang.String PROP_PARENT_FEATURE_LAYER_ID
Feature's feature layer ID property- See Also:
- Constant Field Values
-
-
Method Detail
-
setFeatureLayer
public abstract void setFeatureLayer(NFEFeatureLayer featureLayer)
Sets the feature's feature layer- Parameters:
featureLayer
- a feature layer instance
-
getFeatureLayer
public abstract NFEFeatureLayer getFeatureLayer()
Gets the feature's feature layer- Returns:
- a feature layer instance
-
setId
public abstract void setId(long id)
Sets the feature's ID- Parameters:
id
- a feature ID
-
getId
public abstract long getId()
Gets the feature's ID- Returns:
- a feature ID
-
setParentFeatureId
public abstract void setParentFeatureId(long parentFeatureId)
Sets the feature's parent feature ID- Parameters:
parentFeatureId
- a feature ID
-
getParentFeatureId
public abstract long getParentFeatureId()
Gets the feature's parent feature ID (if any)- Returns:
- a feature ID or -1 if the feature does not have a parent feature
-
setParentFeatureLayerId
public abstract void setParentFeatureLayerId(long parentFeatureLayerId)
Sets the feature layer ID of the feature's parent feature. The parent can be from a higher hierarchy feature layer or from a feature layer in another model.- Parameters:
parentFeatureLayerId
- a feature layer ID
-
getParentFeatureLayerId
public abstract long getParentFeatureLayerId()
Gets the feature layer ID of the feature's parent feature- Returns:
- a feature layer ID
-
setFeatureClass
public abstract void setFeatureClass(NFEFeatureClass featureClass)
Sets the feature class of the feature- Parameters:
featureClass
- a feature class instance
-
getFeatureClass
public abstract NFEFeatureClass getFeatureClass()
Gets the feature class of the feature- Returns:
- a feature class instance
-
getKey
public abstract java.lang.String getKey()
Returns the feature's key. The key is a unique identifier among features of any Feature Layer. It has the following format: FeatureLayerId_FeautureId- Returns:
- Returns the Feature's key
-
getAttribute
public abstract java.lang.Object getAttribute(java.lang.String attributeName)
Gets the value of the attribute with the given name- Parameters:
attributeName
- an attribute name- Returns:
- the value of the attribute or null if the attribute does not exist or has not been set
-
setAttribute
public abstract void setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
Sets the value of the attribute with the given name- Parameters:
attributeName
- an attribute nameattributeValue
- the value of the attribute
-
addFeatureElement
public abstract boolean addFeatureElement(NFEFeatureElement featureElement)
Adds a feature element to the feature- Parameters:
featureElement
- a feature element instance- Returns:
- true if the feature could be added to the feature
-
addFeatureElements
public abstract void addFeatureElements(java.util.List<NFEFeatureElement> featureElements)
Adds all the feature elements in the collection to the feature- Parameters:
featureElements
- a collection of feature element instances
-
getFeatureElements
public abstract java.util.List<NFEFeatureElement> getFeatureElements()
Gets all the feature elements in the feature- Returns:
- a list of feature element instances.
-
removeFeatureElement
public abstract boolean removeFeatureElement(NFEFeatureElement featureElement)
Removes the given feature element from the feature- Parameters:
featureElement
- a feature element instance- Returns:
- true if the feature element was removed
-
removeFeatureElements
public abstract void removeFeatureElements(java.util.Collection<NFEFeatureElement> featureElements)
Removes from the feature all the feature elements in the collection- Parameters:
featureElements
- a collection of feature element instances
-
createCopy
public abstract NFEFeature createCopy()
Returns object copy.- Returns:
- object copy
-
notifyPropertyChanged
protected void notifyPropertyChanged(java.lang.Object modelObject, java.lang.String propertyName, java.lang.Object previousValue)
-
notifyModelObjectAdded
protected void notifyModelObjectAdded(java.lang.Object modelObject)
-
notifyModelObjectsAdded
protected <T> void notifyModelObjectsAdded(java.util.Collection<T> modelObjects, java.lang.Class<T> modelObjectsClass)
-
notifyModelObjectRemoved
protected void notifyModelObjectRemoved(java.lang.Object modelObject)
-
notifyModelObjectsRemoved
protected <T> void notifyModelObjectsRemoved(java.util.Collection<T> modelObjects, java.lang.Class<T> modelObjectsClass)
-
-