public class CSVDataStore extends ContentDataStore implements FileDataStore
dataStoreFactory, entries, featureFactory, filterFactory, geometryFactory, JOINED_FEATURE_TYPE, lockingManager, LOGGER, namespaceURI, typeFactory, WRITER_ADD, WRITER_COMMIT, WRITER_UPDATE
Constructor and Description |
---|
CSVDataStore(CSVFileState csvFileState,
CSVStrategy csvStrategy) |
Modifier and Type | Method and Description |
---|---|
protected ContentFeatureSource |
createFeatureSource(ContentEntry entry)
Instantiates new feature source for the entry.
|
void |
createSchema(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.
|
CSVStrategy |
getCSVStrategy() |
FeatureReader<SimpleFeatureType,SimpleFeature> |
getFeatureReader() |
SimpleFeatureSource |
getFeatureSource() |
FeatureWriter<SimpleFeatureType,SimpleFeature> |
getFeatureWriter(Filter filter,
Transaction transaction) |
FeatureWriter<SimpleFeatureType,SimpleFeature> |
getFeatureWriter(Transaction transaction) |
FeatureWriter<SimpleFeatureType,SimpleFeature> |
getFeatureWriterAppend(Transaction transaction) |
SimpleFeatureType |
getSchema()
FeatureType for the file being read.
|
Name |
getTypeName() |
void |
updateSchema(SimpleFeatureType featureType) |
createContentState, dispose, ensureEntry, ensureFeatureStore, entry, getDataStoreFactory, getEntry, getFeatureFactory, getFeatureReader, getFeatureSource, getFeatureSource, getFeatureSource, getFeatureSource, getFeatureTypeFactory, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getFilterFactory, getGeometryFactory, getInfo, getLockingManager, getLogger, getNames, getNamespaceURI, getSchema, getSchema, getTypeNames, name, removeEntry, removeSchema, removeSchema, setDataStoreFactory, setFeatureFactory, setFeatureTypeFactory, setFilterFactory, setGeometryFactory, setNamespaceURI, updateSchema, updateSchema
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeatureReader, getFeatureSource, getFeatureSource, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getLockingManager, getSchema, getTypeNames, removeSchema, updateSchema
dispose, getInfo, getNames, getSchema, removeSchema, updateSchema
public CSVDataStore(CSVFileState csvFileState, CSVStrategy csvStrategy)
public Name getTypeName()
protected List<Name> createTypeNames() throws IOException
ContentDataStore
Namespaces may be left null
for data stores which do not support namespace
qualified type names.
createTypeNames
in class ContentDataStore
Name
.IOException
- Any errors occuring connecting to data.protected ContentFeatureSource createFeatureSource(ContentEntry entry) throws IOException
ContentDataStore
Subclasses should override this method to return a specific subclass of ContentFeatureSource
.
createFeatureSource
in class ContentDataStore
entry
- The entry.ContentFeatureSource
for the entry.IOException
public SimpleFeatureType getSchema() throws IOException
FileDataStore
This is the same as getSchema( getTypeName[0] )
getSchema
in interface FileDataStore
IOException
DataStore.getSchema(java.lang.String)
public void updateSchema(SimpleFeatureType featureType) throws IOException
updateSchema
in interface FileDataStore
IOException
DataStore.updateSchema(java.lang.String,SimpleFeatureType)
public SimpleFeatureSource getFeatureSource() throws IOException
getFeatureSource
in interface FileDataStore
IOException
DataStore.getFeatureSource(java.lang.String)
public FeatureReader<SimpleFeatureType,SimpleFeature> getFeatureReader() throws IOException
getFeatureReader
in interface FileDataStore
IOException
org.geotools.data.DataStore#getFeatureReader(java.lang.String)
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(Filter filter, Transaction transaction) throws IOException
getFeatureWriter
in interface FileDataStore
IOException
org.geotools.data.DataStore#getFeatureWriter(Filter,Transaction)
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriter(Transaction transaction) throws IOException
getFeatureWriter
in interface FileDataStore
IOException
DataStore.getFeatureWriter(java.lang.String,
org.geotools.data.Transaction)
public FeatureWriter<SimpleFeatureType,SimpleFeature> getFeatureWriterAppend(Transaction transaction) throws IOException
getFeatureWriterAppend
in interface FileDataStore
IOException
DataStore.getFeatureWriterAppend(java.lang.String,
org.geotools.data.Transaction)
public CSVStrategy getCSVStrategy()
public void createSchema(SimpleFeatureType featureType) throws IOException
ContentDataStore
This implementation throws aUnsupportedOperationException
. Subclasses should
override to support schema creation.
createSchema
in interface DataAccess<SimpleFeatureType,SimpleFeature>
createSchema
in class ContentDataStore
featureType
- FetureType to add to DataStoreIOException
- If featureType cannot be createdDataAccess.createSchema(FeatureType)
Copyright © 1996–2023 Geotools. All rights reserved.