|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.graphics.displayelements.ScaledFeature
public class ScaledFeature
This class is a wrapper for a Feature and a Feature itself.
It adds a special behavior/property to a feature that is required by deegree DisplayElements. This special behavior
is an additional property named "$SCALE". In opposite to conventional properties this one can change its value during
lifetime of a feature without changing the underlying feature itself.
The class is use to offer users the opportunity to use the scale of a map within expressions embedded in SLD
rules/symbolizers, i.e. this enables a user to define that a symbol shall appear in 10m size independ of a map's
scale.
| Constructor Summary | |
|---|---|
ScaledFeature(Feature feature,
double scale)
|
|
| Method Summary | |
|---|---|
void |
addProperty(FeatureProperty property)
Adds the given property to the feature's properties. |
java.lang.Object |
clone()
|
Feature |
cloneDeep()
|
java.lang.String |
getAttribute(java.lang.String name)
Returns the attribute value of the attribute with the specified name. |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns all attributes of the feature. |
Envelope |
getBoundedBy()
Returns the envelope / bounding box of the feature. |
Geometry |
getDefaultGeometryPropertyValue()
Returns the value of the default geometry property of the feature. |
FeatureProperty |
getDefaultProperty(PropertyPath path)
Returns the property of the feature identified by the given PropertyPath. |
FeatureProperty |
getDefaultProperty(QualifiedName name)
use '$SCALE' to access the scale property value |
java.lang.String |
getDescription()
Returns the description of the feature. |
FeatureType |
getFeatureType()
Returns the feature type of this feature. |
Geometry[] |
getGeometryPropertyValues()
Returns the values of all geometry properties of the feature. |
java.lang.String |
getId()
Returns the id of the feature. |
QualifiedName |
getName()
Returns the qualified name of the feature. |
FeatureProperty |
getOwner()
Returns the owner of the feature. |
FeatureProperty[] |
getProperties()
Returns all properties of the feature in their original order. |
FeatureProperty[] |
getProperties(int index)
The property '$SCALE' has the highest valid index |
FeatureProperty[] |
getProperties(QualifiedName name)
Returns the properties of the feature with the given name in their original order. |
double |
getScale()
returns the features scale |
void |
removeProperty(QualifiedName propertyName)
Removes the properties with the given name. |
void |
replaceProperty(FeatureProperty oldProperty,
FeatureProperty newProperty)
Replaces the given property with a new one. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the value of the attribute with the given name. |
void |
setEnvelopesUpdated()
Signals that the envelopes of the geometry properties have been updated. |
void |
setFeatureType(FeatureType ft)
Sets the feature type of this feature. |
void |
setId(java.lang.String fid)
Sets the id of the feature. |
void |
setProperty(FeatureProperty property,
int index)
Sets the value for the given property. |
void |
setScale(double scale)
sets the features scale. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScaledFeature(Feature feature,
double scale)
feature - feature wrapscale - maps scale (should be -1 if not known)| Method Detail |
|---|
public FeatureProperty getOwner()
Feature
getOwner in interface Featurepublic java.lang.String getDescription()
Feature
getDescription in interface Featurepublic QualifiedName getName()
Feature
getName in interface Featurepublic Geometry getDefaultGeometryPropertyValue()
Feature
getDefaultGeometryPropertyValue in interface FeatureFeature.getDefaultGeometryPropertyValue()
public Envelope getBoundedBy()
throws GeometryException
Feature
getBoundedBy in interface FeatureGeometryExceptionpublic FeatureType getFeatureType()
Feature
getFeatureType in interface Featurethe returned feature type contains all properties of the wrapped feature plus a
property named '$SCALE'public Geometry[] getGeometryPropertyValues()
Feature
getGeometryPropertyValues in interface FeatureFeature.getGeometryPropertyValues()public java.lang.String getId()
Feature
getId in interface FeatureFeature.getId()public FeatureProperty[] getProperties()
Feature
getProperties in interface Featurethe returned array contains all properties of the wrapped feature plus a property
named '$SCALE'public FeatureProperty[] getProperties(int index)
getProperties in interface Featureindex - index of the properties to look up
public FeatureProperty getDefaultProperty(QualifiedName name)
getDefaultProperty in interface Featurename - name of the property to look up
public FeatureProperty[] getProperties(QualifiedName name)
Feature
getProperties in interface Featurename -
public FeatureProperty getDefaultProperty(PropertyPath path)
throws PropertyPathResolvingException
FeaturePropertyPath.
NOTE: Current implementation does not handle multiple properties (on the path) or index
addressing in the path.
getDefaultProperty in interface Featurepath -
PropertyPathResolvingExceptionPropertyPath
public void setProperty(FeatureProperty property,
int index)
Feature
setProperty in interface Featureproperty - property name and the property's new valueindex - position of the property that is to be replacedpublic void setScale(double scale)
scale - public double getScale()
public void addProperty(FeatureProperty property)
Feature
addProperty in interface Featureproperty - public void removeProperty(QualifiedName propertyName)
Feature
removeProperty in interface FeaturepropertyName -
public void replaceProperty(FeatureProperty oldProperty,
FeatureProperty newProperty)
Feature
replaceProperty in interface FeatureoldProperty - newProperty - public void setId(java.lang.String fid)
Feature
setId in interface Featurefid - public java.lang.String getAttribute(java.lang.String name)
getAttribute in interface Featurename - name of the attribute
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
getAttributes in interface Feature
public void setAttribute(java.lang.String name,
java.lang.String value)
setAttribute in interface Featurename - name of the attributevalue - value to setpublic void setFeatureType(FeatureType ft)
setFeatureType in interface Featureft - feature type to setpublic void setEnvelopesUpdated()
Feature
setEnvelopesUpdated in interface Feature
public Feature cloneDeep()
throws java.lang.CloneNotSupportedException
cloneDeep in interface Featurejava.lang.CloneNotSupportedException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Featureclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org