|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.feature.AbstractFeature
public abstract class AbstractFeature
Abstract base class for common Feature implementations.
| Field Summary | |
|---|---|
protected String |
fid
Feature id |
protected FeatureType |
ft
Feature type |
protected StandardGMLFeatureProps |
standardProps
Default GML properties that every GML feature allows for (gml:name, gml:description, ...). |
| Constructor Summary | |
|---|---|
protected |
AbstractFeature(String fid,
FeatureType ft,
ExtraProps extraProps)
Creates a new AbstractFeature instance. |
| Method Summary | |
|---|---|
protected Envelope |
calcEnvelope()
Helper method for calculating the envelope of a feature. |
Envelope |
getEnvelope()
Returns the envelope of the feature. |
ExtraProps |
getExtraProperties()
Returns the extra properties associated with the feature. |
StandardGMLFeatureProps |
getGMLProperties()
Returns the standard GML properties (e.g. |
String |
getId()
Returns the id of the feature. |
QName |
getName()
Returns the name of the feature. |
Property[] |
getProperties(GMLVersion version)
Returns all properties in order, including standard GML properties. |
Property[] |
getProperties(QName propName,
GMLVersion version)
Returns the properties with the given name, in order. |
Property |
getProperty(QName propName,
GMLVersion version)
Returns the property with the given name. |
FeatureType |
getType()
Returns the type information for this feature. |
void |
setExtraProperties(ExtraProps extraProps)
|
void |
setId(String fid)
Sets the id of the feature. |
void |
setProperties(List<Property> props,
GMLVersion version)
Called during construction to initialize the properties of the feature. |
void |
setPropertyValue(QName propName,
int occurence,
TypedObjectNode value,
GMLVersion version)
Sets the value of a specific occurrence of a property with a given name (or removes the property from the feature). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.deegree.feature.Feature |
|---|
getGeometryProperties, getProperties, getProperties, getProperty, setProperties, setPropertyValue |
| Field Detail |
|---|
protected String fid
protected final FeatureType ft
protected StandardGMLFeatureProps standardProps
| Constructor Detail |
|---|
protected AbstractFeature(String fid,
FeatureType ft,
ExtraProps extraProps)
AbstractFeature instance.
fid - feature id or null if the feature is anonymous (discouraged for most use cases)ft - feature type, must not be nullextraProps - extra properties, may be null| Method Detail |
|---|
public String getId()
Feature
In a GML representation of the feature, this corresponds to the gml:id (GML 3 and later) or
fid (GML 2) attribute of the feature element.
getId in interface ObjectgetId in interface Featurenullpublic void setId(String fid)
Feature
In a GML representation of the feature, this corresponds to the gml:id (GML 3 and later) or
fid (GML 2) attribute of the feature element.
setId in interface Featurefid - the id of the feature instance, may be nullpublic QName getName()
FeatureIn a GML representation of the feature, this corresponds to the feature element's name.
getName in interface Featurenullpublic FeatureType getType()
Feature
getType in interface Featurenullpublic StandardGMLFeatureProps getGMLProperties()
GMLObjectgml:name).
getGMLProperties in interface GMLObjectgetGMLProperties in interface Featurepublic Envelope getEnvelope()
Feature
getEnvelope in interface Featurenull if the feature has no envelope information / geometry
propertiesprotected Envelope calcEnvelope()
public Property[] getProperties(GMLVersion version)
Feature
getProperties in interface Featureversion - determines the names and types of the standard GML properties, must not be null
null
public Property[] getProperties(QName propName,
GMLVersion version)
Feature
getProperties in interface FeaturepropName - name of the requested propertiesversion - determines the names and types of the standard GML properties, must not be null
null
public Property getProperty(QName propName,
GMLVersion version)
Feature
getProperty in interface FeaturepropName - name of the requested propertyversion - determines the names and types of the standard GML properties, must not be null
public void setProperties(List<Property> props,
GMLVersion version)
throws IllegalArgumentException
Feature
setProperties in interface Featureversion - determines the names and types of the standard GML properties, must not be null
IllegalArgumentException - if the property names or values are not compatible with the feature type
public void setPropertyValue(QName propName,
int occurence,
TypedObjectNode value,
GMLVersion version)
Feature
setPropertyValue in interface FeaturepropName - property nameoccurence - index of the property, starting with zero. If the property is not a multi-property (i.e. maxOccurs=1),
this is always zero.value - new value of the property or null (removes the property)version - determines the names and types of the standard GML properties, must not be nullpublic ExtraProps getExtraProperties()
Feature
These properties are not defined by the FeatureType, but provide a generic way to attach information to
the Feature (e.g. rendering hints).
getExtraProperties in interface Featurenullpublic void setExtraProperties(ExtraProps extraProps)
setExtraProperties in interface Feature
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||