org.opengis.feature
Interface FeatureFactory


public interface FeatureFactory

Plays the role of making actual instances of types in this puzzle.


Method Summary
 Association createAssociation(Attribute value, AssociationDescriptor descriptor)
          Creates an association (always nested).
 Attribute createAttribute(Object value, AttributeDescriptor descriptor, String id)
          Creates a new attribute (always nested).
 ComplexAttribute createComplexAttribute(Collection<Property> value, AttributeDescriptor desc, String id)
          Creates a nested complex attribute.
 ComplexAttribute createComplexAttribute(Collection<Property> value, ComplexType type, String id)
          Create attribute based explicitly on type (not nested).
 Feature createFeature(Collection<Property> value, AttributeDescriptor desc, String id)
          Creates a nested feature.
 Feature createFeature(Collection<Property> value, FeatureType type, String id)
          Create a new feature based on type (not nested)
 FeatureCollection createFeatureCollection(Collection<Property> value, AttributeDescriptor desc, String id)
          Createsa a nested feature collection.
 FeatureCollection createFeatureCollection(Collection<Property> value, FeatureCollectionType type, String id)
          Create a new feature collection based on type (not nested).
 GeometryAttribute createGeometryAttribute(Object geometry, AttributeDescriptor desc, String id, CoordinateReferenceSystem crs)
          Creates a new geometry attribute (always nested).
 CRSFactory getCRSFactory()
           
 GeometryFactory getGeometryFactory()
           
 void setCRSFactory(CRSFactory crsFactory)
          Sets the CRS factory used to create CRS info for created attributes.
 void setGeometryFactory(GeometryFactory geometryFactory)
          Sets the factory used to create geometric data.
 

Method Detail

getCRSFactory

CRSFactory getCRSFactory()
Returns:
The CRS factory used to create CRS info for created attributes.

setCRSFactory

void setCRSFactory(CRSFactory crsFactory)
Sets the CRS factory used to create CRS info for created attributes.

Creating a CRS for a both Features and GeometryAttributes is a common need when creating content, this serves to cut down on the number of dependencies needed.


getGeometryFactory

GeometryFactory getGeometryFactory()
Returns:
The factory used to create geometric data.

setGeometryFactory

void setGeometryFactory(GeometryFactory geometryFactory)
Sets the factory used to create geometric data.

Creating spatial data is a common need when creating features, this serves to cut down on the number of dependencies needed.


createAssociation

Association createAssociation(Attribute value,
                              AssociationDescriptor descriptor)
Creates an association (always nested).

Parameters:
value - The value of the association, an attribute.
descriptor - The descriptor.

createAttribute

Attribute createAttribute(Object value,
                          AttributeDescriptor descriptor,
                          String id)
Creates a new attribute (always nested).

As currently defined this factory allows for the explicit creation of:

Parameters:
value - The value of the attribute, may be null depending on type.
descriptor - The attribute descriptor.
id - The id of the attribute, may be null depending on type.

createGeometryAttribute

GeometryAttribute createGeometryAttribute(Object geometry,
                                          AttributeDescriptor desc,
                                          String id,
                                          CoordinateReferenceSystem crs)
Creates a new geometry attribute (always nested).

Parameters:
value - The initial value of the attribute, may be null depending on the type of the type of the attribute.
desc - The attribute descriptor.
id - The id of the attribute, may be null depending on the type.
crs - The coordinate reference system of the attribute, may be null.
Throws:
IllegalArgumentException - If desc.getType() does not return an instanceof GeometryType.

createComplexAttribute

ComplexAttribute createComplexAttribute(Collection<Property> value,
                                        AttributeDescriptor desc,
                                        String id)
Creates a nested complex attribute.

Parameters:
value - The initial value of the attribute, may be null depending on the type of the attribute.
id - The id of the attribute, may be null depending on the type.
desc - The attribute descriptor.
Throws:
IllegalArgumentException - If desc.getType() does not return an instanceof ComplexType.

createComplexAttribute

ComplexAttribute createComplexAttribute(Collection<Property> value,
                                        ComplexType type,
                                        String id)
Create attribute based explicitly on type (not nested).

Parameters:
value -
type -
id -
Returns:

createFeature

Feature createFeature(Collection<Property> value,
                      AttributeDescriptor desc,
                      String id)
Creates a nested feature.

Parameters:
id - The id of the feature, (fid), may be null depending on the type.
desc - The attribute descriptor.
value - The initial value of the attribute, may be null depending on the type of the feature.
Throws:
IllegalArgumentException - If desc.getType() does not return an instanceof FeatureType.

createFeature

Feature createFeature(Collection<Property> value,
                      FeatureType type,
                      String id)
Create a new feature based on type (not nested)

Parameters:
value -
type -
id -
Returns:

createFeatureCollection

FeatureCollection createFeatureCollection(Collection<Property> value,
                                          AttributeDescriptor desc,
                                          String id)
Createsa a nested feature collection.

Parameters:
value - The initial value of the attribute, may be null depending on the type of the feature.
desc - The attribute descriptor.
id - The id of the feature collection, may be null depending on the type.
Throws:
IllegalArgumentException - If desc.getType() does not return an instanceof FeatureCollectionType.

createFeatureCollection

FeatureCollection createFeatureCollection(Collection<Property> value,
                                          FeatureCollectionType type,
                                          String id)
Create a new feature collection based on type (not nested).

Parameters:
value -
type -
id -
Returns:


Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.