|
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.Object org.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 Feature
public java.lang.String getDescription()
Feature
getDescription
in interface Feature
public QualifiedName getName()
Feature
getName
in interface Feature
public Geometry getDefaultGeometryPropertyValue()
Feature
getDefaultGeometryPropertyValue
in interface Feature
Feature.getDefaultGeometryPropertyValue()
public Envelope getBoundedBy() throws GeometryException
Feature
getBoundedBy
in interface Feature
GeometryException
public FeatureType getFeatureType()
Feature
getFeatureType
in interface Feature
the returned feature type contains all properties of the wrapped feature plus a
property named '$SCALE'
public Geometry[] getGeometryPropertyValues()
Feature
getGeometryPropertyValues
in interface Feature
Feature.getGeometryPropertyValues()
public java.lang.String getId()
Feature
getId
in interface Feature
Feature.getId()
public FeatureProperty[] getProperties()
Feature
getProperties
in interface Feature
the returned array contains all properties of the wrapped feature plus a property
named '$SCALE'
public FeatureProperty[] getProperties(int index)
getProperties
in interface Feature
index
- index of the properties to look up
public FeatureProperty getDefaultProperty(QualifiedName name)
getDefaultProperty
in interface Feature
name
- name of the property to look up
public FeatureProperty[] getProperties(QualifiedName name)
Feature
getProperties
in interface Feature
name
-
public FeatureProperty getDefaultProperty(PropertyPath path) throws PropertyPathResolvingException
Feature
PropertyPath
.
NOTE: Current implementation does not handle multiple properties (on the path) or index
addressing in the path.
getDefaultProperty
in interface Feature
path
-
PropertyPathResolvingException
PropertyPath
public void setProperty(FeatureProperty property, int index)
Feature
setProperty
in interface Feature
property
- 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 Feature
property
- public void removeProperty(QualifiedName propertyName)
Feature
removeProperty
in interface Feature
propertyName
- public void replaceProperty(FeatureProperty oldProperty, FeatureProperty newProperty)
Feature
replaceProperty
in interface Feature
oldProperty
- newProperty
- public void setId(java.lang.String fid)
Feature
setId
in interface Feature
fid
- public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface Feature
name
- 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 Feature
name
- name of the attributevalue
- value to setpublic void setFeatureType(FeatureType ft)
setFeatureType
in interface Feature
ft
- feature type to setpublic void setEnvelopesUpdated()
Feature
setEnvelopesUpdated
in interface Feature
public Feature cloneDeep() throws java.lang.CloneNotSupportedException
cloneDeep
in interface Feature
java.lang.CloneNotSupportedException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Feature
clone
in class java.lang.Object
java.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