Class PropertyDataStore
- Object
-
- ContentDataStore
-
- PropertyDataStore
-
- All Implemented Interfaces:
DataAccess<SimpleFeatureType,SimpleFeature>,DataStore
public class PropertyDataStore extends ContentDataStore
Sample DataStore implementation, please see formal tutorial included with users docs.- Author:
- Jody Garnett, Refractions Research Inc., Torben Barsballe (Boundless)
-
-
Field Summary
Fields Modifier and Type Field Description protected Filedir-
Fields inherited from class ContentDataStore
dataStoreFactory, entries, featureFactory, filterFactory, geometryFactory, JOINED_FEATURE_TYPE, lockingManager, LOGGER, namespaceURI, typeFactory, WRITER_ADD, WRITER_COMMIT, WRITER_UPDATE
-
-
Constructor Summary
Constructors Constructor Description PropertyDataStore(File dir)PropertyDataStore(File dir, String namespaceURI)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContentFeatureSourcecreateFeatureSource(ContentEntry entry)Instantiates new feature source for the entry.voidcreateSchema(SimpleFeatureType featureType)Creates a new schema in the datastore.protected List<Name>createTypeNames()Creates a set of qualified names corresponding to the types that the datastore provides.ServiceInfogetInfo()Information about this service.List<Name>getNames()Returns the same list of names thanContentDataStore.getTypeNames()meaning the returned Names have no namespace set.voidremoveSchema(String typeName)Used to permanently remove a schema from the underlying storagevoidremoveSchema(Name typeName)Used to permanently remove a schema from the underlying storagevoidsetNamespaceURI(String namespaceURI)Sets the namespace uri of the datastore.-
Methods inherited from class ContentDataStore
createContentState, dispose, ensureEntry, ensureFeatureStore, entry, getDataStoreFactory, getEntry, getFeatureFactory, getFeatureReader, getFeatureSource, getFeatureSource, getFeatureSource, getFeatureSource, getFeatureTypeFactory, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getFilterFactory, getGeometryFactory, getLockingManager, getLogger, getNamespaceURI, getSchema, getSchema, getTypeNames, name, removeEntry, setDataStoreFactory, setFeatureFactory, setFeatureTypeFactory, setFilterFactory, setGeometryFactory, updateSchema, updateSchema
-
-
-
-
Field Detail
-
dir
protected File dir
-
-
Method Detail
-
createSchema
public void createSchema(SimpleFeatureType featureType) throws IOException
Description copied from class:ContentDataStoreCreates a new schema in the datastore.This implementation throws a
UnsupportedOperationException. Subclasses should override to support schema creation.- Specified by:
createSchemain interfaceDataAccess<SimpleFeatureType,SimpleFeature>- Overrides:
createSchemain classContentDataStore- Parameters:
featureType- FetureType to add to DataStore- Throws:
IOException- If featureType cannot be created- See Also:
DataAccess.createSchema(FeatureType)
-
getInfo
public ServiceInfo getInfo()
Description copied from interface:DataAccessInformation about this service.This method offers access to a summary of header or metadata information describing the service. Subclasses may return a specific ServiceInfo instance that has additional information (such as FilterCapabilities).
- Specified by:
getInfoin interfaceDataAccess<SimpleFeatureType,SimpleFeature>- Overrides:
getInfoin classContentDataStore- Returns:
- SeviceInfo
-
setNamespaceURI
public void setNamespaceURI(String namespaceURI)
Description copied from class:ContentDataStoreSets the namespace uri of the datastore.This will be used to qualify the entries or types of the datastore.
- Overrides:
setNamespaceURIin classContentDataStore- Parameters:
namespaceURI- The namespace uri, may benull.
-
createTypeNames
protected List<Name> createTypeNames() throws IOException
Description copied from class:ContentDataStoreCreates a set of qualified names corresponding to the types that the datastore provides.Namespaces may be left
nullfor data stores which do not support namespace qualified type names.- Specified by:
createTypeNamesin classContentDataStore- Returns:
- A list of
Name. - Throws:
IOException- Any errors occuring connecting to data.
-
getNames
public List<Name> getNames() throws IOException
Description copied from class:ContentDataStoreReturns the same list of names thanContentDataStore.getTypeNames()meaning the returned Names have no namespace set.- Specified by:
getNamesin interfaceDataAccess<SimpleFeatureType,SimpleFeature>- Overrides:
getNamesin classContentDataStore- Returns:
- Names of the available contents.
- Throws:
IOException- See Also:
DataAccess.getNames()
-
createFeatureSource
protected ContentFeatureSource createFeatureSource(ContentEntry entry) throws IOException
Description copied from class:ContentDataStoreInstantiates new feature source for the entry.Subclasses should override this method to return a specific subclass of
ContentFeatureSource.- Specified by:
createFeatureSourcein classContentDataStore- Parameters:
entry- The entry.- Returns:
- An new instance of
ContentFeatureSourcefor the entry. - Throws:
IOException
-
removeSchema
public void removeSchema(Name typeName) throws IOException
Description copied from interface:DataAccessUsed to permanently remove a schema from the underlying storageThis functionality is similar to an "drop table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
- Specified by:
removeSchemain interfaceDataAccess<SimpleFeatureType,SimpleFeature>- Overrides:
removeSchemain classContentDataStore- Throws:
IOException- if the operation failed- See Also:
DataAccess.removeSchema(Name)
-
removeSchema
public void removeSchema(String typeName) throws IOException
Description copied from interface:DataStoreUsed to permanently remove a schema from the underlying storageThis functionality is similar to an "drop table" statement in SQL. Implementation is optional; it may not be supported by all servers or files.
- Specified by:
removeSchemain interfaceDataStore- Overrides:
removeSchemain classContentDataStore- Throws:
IOException- if the operation failed- See Also:
DataStore.removeSchema(String)
-
-