org.deegree.feature.types
Class DynamicFeatureType

java.lang.Object
  extended by org.deegree.feature.types.DynamicFeatureType
All Implemented Interfaces:
FeatureType

public class DynamicFeatureType
extends Object
implements FeatureType

FeatureType that allows to add property declarations after construction.

Version:
$Revision: 31622 $, $Date: 2011-08-23 18:12:33 +0200 (Tue, 23 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
DynamicFeatureType(QName ftName, DynamicAppSchema appSchema)
          Creates a new DynamicFeatureType instance.
 
Method Summary
 FeaturePropertyType addFeaturePropertyDeclaration(PropertyType pre, QName propName, FeatureType valueFt)
          Adds a new FeaturePropertyType declaration.
 GeometryPropertyType addGeometryPropertyDeclaration(PropertyType pre, QName propName)
          Adds a new GeometryPropertyType declaration.
 SimplePropertyType addSimplePropertyDeclaration(PropertyType pre, QName propName)
          Adds a new SimplePropertyType declaration.
 GeometryPropertyType getDefaultGeometryPropertyDeclaration()
          Returns the first geometry property declaration of the feature type.
 QName getName()
          Returns the name that features of this type have.
 PropertyType getPropertyDeclaration(QName propName)
          Returns the declaration of the property with the given name.
 PropertyType getPropertyDeclaration(QName propName, GMLVersion version)
          Returns the declaration of the property with the given name.
 List<PropertyType> getPropertyDeclarations()
          Returns all property declarations of the feature type, excluding those that any GML feature allows for.
 List<PropertyType> getPropertyDeclarations(GMLVersion version)
          Returns all property declarations of the feature type, including those that any GML feature allows for.
 AppSchema getSchema()
          Returns the AppSchema that this feature type belongs to.
 boolean isAbstract()
          Returns whether this type is abstract or not.
 Feature newFeature(String fid, List<Property> props, ExtraProps extraProps, GMLVersion version)
          Creates a new Feature instance (that is of this type).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicFeatureType

public DynamicFeatureType(QName ftName,
                          DynamicAppSchema appSchema)
Creates a new DynamicFeatureType instance.

Parameters:
ftName - feature type name, must not be null
appSchema - corresponding application schema, must not be null
Method Detail

addSimplePropertyDeclaration

public SimplePropertyType addSimplePropertyDeclaration(PropertyType pre,
                                                       QName propName)
Adds a new SimplePropertyType declaration.

Parameters:
pre - predecessor property, can be null
propName - property name, must not be null
Returns:
new (and added) property declaration, never null

addGeometryPropertyDeclaration

public GeometryPropertyType addGeometryPropertyDeclaration(PropertyType pre,
                                                           QName propName)
Adds a new GeometryPropertyType declaration.

Parameters:
pre - predecessor property, can be null
propName - property name, must not be null
Returns:
new (and added) property declaration, never null

addFeaturePropertyDeclaration

public FeaturePropertyType addFeaturePropertyDeclaration(PropertyType pre,
                                                         QName propName,
                                                         FeatureType valueFt)
Adds a new FeaturePropertyType declaration.

Parameters:
pre - predecessor property, can be null
propName - property name, must not be null
valueFt - value feature type, must not be null
Returns:
new (and added) property declaration, never null

getName

public QName getName()
Description copied from interface: FeatureType
Returns the name that features of this type have.

In the GML representation, this corresponds to the feature's element name.

Specified by:
getName in interface FeatureType
Returns:
the name of the feature instance

getPropertyDeclaration

public PropertyType getPropertyDeclaration(QName propName)
Description copied from interface: FeatureType
Returns the declaration of the property with the given name.

Specified by:
getPropertyDeclaration in interface FeatureType
Parameters:
propName - name of the property
Returns:
the declaration of the property, or null if no such property is defined

getPropertyDeclaration

public PropertyType getPropertyDeclaration(QName propName,
                                           GMLVersion version)
Description copied from interface: FeatureType
Returns the declaration of the property with the given name.

Specified by:
getPropertyDeclaration in interface FeatureType
Parameters:
propName - name of the property
version - GML version that determines the standard GML properties, must not be null
Returns:
the declaration of the property, or null if no such property is defined

getPropertyDeclarations

public List<PropertyType> getPropertyDeclarations()
Description copied from interface: FeatureType
Returns all property declarations of the feature type, excluding those that any GML feature allows for.

Specified by:
getPropertyDeclarations in interface FeatureType
Returns:
property declarations (in order)

getPropertyDeclarations

public List<PropertyType> getPropertyDeclarations(GMLVersion version)
Description copied from interface: FeatureType
Returns all property declarations of the feature type, including those that any GML feature allows for.

Specified by:
getPropertyDeclarations in interface FeatureType
Parameters:
version - GML version that determines the standard GML properties, must not be null
Returns:
property declarations (in order)

getDefaultGeometryPropertyDeclaration

public GeometryPropertyType getDefaultGeometryPropertyDeclaration()
Description copied from interface: FeatureType
Returns the first geometry property declaration of the feature type.

Specified by:
getDefaultGeometryPropertyDeclaration in interface FeatureType
Returns:
first geometry property declaration or null if no such declaration exists

isAbstract

public boolean isAbstract()
Description copied from interface: FeatureType
Returns whether this type is abstract or not.

Specified by:
isAbstract in interface FeatureType
Returns:
true, if this feature type is abstract, false otherwise

newFeature

public Feature newFeature(String fid,
                          List<Property> props,
                          ExtraProps extraProps,
                          GMLVersion version)
Description copied from interface: FeatureType
Creates a new Feature instance (that is of this type).

Specified by:
newFeature in interface FeatureType
Parameters:
fid - feature id, or null if the feature doesn't have an id
props - properties
extraProps - properties that are not defined by the FeatureType (e.g. rendering hints)
version - determines the names and types of the standard GML properties, can be null (no GML properties)
Returns:
a new Feature instance

getSchema

public AppSchema getSchema()
Description copied from interface: FeatureType
Returns the AppSchema that this feature type belongs to.

Specified by:
getSchema in interface FeatureType
Returns:
the corresponding ApplicationSchema or null if this feature type has none

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.