Package org.geotools.api.data
Class FileDataStoreFinder
Object
FileDataStoreFinder
Most of this code was copied from DataStoreFinder. See the Documentation there for details.
This searches for DataStores which support a singular file parsed in a particular file format.
- Author:
- dzwiers
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Iterator<FileDataStoreFactorySpi>
Returns an iterator of FileDataStoreFactorySpi to allow for the easy creation of a FileDataStoreGo through each file DataStore and check what file extentions are supported.static FileDataStore
getDataStore
(File file) Checks each available datasource implementation in turn and returns the first one which claims to support the given file..static FileDataStore
getDataStore
(URL url) Checks each available datasource implementation in turn and returns the first one which claims to support the resource identified by the params object.static FileDataStoreFactorySpi
getDataStoreFactory
(String extension) Used to look up a FileDataStoreFactorySpi by extension.
-
Field Details
-
LOGGER
The logger for the filter module.
-
-
Method Details
-
getDataStore
Checks each available datasource implementation in turn and returns the first one which claims to support the given file..- Parameters:
file
- the file- Returns:
- The first datasource which claims to process the required resource, returns null if none can be found.
- Throws:
IOException
- If a suitable loader can be found, but it can not be attached to the specified resource without errors.
-
getDataStore
Checks each available datasource implementation in turn and returns the first one which claims to support the resource identified by the params object.- Parameters:
url
- URL for the input resource- Returns:
- The first datasource which claims to process the required resource, returns null if none can be found.
- Throws:
IOException
- If a suitable loader can be found, but it can not be attached to the specified resource without errors.
-
getDataStoreFactory
Used to look up a FileDataStoreFactorySpi by extension.- Parameters:
extension
- Extension such as "shp"- Returns:
- FileDataStoreFactorySpi
-
getAvailableDataStores
Returns an iterator of FileDataStoreFactorySpi to allow for the easy creation of a FileDataStore- See Also:
-
getAvailableFileExtentions
Go through each file DataStore and check what file extentions are supported.- Returns:
- Set of supported file extensions
-