Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.opengis.feature.simple
Interface SimpleFeatureFactory

    public interface SimpleFeatureFactory

This interface denotes a factory capable of producing SimpleFeature.

This is an abstract factory describing how to create a set of classes targeted towards a SimpleFeature implementation. The methods below define no additional capability over Simp

Method Summary
`Attribute` | `createAttribute(Object value, AttributeDescriptor descriptor, String id)` Creates a new attribute (always nested).
`GeometryAttribute` | `createGeometryAttribute(Object value, AttributeDescriptor desc, String id, CoordinateReferenceSystem crs)` Creates a new geometry attribute (always nested).
`SimpleFeature` | `createSimpleFeature(List attributes, SimpleFeatureType type, String id)` Creates a new simple feature.
`SimpleFeatureCollection` | `createSimpleFeatureCollection(SimpleFeatureCollectionType type, String id)` Createsa a new simple feature collection.

Method Detail

### 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:

  - BooleanAttribute
  - NumericAttribute
  - TextAttribute
  - TemporalAttribute
  - GeometryAttribute (formal part of the model)

  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 value,
                                              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`.

### createSimpleFeature

    SimpleFeature createSimpleFeature(List attributes,
                                      SimpleFeatureType type,
                                      String id)

  Creates a new simple feature.

  Parameters:
    `attributes` - attributes order dicated by provided `type`
    `type` - Type of SimpleFeature to be created
    `id` - The id of the feature, (fid), may be null depending on the type.
  Throws:
    `IllegalArgumentException` - If desc.getType() does not return an instanceof `SimpleFeatureType`.

### createSimpleFeatureCollection

    SimpleFeatureCollection createSimpleFeatureCollection(SimpleFeatureCollectionType type,
                                                          String id)

  Createsa a new simple feature collection.

  Parameters:
    `type` - Type of SimpleFeatureCollection to be created
    `id` - The id of the feature collection
  Throws:
    `IllegalArgumentException` - If desc.getType() does not return an instanceof `SimpleFeatureCollectionType`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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