org.geotools.data.property
Class PropertyDataStore

java.lang.Object
  extended by org.geotools.data.AbstractDataStore
      extended by org.geotools.data.property.PropertyDataStore
All Implemented Interfaces:
DataAccess<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>, DataStore

public class PropertyDataStore
extends AbstractDataStore

Sample DataStore implementation, please see formal tutorial included with users docs.

Author:
Jody Garnett, Refractions Research Inc.

Field Summary
protected  java.io.File directory
           
protected  java.lang.String namespaceURI
           
 
Fields inherited from class org.geotools.data.AbstractDataStore
isWriteable, listenerManager, LOGGER
 
Constructor Summary
PropertyDataStore(java.io.File dir)
           
PropertyDataStore(java.io.File dir, java.lang.String namespaceURI)
           
 
Method Summary
 void createSchema(org.opengis.feature.simple.SimpleFeatureType featureType)
          Subclass should implement to provide writing support.
protected  FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureReader(java.lang.String typeName)
          Subclass must implement.
 FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureSource(java.lang.String typeName)
          Default implementation based on getFeatureReader and getFeatureWriter.
protected  FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureWriter(java.lang.String typeName)
          Subclass can implement this to provide writing support.
 ServiceInfo getInfo()
          Information about this service.
 org.opengis.feature.simple.SimpleFeatureType getSchema(java.lang.String typeName)
          Retrive schema information for typeName
 java.lang.String[] getTypeNames()
          helper method for retrieving all the names.
 void setNamespaceURI(java.lang.String namespaceURI)
           
 
Methods inherited from class org.geotools.data.AbstractDataStore
createFeatureWriter, createLockingManager, createMetadata, dispose, getBounds, getCount, getFeatureReader, getFeatureReader, getFeatureSource, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getLockingManager, getNames, getSchema, getSupportedHints, getUnsupportedFilter, getView, state, updateSchema, updateSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

protected java.io.File directory

namespaceURI

protected java.lang.String namespaceURI
Constructor Detail

PropertyDataStore

public PropertyDataStore(java.io.File dir)

PropertyDataStore

public PropertyDataStore(java.io.File dir,
                         java.lang.String namespaceURI)
Method Detail

getInfo

public ServiceInfo getInfo()
Description copied from interface: DataAccess
Information 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:
getInfo in interface DataAccess<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
Overrides:
getInfo in class AbstractDataStore
Returns:
SeviceInfo

setNamespaceURI

public void setNamespaceURI(java.lang.String namespaceURI)

getTypeNames

public java.lang.String[] getTypeNames()
Description copied from class: AbstractDataStore
helper method for retrieving all the names.

Specified by:
getTypeNames in interface DataStore
Specified by:
getTypeNames in class AbstractDataStore
Returns:
typeNames for available FeatureTypes.

getSchema

public org.opengis.feature.simple.SimpleFeatureType getSchema(java.lang.String typeName)
                                                       throws java.io.IOException
Description copied from class: AbstractDataStore
Retrive schema information for typeName

Specified by:
getSchema in interface DataStore
Specified by:
getSchema in class AbstractDataStore
Parameters:
typeName - typeName of requested FeatureType
Returns:
FeatureType for the provided typeName
Throws:
java.io.IOException - If typeName cannot be found

getFeatureReader

protected FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureReader(java.lang.String typeName)
                                                                                                                         throws java.io.IOException
Description copied from class: AbstractDataStore
Subclass must implement.

Specified by:
getFeatureReader in class AbstractDataStore
Returns:
FeatureReader over contents of typeName
Throws:
java.io.IOException

getFeatureWriter

protected FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureWriter(java.lang.String typeName)
                                                                                                                         throws java.io.IOException
Description copied from class: AbstractDataStore
Subclass can implement this to provide writing support.

Overrides:
getFeatureWriter in class AbstractDataStore
Returns:
FeatureWriter over contents of typeName
Throws:
java.io.IOException

createSchema

public void createSchema(org.opengis.feature.simple.SimpleFeatureType featureType)
                  throws java.io.IOException
Description copied from class: AbstractDataStore
Subclass should implement to provide writing support.

Specified by:
createSchema in interface DataAccess<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
Overrides:
createSchema in class AbstractDataStore
Parameters:
featureType - Requested FeatureType
Throws:
java.io.IOException

getFeatureSource

public FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureSource(java.lang.String typeName)
                                                                                                                      throws java.io.IOException
Description copied from class: AbstractDataStore
Default implementation based on getFeatureReader and getFeatureWriter.

We should be able to optimize this to only get the RowSet once

Specified by:
getFeatureSource in interface DataStore
Overrides:
getFeatureSource in class AbstractDataStore
Returns:
FeatureSource (or subclass) providing operations for typeName
Throws:
java.io.IOException
See Also:
DataStore.getFeatureSource(java.lang.String)


Copyright © 1996-2010 Geotools. All Rights Reserved.