|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractDataStore
PropertyDataStore
public class PropertyDataStore
Sample DataStore implementation, please see formal tutorial included with users docs.
Field Summary | |
---|---|
protected File |
directory
|
protected String |
namespaceURI
|
Fields inherited from class AbstractDataStore |
---|
isWriteable, listenerManager, LOGGER |
Constructor Summary | |
---|---|
PropertyDataStore(File dir)
|
|
PropertyDataStore(File dir,
String namespaceURI)
|
Method Summary | |
---|---|
protected FeatureWriter<SimpleFeatureType,SimpleFeature> |
createFeatureWriter(String typeName,
Transaction transaction)
Subclass should implement this to provide writing support. |
void |
createSchema(SimpleFeatureType featureType)
Subclass should implement to provide writing support. |
protected ReferencedEnvelope |
getBounds(Query query)
Computes the bounds of the features for the specified feature type that satisfy the query provided that there is a fast way to get that result. |
protected int |
getCount(Query query)
Gets the number of the features that would be returned by this query for the specified feature type. |
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader(String typeName)
Subclass must implement. |
SimpleFeatureSource |
getFeatureSource(String typeName)
Default implementation based on getFeatureReader and getFeatureWriter. |
ServiceInfo |
getInfo()
Information about this service. |
List<Name> |
getNames()
Returns the same list of names than AbstractDataStore.getTypeNames() meaning the
returned Names have no namespace set. |
SimpleFeatureType |
getSchema(String typeName)
Retrive schema information for typeName |
String[] |
getTypeNames()
helper method for retrieving all the names. |
void |
setNamespaceURI(String namespaceURI)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File directory
protected String namespaceURI
Constructor Detail |
---|
public PropertyDataStore(File dir)
public PropertyDataStore(File dir, String namespaceURI)
Method Detail |
---|
public void createSchema(SimpleFeatureType featureType) throws IOException
AbstractDataStore
createSchema
in interface DataAccess<SimpleFeatureType,SimpleFeature>
createSchema
in class AbstractDataStore
featureType
- Requested FeatureType
IOException
public ServiceInfo getInfo()
DataAccess
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).
getInfo
in interface DataAccess<SimpleFeatureType,SimpleFeature>
getInfo
in class AbstractDataStore
public void setNamespaceURI(String namespaceURI)
public String[] getTypeNames()
AbstractDataStore
getTypeNames
in interface DataStore
getTypeNames
in class AbstractDataStore
DataStore
public List<Name> getNames() throws IOException
AbstractDataStore
AbstractDataStore.getTypeNames()
meaning the
returned Names have no namespace set.
getNames
in interface DataAccess<SimpleFeatureType,SimpleFeature>
getNames
in class AbstractDataStore
IOException
DataAccess.getNames()
public SimpleFeatureType getSchema(String typeName) throws IOException
AbstractDataStore
getSchema
in interface DataStore
getSchema
in class AbstractDataStore
typeName
- the feature type name
IOException
- if typeName
is not availableprotected FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader(String typeName) throws IOException
AbstractDataStore
getFeatureReader
in class AbstractDataStore
IOException
protected FeatureWriter<SimpleFeatureType,SimpleFeature> createFeatureWriter(String typeName, Transaction transaction) throws IOException
AbstractDataStore
A feature writer writes to the resource so it should considered to always be committing. The transaction is passed in so that it can be known what FeatureListeners should be notified of the changes. If the Transaction is AUTOCOMMIT then all listeners should be notified. If not all listeners that are NOT registered with that transaction should be notified.
createFeatureWriter
in class AbstractDataStore
transaction
- a feature writer
IOException
protected int getCount(Query query) throws IOException
AbstractDataStore
If getBounds(Query) returns -1
due to expense consider
using getFeatures(Query).getCount()
as a an alternative.
getCount
in class AbstractDataStore
query
- Contains the Filter and MaxFeatures to find the bounds for.
-1
if count is too expensive to calculate or any errors or occur.
IOException
protected ReferencedEnvelope getBounds(Query query) throws IOException
AbstractDataStore
Will return null if there is not fast way to compute the bounds. Since it's based on some kind of header/cached information, it's not guaranteed to be real bound of the features
getBounds
in class AbstractDataStore
SchemaNotFoundException
IOException
public SimpleFeatureSource getFeatureSource(String typeName) throws IOException
AbstractDataStore
We should be able to optimize this to only get the RowSet once
getFeatureSource
in interface DataStore
getFeatureSource
in class AbstractDataStore
typeName
- the feature type
SimpleFeatureSource
(or possibly a subclass) providing
operations for features of the specified type
IOException
- if data access errors occurDataStore.getFeatureSource(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |