com.mapinfo.midev.feature

## Interface IFeatureCollectionMetadata

All Superinterfaces:
  IFeatureMetadata, Serializable

All Known Subinterfaces:
  ITableMetadata

    public interface IFeatureCollectionMetadata
    extends IFeatureMetadata

Contains information that describes a feature collection. This interface extends IFeatureMetadata; thus, an implementation of IFeatureCollectionMetadata also implements IFeatureMetadata and exposes the attribute definitions for the feature collection, the default geometry attribute, default style attribute, etc.

### Method Summary

All Methods Instance Methods Abstract Methods
`long` `getCount()` Returns the number of IFeatures contained in the IFeatureCollection this metadata describes.
`Envelope` `getDefaultView(String geometryAttributeName)` Indicates the default view for the specified geometry attribute.
`String` `getDescription()` Contains a textual description of the IGenericFeature associated with this metadata.
`Envelope` `getEnvelope(String geometryAttributeName)` For the specified geometry attribute, this method returns the Envelope of all feature geometry values in the collection.
`Metadata` `getMetadata()` Returns a Metadata object that can be used to associate additional, arbitrary metadata with the feature collection.
`Collection` `getNames()` A collection of names used to identify the feature.
`GeometryType` `getPredominantGeometryType(String geometryAttributeName)` Returns the `GeometryType` that is most predominant in the feature collection, if known.
`MVL` `hasAreaGeometries(String geometryAttributeName)` Indicates if the feature collection contains any features with geometry values for the specified attribute that are MultiPolygon, Rectangle, or other region type geometries.
`MVL` `hasLineGeometries(String geometryAttributeName)` Indicates if the feature collection contains any features with geometry values for the specified attribute that are MultiCurve geometries.
`MVL` `hasPointGeometries(String geometryAttributeName)` Indicates if the feature collection contains any features with geometry values for the specified attribute that are Point or MultiPoint geometries.
`MVL` `hasTextGeometries(String geometryAttributeName)` Indicates if the feature collection contains any features with geometry values for the specified attribute that are LegacyText geometries.
`boolean` `isCountKnown()` Indicates if the IFeatureCollection this metadata describes is able to determine the number of IFeatures it contains.
`boolean` `isPredominantGeometryTypeKnown(String geometryAttributeName)` Indicates if the specified geometry attribute has a known predominant geometry type.
`boolean` `supportsAdd()` Indicates if the feature collection supports the addition of new feature instances.
`boolean` `supportsRemove()` Indicates if the feature collection supports the removal of feature instances.

### Methods inherited from interface com.mapinfo.midev.feature.IFeatureMetadata

`getAttributeDefinitions, getPrimaryKeyMetadata`

### Method Detail

#### getNames

    Collection getNames()

A collection of names used to identify the feature. An IGenericFeature may have several names, typically assigned by different authorities. The interface places no restrictions on the structure, meaning or uniqueness of names associated with an IGenericFeature.

Returns:
  a collection of `String`s containing the names. The value may be null or may be an empty collection if no names are defined.

#### getDescription

    String getDescription()

Contains a textual description of the IGenericFeature associated with this metadata.

Returns:
  a textual description of the IGenericFeature.

#### isCountKnown

    boolean isCountKnown()

Indicates if the IFeatureCollection this metadata describes is able to determine the number of IFeatures it contains. If the count is known, it may be obtained through the `getCount` method.

Returns:
  `true` if the number of IFeatures contained by the IFeatureCollection this metadata describes is known, `false` if not.
See Also:
  `IFeatureCollectionMetadata.getCount()`

#### getCount

    long getCount()

Returns the number of IFeatures contained in the IFeatureCollection this metadata describes.

Returns:
  the number of IFeatures in the IFeatureCollection.
Throws:
  `UnsupportedOperationException` - if the count is not known (check `hasCount` before calling this method).

#### getEnvelope

    Envelope getEnvelope(String geometryAttributeName)

For the specified geometry attribute, this method returns the Envelope of all feature geometry values in the collection. If the envelope is not known, an empty envelope will be returned (not a null reference).

Parameters:
  `geometryAttributeName` - The attribute to calculate the envelope of.
Returns:
  The Envelope of all feature geometry values in the collection, for the specified geometry attribute.
Throws:
  `AttributeNotFoundException` - if an attribute with the specified name is not found.
  `IllegalArgumentException` - if the attribute is not a geometry attribute.

#### getDefaultView

    Envelope getDefaultView(String geometryAttributeName)

Indicates the default view for the specified geometry attribute. This is an optional property and may return either `null` or an empty Envelope.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute for which the default view will be obtained.
Returns:
  an `Envelope` which may be empty, or `null`.
Throws:
  `AttributeNotFoundException` - if an attribute with the specified name is not found.
  `IllegalArgumentException` - if the attribute is not a geometry attribute.

#### isPredominantGeometryTypeKnown

    boolean isPredominantGeometryTypeKnown(String geometryAttributeName)

Indicates if the specified geometry attribute has a known predominant geometry type. The predominant geometry type may not be known if the feature collection implementation does not support its determination or if there is an equal number of various types of geometry (which would also be the case if the feature collection is empty). If a predominant geometry type is known, the actual type may be queried using the `IFeatureCollectionMetadata.getPredominantGeometryType(java.lang.String)` method.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute for which the predominant geometry type is desired.
Returns:
  `true` if the feature collection has a known predominant geometry type, `false` otherwise.

#### getPredominantGeometryType

    GeometryType getPredominantGeometryType(String geometryAttributeName)

Returns the `GeometryType` that is most predominant in the feature collection, if known. If there is no predominant type, or if the feature collection implementation does not support this determination, the `IFeatureCollectionMetadata.isPredominantGeometryTypeKnown(java.lang.String)` method would return false.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute for which the predominant geometry type will be determined.
Returns:
  a GeometryType or `null` if there is no predominant type or the value is not known.

#### hasPointGeometries

    MVL hasPointGeometries(String geometryAttributeName)

Indicates if the feature collection contains any features with geometry values for the specified attribute that are Point or MultiPoint geometries.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute of interest.
Returns:
  MVL.Yes if the feature collection is known to have point geometries, MVL.No if the feature collection is known to not have point geometries, or MVL.Unknown if the feature collection does not know.

#### hasLineGeometries

    MVL hasLineGeometries(String geometryAttributeName)

Indicates if the feature collection contains any features with geometry values for the specified attribute that are MultiCurve geometries.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute of interest.
Returns:
  MVL.Yes if the feature collection is known to have line geometries, MVL.No if the feature collection is known to not have line geometries, or MVL.Unknown if the feature collection does not know.

#### hasAreaGeometries

    MVL hasAreaGeometries(String geometryAttributeName)

Indicates if the feature collection contains any features with geometry values for the specified attribute that are MultiPolygon, Rectangle, or other region type geometries.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute of interest.
Returns:
  MVL.Yes if the feature collection is known to have area geometries, MVL.No if the feature collection is known to not have area geometries, or MVL.Unknown if the feature collection does not know.

#### hasTextGeometries

    MVL hasTextGeometries(String geometryAttributeName)

Indicates if the feature collection contains any features with geometry values for the specified attribute that are LegacyText geometries.

Parameters:
  `geometryAttributeName` - is the name of the geometry attribute of interest.
Returns:
  MVL.Yes if the feature collection is known to have text geometries, MVL.No if the feature collection is known to not have text geometries, or MVL.Unknown if the feature collection does not know.

#### supportsAdd

    boolean supportsAdd()

Indicates if the feature collection supports the addition of new feature instances.

Returns:
  `true` if the feature collection supports addition of new feature instances; `false` otherwise.

#### supportsRemove

    boolean supportsRemove()

Indicates if the feature collection supports the removal of feature instances.

Returns:
  `true` if the feature collection supports removal of feature instances; `false` otherwise.

#### getMetadata

    Metadata getMetadata()

Returns a Metadata object that can be used to associate additional, arbitrary metadata with the feature collection.

Returns:
  a Metadata instance.