org.deegree.feature.types
Class GenericFeatureType

java.lang.Object
  extended by org.deegree.feature.types.GenericFeatureType
All Implemented Interfaces:
FeatureType
Direct Known Subclasses:
GenericFeatureCollectionType

public class GenericFeatureType
extends Object
implements FeatureType

Generic implementation of FeatureType, can be used for representing arbitrary feature types.

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

Constructor Summary
GenericFeatureType(QName name, List<PropertyType> propDecls, boolean isAbstract)
           
 
Method Summary
 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

GenericFeatureType

public GenericFeatureType(QName name,
                          List<PropertyType> propDecls,
                          boolean isAbstract)
Method Detail

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

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

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

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.