Constructor Detail

CollectionFeatureSource

Method Detail

getSchema

Retrieves the schema (feature type) that will apply to features retrieved
from this FeatureSource.

For a homogeneous data source such as a shapefile or a database table,
this schema be that of all features. For a heterogeneous data source,
e.g. a GML document, the schema returned is the lowest common denominator
across all features.

getCount

Gets the number of the features that would be returned by the given
Query, taking into account any settings for max features and
start index set on the Query.

It is possible that this method will return -1 if the calculation
of number of features is judged to be too costly by the implementing class.
In this case, you might call getFeatures(query).size()
instead.

getInfo

Returns information describing this FeatureSource which may
include title, description and spatial parameters. Note that in the
returned ResourceInfo object, the distinction between feature
name and schema (feature type) name applies as discussed for
FeatureSource.getName().

getName

Returns the name of the features (strictly, the name of the
AttributeDescriptor for the features) accessible through this
FeatureSource.

The value returned by this method can be different to that returned by
featureSource.getSchema().getType().getName().
This is because there is a distinction between the name applied to features
and the name of a feature type. When working with SimpleFeature and
SimpleFeatureType, for example with a shapefile data source, it is
common practice for feature and feature type names to be the same. However, this
is not the case more generally. For instance, a database can contain two
tables with the same structure. The feature name will refer to the table
while the feature type name refers to the schema (table structure).