Class AbstractFeature
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.geoobject.AbstractFeature
-
- All Implemented Interfaces:
java.lang.Cloneable,GeoObject
- Direct Known Subclasses:
GeometryFeature
public abstract class AbstractFeature extends java.lang.Object implements GeoObject
Defines an abstract class that represents a geospatial feature. A feature is defined by a spatial attribute and a set of non-complex (and non-spatial) attributes. Each spatial type, must extend this abstract class. Examples of features include geometry feature, annotation text feature, and topology feature.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,oracle.mapviewer.share.Field>attributesStores information about the non-complex attributes.protected Layerlayerprotected java.lang.ObjectspatialAttr
-
Constructor Summary
Constructors Constructor Description AbstractFeature()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbstractFeatureclone()A shallow cloneAbstractFeaturedeepClone()A deep clone (except the layer reference)booleanequals(java.lang.Object obj)oracle.mapviewer.share.FieldgetAttribute(java.lang.String attrName)java.util.Set<java.lang.String>getAttributeNames()return the set of attribute names.oracle.mapviewer.share.Field[]getAttributes()oracle.mapviewer.share.Field[]getAttributes(java.lang.String[] names)Returns the field values for attribute names.java.lang.ObjectgetKey()Gets the key of the selected object.LayergetLayer()Gets the associated layer for this object.abstract java.awt.geom.Rectangle2DgetMBR()Returns the minimum bounding rectangle of the spatial attribute.java.lang.ObjectgetSpatialAttribute()Returns the spatial attribute object.abstract java.lang.ObjectgetSpatialAttributeClone()Returns a clone of the spatial attributeabstract intgetSpatialDimension()Returns the feature spatial dimension.abstract java.awt.geom.Point2D[]getSpatialJavaPoints()Returns an array of java points representing the vertexes location of the spatial object.booleanremoveAttribute(java.lang.String attrName)booleansetAttribute(java.lang.String attrName, oracle.mapviewer.share.Field value)voidsetAttributes(oracle.mapviewer.share.Field[] fields)Sets the field attributes.java.lang.ObjectsetKey(java.lang.Object key)Sets a new key on the object.voidsetLayer(Layer layer)Sets the layer to be associated with this object.voidsetSpatialAttribute(java.lang.Object spatialAttr)Sets the spatial attribute object-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.core.GeoObject
getDrawable, hashCode, isSubElementOf, substract
-
-
-
-
Field Detail
-
attributes
protected java.util.HashMap<java.lang.String,oracle.mapviewer.share.Field> attributes
Stores information about the non-complex attributes.
-
layer
protected Layer layer
-
spatialAttr
protected java.lang.Object spatialAttr
-
-
Method Detail
-
clone
public AbstractFeature clone()
A shallow clone- Overrides:
clonein classjava.lang.Object- Returns:
-
deepClone
public AbstractFeature deepClone()
A deep clone (except the layer reference)
-
equals
public boolean equals(java.lang.Object obj)
-
getAttribute
public oracle.mapviewer.share.Field getAttribute(java.lang.String attrName)
- Parameters:
attrName-- Returns:
-
getAttributeNames
public java.util.Set<java.lang.String> getAttributeNames()
return the set of attribute names.
-
setAttribute
public boolean setAttribute(java.lang.String attrName, oracle.mapviewer.share.Field value)- Parameters:
attrName-value-- Returns:
-
removeAttribute
public boolean removeAttribute(java.lang.String attrName)
- Parameters:
attrName-- Returns:
-
getKey
public java.lang.Object getKey()
Description copied from interface:GeoObjectGets the key of the selected object.
-
setKey
public java.lang.Object setKey(java.lang.Object key)
Description copied from interface:GeoObjectSets a new key on the object.
-
getAttributes
public oracle.mapviewer.share.Field[] getAttributes()
- Returns:
-
getAttributes
public oracle.mapviewer.share.Field[] getAttributes(java.lang.String[] names)
Returns the field values for attribute names.- Parameters:
names- attributes- Returns:
-
setAttributes
public void setAttributes(oracle.mapviewer.share.Field[] fields)
Sets the field attributes. The current attribute list is not erased, and new field names are added to the attribute list, while existing names are updated.- Parameters:
fields-
-
getLayer
public Layer getLayer()
Description copied from interface:GeoObjectGets the associated layer for this object.
-
setLayer
public void setLayer(Layer layer)
Description copied from interface:GeoObjectSets the layer to be associated with this object.
-
getSpatialAttribute
public java.lang.Object getSpatialAttribute()
Returns the spatial attribute object.- Returns:
-
setSpatialAttribute
public void setSpatialAttribute(java.lang.Object spatialAttr)
Sets the spatial attribute object- Parameters:
spatialAttr-
-
getSpatialAttributeClone
public abstract java.lang.Object getSpatialAttributeClone()
Returns a clone of the spatial attribute- Returns:
-
getMBR
public abstract java.awt.geom.Rectangle2D getMBR()
Returns the minimum bounding rectangle of the spatial attribute.
-
getSpatialDimension
public abstract int getSpatialDimension()
Returns the feature spatial dimension.- Returns:
-
getSpatialJavaPoints
public abstract java.awt.geom.Point2D[] getSpatialJavaPoints()
Returns an array of java points representing the vertexes location of the spatial object.- Returns:
-
-