deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.model.feature
Class FeatureFactory

java.lang.Object
  extended by org.deegree.model.feature.FeatureFactory

public class FeatureFactory
extends java.lang.Object

This factory offers methods for creating Features, FeatureCollection and all direct related classes/interfaces that are part of the org.deegree.model.feature package.

Version:
$Revision: 25989 $, $Date: 2010-08-20 14:18:18 +0200 (Fr, 20 Aug 2010) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
FeatureFactory()
           
 
Method Summary
static Feature createFeature(java.lang.String id, FeatureType featureType, FeatureProperty[] properties)
          creates an instance of a Feature from its FeatureType and an array of Objects that represents it properties.
static Feature createFeature(java.lang.String id, FeatureType featureType, java.util.List<FeatureProperty> properties)
          creates an instance of a Feature from its FeatureType and an array of Objects that represents it properties.
static FeatureCollection createFeatureCollection(java.lang.String id, Feature[] features)
          creates an instance of a FeatureCollection from an array of Features.
static FeatureCollection createFeatureCollection(java.lang.String id, Feature[] features, QualifiedName qName)
          creates an instance of a FeatureCollection from an array of Features.
static FeatureCollection createFeatureCollection(java.lang.String id, int initialCapacity)
          creates an instance of a FeatureCollection with an initial capacity.
static FeatureTupleCollection createFeatureCollection(java.lang.String id, java.util.List<Feature[]> featureTuples, int tupleLength)
          Creates a FeatureTupleCollection for the given feature tuples.
static FeatureProperty createFeatureProperty(QualifiedName name, java.lang.Object value)
          creates an instance of a FeatureProperty from its name and the data (value) it contains
static FeatureProperty createFeatureProperty(java.lang.String name, java.lang.Object value)
          Deprecated. use (QualifiedName, Object) instead
static FeaturePropertyType createFeaturePropertyType(QualifiedName name, int minOccurs, int maxOccurs)
          Creates an instance of a FeaturePropertyType from the given parameters.
static FeatureType createFeatureType(QualifiedName name, boolean isAbstract, PropertyType[] properties)
          creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs
static FeatureType createFeatureType(QualifiedName name, boolean isAbstract, java.net.URI schemaLocation, PropertyType[] properties)
          creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs
static FeatureType createFeatureType(java.lang.String name, boolean isAbstract, PropertyType[] properties)
          creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs
static FeatureType createFeatureType(java.lang.String name, boolean isAbstract, java.net.URI schemaLocation, PropertyType[] properties)
          creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs
static FeatureProperty createGeneratedValueFeatureProperty(QualifiedName name, ValueGenerator valueGenerator)
          creates an instance of a @see FeatureProperty from its name.
static GeometryPropertyType createGeometryPropertyType(QualifiedName name, QualifiedName typeName, int minOccurs, int maxOccurs)
          Creates an instance of a GeometryPropertyType from the given parameters.
static PropertyType createPropertyType(QualifiedName name, QualifiedName typeName, boolean nullable)
          Creates an instance of a PropertyType from the given parameters.
static PropertyType createPropertyType(QualifiedName name, QualifiedName typeName, int minOccurs, int maxOccurs)
          Creates an instance of a PropertyType from the given parameters.
static PropertyType createSimplePropertyType(QualifiedName name, int typeCode, boolean nullable)
          Creates an instance of a SimplePropertyType from the given parameters.
static SimplePropertyType createSimplePropertyType(QualifiedName name, int typeCode, int minOccurs, int maxOccurs)
          Creates an instance of a SimplePropertyType from the given parameters.
static int determinePropertyType(QualifiedName typeName)
          Determines the type code for the given type name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureFactory

public FeatureFactory()
Method Detail

createPropertyType

public static PropertyType createPropertyType(QualifiedName name,
                                              QualifiedName typeName,
                                              boolean nullable)
                                       throws UnknownTypeException
Creates an instance of a PropertyType from the given parameters.

Determines the right type from the given type name.

Parameters:
name - name of the property type
typeName - type name of the property type
nullable - set to true, if property type may be omitted
Returns:
corresponding PropertyType instance
Throws:
UnknownTypeException

createPropertyType

public static PropertyType createPropertyType(QualifiedName name,
                                              QualifiedName typeName,
                                              int minOccurs,
                                              int maxOccurs)
                                       throws UnknownTypeException
Creates an instance of a PropertyType from the given parameters.

Determines the right type from the given type name.

Parameters:
name - name of the property type
typeName - type name of the property type
minOccurs -
maxOccurs -
Returns:
corresponding PropertyType instance
Throws:
UnknownTypeException

createSimplePropertyType

public static PropertyType createSimplePropertyType(QualifiedName name,
                                                    int typeCode,
                                                    boolean nullable)
Creates an instance of a SimplePropertyType from the given parameters.

Parameters:
name - name of the property type
typeCode - type code of the property type
nullable - set to true, if property type may be omitted
Returns:
generated SimplePropertyType instance
See Also:
Types

createSimplePropertyType

public static SimplePropertyType createSimplePropertyType(QualifiedName name,
                                                          int typeCode,
                                                          int minOccurs,
                                                          int maxOccurs)
Creates an instance of a SimplePropertyType from the given parameters.

Parameters:
name - name of the property type
typeCode - type code of the property type
minOccurs -
maxOccurs -
Returns:
generated SimplePropertyType instance
See Also:
Types

createGeometryPropertyType

public static GeometryPropertyType createGeometryPropertyType(QualifiedName name,
                                                              QualifiedName typeName,
                                                              int minOccurs,
                                                              int maxOccurs)
Creates an instance of a GeometryPropertyType from the given parameters.

Parameters:
name - name of the property type
typeName - typeName of the property type
minOccurs -
maxOccurs -
Returns:
generated GeometryPropertyType instance
See Also:
Types

createFeaturePropertyType

public static FeaturePropertyType createFeaturePropertyType(QualifiedName name,
                                                            int minOccurs,
                                                            int maxOccurs)
Creates an instance of a FeaturePropertyType from the given parameters.

Parameters:
name - name of the property type
minOccurs -
maxOccurs -
Returns:
generated FeaturePropertyType instance
See Also:
Types

determinePropertyType

public static int determinePropertyType(QualifiedName typeName)
                                 throws UnknownTypeException
Determines the type code for the given type name.

Parameters:
typeName - name to determine
Returns:
type code for the given type name
Throws:
UnknownTypeException - if the type name cannot be determined
See Also:
Types

createFeatureType

public static FeatureType createFeatureType(QualifiedName name,
                                            boolean isAbstract,
                                            PropertyType[] properties)
creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs

Parameters:
name - name of the FeatureType
isAbstract - true if the feature type to create is abstract, false otherwise
properties - properties containing the FeatureTypes content
Returns:
instance of a FeatureType

createFeatureType

public static FeatureType createFeatureType(java.lang.String name,
                                            boolean isAbstract,
                                            PropertyType[] properties)
creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs

Parameters:
name - name of the FeatureType
isAbstract - true if the feature type to create is abstract, false otherwise
properties - properties containing the FeatureTypes content
Returns:
instance of a FeatureType

createFeatureType

public static FeatureType createFeatureType(QualifiedName name,
                                            boolean isAbstract,
                                            java.net.URI schemaLocation,
                                            PropertyType[] properties)
creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs

Parameters:
name - name of the FeatureType
isAbstract - true if the feature type to create is abstract, false otherwise
schemaLocation -
properties - properties containing the FeatureTypes content
Returns:
instance of a FeatureType

createFeatureType

public static FeatureType createFeatureType(java.lang.String name,
                                            boolean isAbstract,
                                            java.net.URI schemaLocation,
                                            PropertyType[] properties)
creates an instance of a FeatureType from an array of FeatureTypeProperties, and its name but without parents and childs

Parameters:
name - name of the FeatureType
isAbstract - true if the feature type to create is abstract, false otherwise
schemaLocation -
properties - properties containing the FeatureTypes content
Returns:
instance of a FeatureType

createFeatureProperty

public static FeatureProperty createFeatureProperty(QualifiedName name,
                                                    java.lang.Object value)
creates an instance of a FeatureProperty from its name and the data (value) it contains

Parameters:
name - name of the FeatureProperty
value - value of the FeatureProperty
Returns:
an instance of a FeatureProperty

createFeatureProperty

@Deprecated
public static FeatureProperty createFeatureProperty(java.lang.String name,
                                                               java.lang.Object value)
Deprecated. use (QualifiedName, Object) instead

creates an instance of a FeatureProperty from its name and the data (value) it contains

Parameters:
name - name of the FeatureProperty
value - value of the FeatureProperty
Returns:
an instance of a FeatureProperty

createGeneratedValueFeatureProperty

public static FeatureProperty createGeneratedValueFeatureProperty(QualifiedName name,
                                                                  ValueGenerator valueGenerator)
creates an instance of a @see FeatureProperty from its name. The created @see FeatureProperty does takes a value generator instead of a value.

Parameters:
name - name of the FeatureProperty
value - value of the FeatureProperty
Returns:
an instance of a FeatureProperty

createFeature

public static Feature createFeature(java.lang.String id,
                                    FeatureType featureType,
                                    FeatureProperty[] properties)
creates an instance of a Feature from its FeatureType and an array of Objects that represents it properties. It is assumed that the order of the properties is identical to the order of the FeatureTypeProperties of the the FeatureType.

Parameters:
id - unique id of the Feature
featureType - FeatureType of the Feature
properties - properties (content) of the Feature
Returns:
instance of a Feature

createFeature

public static Feature createFeature(java.lang.String id,
                                    FeatureType featureType,
                                    java.util.List<FeatureProperty> properties)
creates an instance of a Feature from its FeatureType and an array of Objects that represents it properties. It is assumed that the order of the properties is identical to the order of the FeatureTypeProperties of the the FeatureType.

Parameters:
id - unique id of the Feature
featureType - FeatureType of the Feature
properties - properties (content) of the Feature
Returns:
instance of a Feature

createFeatureCollection

public static FeatureCollection createFeatureCollection(java.lang.String id,
                                                        int initialCapacity)
creates an instance of a FeatureCollection with an initial capacity. The returned FeatureCollection doesn't have a FeatureType nor properties. It is just a collection of Features.

Parameters:
id - unique id of the FeatureCollection
initialCapacity - initial capacity of the FeatureCollection
Returns:
instance of an empty FeatureCollection

createFeatureCollection

public static FeatureCollection createFeatureCollection(java.lang.String id,
                                                        Feature[] features)
creates an instance of a FeatureCollection from an array of Features. The returned FeatureCollection doesn't have a FeatureType nor properties. It is just a collection of Features.

Parameters:
id - unique id of the FeatureCollection instance
features - Features to fill in into the FeatureCollection
Returns:
instance of a FeatureCollection containing the submitted features

createFeatureCollection

public static FeatureCollection createFeatureCollection(java.lang.String id,
                                                        Feature[] features,
                                                        QualifiedName qName)
creates an instance of a FeatureCollection from an array of Features. The returned FeatureCollection doesn't have a FeatureType nor properties. It is just a collection of Features. With it's name set to the given qualifiedName

Parameters:
id - unique id of the FeatureCollection instance
features - Features to fill in into the FeatureCollection
qName - name of the featureCollection
Returns:
instance of a FeatureCollection containing the submitted features

createFeatureCollection

public static FeatureTupleCollection createFeatureCollection(java.lang.String id,
                                                             java.util.List<Feature[]> featureTuples,
                                                             int tupleLength)
Creates a FeatureTupleCollection for the given feature tuples.

Parameters:
id - id for the FeatureCollection instance
featureTuples - list of feature tuples (array length must match tupleLength parameter)
tupleLength - number of features per tuple
Returns:
FeatureTupleCollection containing the given feature tuples

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org