|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.shapefile.ShapefileDataStoreFactory
public class ShapefileDataStoreFactory
Implementation of the DataStore service provider interface for Shapefiles.
The specific implementation of ShapefileDataStore created by this class is not specified. For more information on the connection parameters please review the following public Param constants.
URLP
NAMESPACEP
CREATE_SPATIAL_INDEX
MEMORY_MAPPED
DBFCHARSET
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.geotools.data.DataAccessFactory |
---|
DataAccessFactory.Param |
Field Summary | |
---|---|
static DataAccessFactory.Param |
CREATE_SPATIAL_INDEX
Optional - Enable/disable the automatic creation of spatial index |
static DataAccessFactory.Param |
DBFCHARSET
Optional - character used to decode strings from the DBF file |
static java.util.logging.Logger |
LOGGER
|
static DataAccessFactory.Param |
MEMORY_MAPPED
Optional - enable/disable the use of memory-mapped io |
static DataAccessFactory.Param |
NAMESPACEP
Optional - uri of the FeatureType's namespace |
static DataAccessFactory.Param |
URLP
url to the .shp file. |
Constructor Summary | |
---|---|
ShapefileDataStoreFactory()
|
Method Summary | |
---|---|
boolean |
canProcess(java.util.Map params)
Takes a map of parameters which describes how to access a DataStore and determines if it can be read by the ShapefileDataStore or IndexedShapefileDataStore implementations. |
boolean |
canProcess(java.net.URL f)
Tests if the provided url can be handled by this factory. |
ShapefileDataStore |
createDataStore(java.util.Map params)
Returns an instance of DataStore iff the resource pointed to the Map of paramers can be handled as a shapefile. |
FileDataStore |
createDataStore(java.net.URL url)
We may need to create a new datastore if the provided file does not exist. |
DataStore |
createDataStore(java.net.URL url,
boolean memorymapped)
|
FileDataStore |
createNewDataStore(java.util.Map params)
Creates a new DataStore - for a file that does not exist yet. |
java.lang.String |
getDescription()
Describes the type of data the datastore returned by this factory works with. |
java.lang.String |
getDisplayName()
Name suitable for display to end user. |
java.lang.String[] |
getFileExtensions()
The list of filename extentions handled by this factory. |
java.util.Map |
getImplementationHints()
Returns the implementation hints. |
DataAccessFactory.Param[] |
getParametersInfo()
Describe parameters. |
java.lang.String |
getTypeName(java.net.URL url)
The typeName represented by the provided url. |
boolean |
isAvailable()
Test to see if this datastore is available, if it has all the appropriate libraries to construct a datastore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.logging.Logger LOGGER
public static final DataAccessFactory.Param URLP
public static final DataAccessFactory.Param NAMESPACEP
public static final DataAccessFactory.Param MEMORY_MAPPED
public static final DataAccessFactory.Param CREATE_SPATIAL_INDEX
public static final DataAccessFactory.Param DBFCHARSET
Constructor Detail |
---|
public ShapefileDataStoreFactory()
Method Detail |
---|
public boolean canProcess(java.util.Map params)
canProcess
in interface DataAccessFactory
params
- A map of parameters describing the location of a
datastore. Files should be pointed to by a 'url' param.
public ShapefileDataStore createDataStore(java.util.Map params) throws java.io.IOException
The specific implementation of ShapefileDataStore returned is not specified, and depends on the parameters given. For more information please review the public static Param instances available for this class.
URLP
NAMESPACEP
CREATE_SPATIAL_INDEX
MEMORY_MAPPED
DBFCHARSET
createDataStore
in interface DataAccessFactory
createDataStore
in interface DataStoreFactorySpi
params
- A param list with information on the location of a
restore. For shapefiles this should contain a 'url' param
which points to a file which ends in shp.
java.io.IOException
- If a connection error (such as the file not existing
occurs)
DataSourceException
- Thrown if the datastore which is created cannot be
attached to the restore specified in params.public FileDataStore createNewDataStore(java.util.Map params) throws java.io.IOException
This method has different logic than createDataStore. It is willing to be memory mapped, and generate an index for a local file that does not exist yet.
createNewDataStore
in interface DataStoreFactorySpi
java.io.IOException
public java.lang.String getDisplayName()
DataAccessFactory
A non localized display name for this data store type.
getDisplayName
in interface DataAccessFactory
public java.lang.String getDescription()
getDescription
in interface DataAccessFactory
public boolean isAvailable()
isAvailable
in interface DataAccessFactory
public DataAccessFactory.Param[] getParametersInfo()
getParametersInfo
in interface DataAccessFactory
DataAccessFactory.getParametersInfo()
public java.lang.String[] getFileExtensions()
FileDataStoreFactorySpi
getFileExtensions
in interface FileDataStoreFactorySpi
org.geotools.data.dir.FileDataStoreFactorySpi#getFileExtensions()
public boolean canProcess(java.net.URL f)
FileDataStoreFactorySpi
canProcess
in interface FileDataStoreFactorySpi
f
- URL to a real file (may not be local)
true
if this url can when this dataStore can resolve and read the data specifiedorg.geotools.data.dir.FileDataStoreFactorySpi#canProcess(java.net.URL)
public FileDataStore createDataStore(java.net.URL url) throws java.io.IOException
createDataStore
in interface FileDataStoreFactorySpi
url
- The data location for the
java.io.IOException
org.geotools.data.dir.FileDataStoreFactorySpi#createDataStore(java.net.URL)
public DataStore createDataStore(java.net.URL url, boolean memorymapped) throws java.io.IOException
java.io.IOException
org.geotools.data.dir.FileDataStoreFactorySpi#createDataStore(java.net.URL)
public java.lang.String getTypeName(java.net.URL url) throws java.io.IOException
FileDataStoreFactorySpi
getTypeName
in interface FileDataStoreFactorySpi
url
- The location of the datum to parse into features
java.io.IOException
org.geotools.data.dir.FileDataStoreFactorySpi#getTypeName(java.net.URL)
public java.util.Map getImplementationHints()
When we have FeatureFactory, GeometryFactory and so on hooked up this map will return Hints we paid attention too when we were constructed.
getImplementationHints
in interface Factory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |