org.deegree.feature.property
Class GenericProperty

java.lang.Object
  extended by org.deegree.feature.property.GenericProperty
All Implemented Interfaces:
org.deegree.commons.tom.ElementNode, org.deegree.commons.tom.TypedObjectNode, Property

public class GenericProperty
extends Object
implements Property

Allows the representation of arbitrary Propertys. TODO Differentiation between value and children needs to be clarified and documented.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Constructor Summary
GenericProperty(PropertyType declaration, QName name, org.deegree.commons.tom.TypedObjectNode value)
          Creates a new GenericProperty instance.
GenericProperty(PropertyType declaration, QName name, org.deegree.commons.tom.TypedObjectNode value, boolean isNilled)
           
GenericProperty(PropertyType declaration, QName name, org.deegree.commons.tom.TypedObjectNode value, Map<QName,org.deegree.commons.tom.primitive.PrimitiveValue> attrs, List<org.deegree.commons.tom.TypedObjectNode> children)
          Creates a new GenericProperty instance.
GenericProperty(PropertyType declaration, QName name, org.deegree.commons.tom.TypedObjectNode value, Map<QName,org.deegree.commons.tom.primitive.PrimitiveValue> attrs, List<org.deegree.commons.tom.TypedObjectNode> children, org.apache.xerces.xs.XSElementDeclaration xsType)
           
GenericProperty(PropertyType declaration, org.deegree.commons.tom.TypedObjectNode value)
          Creates a new GenericProperty instance.
 
Method Summary
 Map<QName,org.deegree.commons.tom.primitive.PrimitiveValue> getAttributes()
           
 List<org.deegree.commons.tom.TypedObjectNode> getChildren()
           
 QName getName()
          Returns the name of the property.
 PropertyType getType()
          Returns the type information for this property.
 org.deegree.commons.tom.TypedObjectNode getValue()
          Returns the value of this property.
 org.apache.xerces.xs.XSElementDeclaration getXSType()
           
 void setChildren(List<org.deegree.commons.tom.TypedObjectNode> children)
          Sets the children of this property.
 void setValue(org.deegree.commons.tom.TypedObjectNode value)
          Sets the value of this property.
 String toString()
          Returns the text value of this property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericProperty

public GenericProperty(PropertyType declaration,
                       org.deegree.commons.tom.TypedObjectNode value)
Creates a new GenericProperty instance.

Parameters:
declaration - type information
value - property value, can be null

GenericProperty

public GenericProperty(PropertyType declaration,
                       QName name,
                       org.deegree.commons.tom.TypedObjectNode value)
Creates a new GenericProperty instance.

Parameters:
declaration - type information
name - name of the property (does not necessarily match the name in the type information)
value - property value, can be null

GenericProperty

public GenericProperty(PropertyType declaration,
                       QName name,
                       org.deegree.commons.tom.TypedObjectNode value,
                       Map<QName,org.deegree.commons.tom.primitive.PrimitiveValue> attrs,
                       List<org.deegree.commons.tom.TypedObjectNode> children)
Creates a new GenericProperty instance.

Parameters:
declaration - type information
name - name of the property (does not necessarily match the name in the type information)
value - primary property value, can be null

GenericProperty

public GenericProperty(PropertyType declaration,
                       QName name,
                       org.deegree.commons.tom.TypedObjectNode value,
                       Map<QName,org.deegree.commons.tom.primitive.PrimitiveValue> attrs,
                       List<org.deegree.commons.tom.TypedObjectNode> children,
                       org.apache.xerces.xs.XSElementDeclaration xsType)

GenericProperty

public GenericProperty(PropertyType declaration,
                       QName name,
                       org.deegree.commons.tom.TypedObjectNode value,
                       boolean isNilled)
Method Detail

getName

public QName getName()
Description copied from interface: Property
Returns the name of the property.

In a canonical GML representation, this corresponds to the property's element name in the declaration. However, there are some GML application schemas (e.g. CityGML) that define properties using abstract element declarations and provide multiple concrete substitutable elements. In these cases, the name of a property is not equal to the name of the property type.

Specified by:
getName in interface org.deegree.commons.tom.ElementNode
Specified by:
getName in interface Property
Returns:
the name of the property, never null

getValue

public org.deegree.commons.tom.TypedObjectNode getValue()
Description copied from interface: Property
Returns the value of this property.

Specified by:
getValue in interface Property
Returns:
the value of this property, can be null

setValue

public void setValue(org.deegree.commons.tom.TypedObjectNode value)
Description copied from interface: Property
Sets the value of this property.

NOTE: This also changes the children of the property.

Specified by:
setValue in interface Property
Parameters:
value - the value of this property, can be null

setChildren

public void setChildren(List<org.deegree.commons.tom.TypedObjectNode> children)
Description copied from interface: Property
Sets the children of this property.

NOTE: This also changes the value of the property.

Specified by:
setChildren in interface Property
Parameters:
children - the children of this property, can be null

getType

public PropertyType getType()
Description copied from interface: Property
Returns the type information for this property.

Specified by:
getType in interface Property
Returns:
the type information, never null

toString

public String toString()
Description copied from interface: Property
Returns the text value of this property.

Specified by:
toString in interface Property
Overrides:
toString in class Object
Returns:
the text value of this property, never null

getAttributes

public Map<QName,org.deegree.commons.tom.primitive.PrimitiveValue> getAttributes()
Specified by:
getAttributes in interface org.deegree.commons.tom.ElementNode

getChildren

public List<org.deegree.commons.tom.TypedObjectNode> getChildren()
Specified by:
getChildren in interface org.deegree.commons.tom.ElementNode

getXSType

public org.apache.xerces.xs.XSElementDeclaration getXSType()
Specified by:
getXSType in interface org.deegree.commons.tom.ElementNode


Copyright © 2011. All Rights Reserved.