org.opengis.feature
Interface FeatureStore
-
public interface FeatureStoreGives a normalized interface to a data provider that can serve up collections ofFeatureobjects.- Since:
- GeoAPI 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddFeatureStoreListener(FeatureStoreListener listener)Adds a listener object whose methods will be invoked whenever a new feature type is added, a feature type is deleted, or a feature type's schema has been modified.voidcreateType(FeatureType type)Creates a new type.FeatureStylegetDefaultStyle(GenericName type)If the feature store wants to provide a default style for the given type, it may return something here.InternationalStringgetDescription()Description of this feature store.InternationalStringgetDisplayName()Display name for this feature store.FeatureCollectiongetFeatures(GenericName type)Gets all features of the given type.FeatureCollectiongetFeatures(GenericName type, Filter filter)Gets all features of the given type that pass some filter.FeatureCollectiongetFeatures(Query query)Gets features of the given type that pass some query.FeatureCollectiongetFeatures(Query q, Transaction t)Shortcut for callinggetFeatures(q)then callingsetTransaction(t)on the result.FeatureTypegetFeatureType(GenericName typeName)Returns the schema of the named feature type.java.net.URIgetIcon()Icon representing thisFeatureStore.java.util.List<GenericName>getRootTypeNames()This method is similar to thegetTypeNames()method, except that it acknowledges that some features only make sense as children of another feature collection type.java.util.List<GenericName>getTypeNames()Gets a list of all the names of the types held in this feature store.voidmodifyType(FeatureType type)Modifies the type by changing the schema to what is passed as a parameter.voidregisterFeatureCollection(FeatureCollection featureCollection, GenericName type)Registers the given feature collection so that it may hear any adds, removes, or updates ofFeatures of the giventype.voidregisterFeatureCollection(FeatureCollection featureCollection, GenericName type, Filter filter)Registers the given feature collection so that it may hear any adds, removes, or updates ofFeatures of the giventypethat meet the givenfilter.voidregisterFeatureCollection(FeatureCollection featureCollection, Query query)Registers the given feature collection so that it may hear any adds, removes, or updates ofFeatures of the giventypethat meet the givenfilter.voidremoveFeatureStoreListener(FeatureStoreListener listener)Removes a listener that was previously added using theaddFeatureStoreListenermethod.voidremoveType(GenericName type)Completely removes all the features of the given type and removes the type itself.voidunregisterFeatureCollection(FeatureCollection featureCollection)Unregisters the given feature collection so that it will no longer hear any adds, removes, or updates ofFeatures for which it had previously registered.
-
-
-
Method Detail
-
getIcon
java.net.URI getIcon()
Icon representing thisFeatureStore.- Returns:
- URI to a icon (GIF or PNG) representing this feature store.
-
getDisplayName
InternationalString getDisplayName()
Display name for this feature store.
-
getDescription
InternationalString getDescription()
Description of this feature store.
-
getTypeNames
java.util.List<GenericName> getTypeNames()
Gets a list of all the names of the types held in this feature store. The typical usage of these generic names will be as follows: In most cases, the generic name will have a local part that is be the name of the XML element used to encode such features as GML. The scope of the name will either be null (if the XML element is to have no namespace) or will be a name whosetoString()gives the URI of an XML namespace.
-
getRootTypeNames
java.util.List<GenericName> getRootTypeNames()
This method is similar to thegetTypeNames()method, except that it acknowledges that some features only make sense as children of another feature collection type. So this method returns the types that are the root level "parent" types that can be retrieved from this store. Implementors are free to return the same values from this method as fromgetTypeNames().
-
getFeatureType
FeatureType getFeatureType(GenericName typeName)
Returns the schema of the named feature type. May return null if a type of the given name does not exist. TheGenericNamepassed to this method must be equal to one of the elements in the list returned by thegetTypeNames()method.
-
getFeatures
FeatureCollection getFeatures(GenericName type) throws java.io.IOException
Gets all features of the given type.- Throws:
java.io.IOException- if an error occurs while reading the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
getFeatures
FeatureCollection getFeatures(GenericName type, Filter filter) throws java.io.IOException
Gets all features of the given type that pass some filter.- Throws:
java.io.IOException- if an error occurs while reading the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
getFeatures
FeatureCollection getFeatures(Query query) throws java.io.IOException
Gets features of the given type that pass some query. Different from the method that accepts a type and a filter, this method allows for retrieving only a subset of the attributes since a query can include a property list. Note that the type is indicated in the query.- Throws:
java.io.IOException- if an error occurs while reading the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
getFeatures
FeatureCollection getFeatures(Query q, Transaction t) throws java.io.IOException
Shortcut for callinggetFeatures(q)then callingsetTransaction(t)on the result.- Throws:
java.io.IOException- if an error occurs while reading the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
registerFeatureCollection
void registerFeatureCollection(FeatureCollection featureCollection, GenericName type)
Registers the given feature collection so that it may hear any adds, removes, or updates ofFeatures of the giventype.- Parameters:
featureCollection- the feature collection to register.type- theFeatureTypeto listen for.
-
registerFeatureCollection
void registerFeatureCollection(FeatureCollection featureCollection, GenericName type, Filter filter)
Registers the given feature collection so that it may hear any adds, removes, or updates ofFeatures of the giventypethat meet the givenfilter.- Parameters:
featureCollection- the feature collection to register.type- theFeatureTypeto register with.filter- the filter to register with.
-
registerFeatureCollection
void registerFeatureCollection(FeatureCollection featureCollection, Query query)
Registers the given feature collection so that it may hear any adds, removes, or updates ofFeatures of the giventypethat meet the givenfilter.- Parameters:
featureCollection- the feature collection to register.query- the query to register with.
-
unregisterFeatureCollection
void unregisterFeatureCollection(FeatureCollection featureCollection)
Unregisters the given feature collection so that it will no longer hear any adds, removes, or updates ofFeatures for which it had previously registered.- Parameters:
featureCollection- the feature collection to unregister.
-
getDefaultStyle
FeatureStyle getDefaultStyle(GenericName type)
If the feature store wants to provide a default style for the given type, it may return something here. Otherwise, it should return null.
-
createType
void createType(FeatureType type) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException, java.io.IOException
Creates a new type. If this feature store is backed by a persistent store of some kind, then structures corresponding to the given type should be created in this persistent store.- Throws:
java.lang.UnsupportedOperationException- if the addition feature types is not supported.java.lang.IllegalArgumentException- If a type of the given name already exists.java.lang.IllegalArgumentException- If the given feature schema is somehow incompatible with the persisten store that backs this feature store.java.io.IOException- if an error occurs while accessing the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
removeType
void removeType(GenericName type) throws java.lang.UnsupportedOperationException, java.io.IOException
Completely removes all the features of the given type and removes the type itself. If this feature store is backed by a persistent store of some kind, then the corresponding structures in that store should be removed.- Throws:
java.lang.UnsupportedOperationException- if the removal of whole feature types is not supported.java.io.IOException- if an error occurs while accessing the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
modifyType
void modifyType(FeatureType type) throws java.lang.UnsupportedOperationException, java.io.IOException
Modifies the type by changing the schema to what is passed as a parameter.- Throws:
java.lang.UnsupportedOperationException- if the modification of types is not supported.java.io.IOException- if an error occurs while accessing the backing store. If the cause is not a standard I/O exception, it may be wrapped inaFeatureStoreException.
-
addFeatureStoreListener
void addFeatureStoreListener(FeatureStoreListener listener)
Adds a listener object whose methods will be invoked whenever a new feature type is added, a feature type is deleted, or a feature type's schema has been modified.
-
removeFeatureStoreListener
void removeFeatureStoreListener(FeatureStoreListener listener)
Removes a listener that was previously added using theaddFeatureStoreListenermethod.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG