public interface CoverageAccess
Please note that this service may be remote (or otherwise slow). You are doing IO here and should treat this class with respect - please do not access these methods from a display thread.
Modifier and Type | Interface and Description |
---|---|
static class |
CoverageAccess.AccessType
Level of access supported.
|
Modifier and Type | Method and Description |
---|---|
CoverageSource |
access(Name name,
Map<String,Serializable> params,
CoverageAccess.AccessType accessType,
Hints hints,
ProgressListener listener)
Retrieve a
CoverageSource to access a Named Coverage. |
boolean |
canCreate(Name name,
Map<String,Serializable> params,
Hints hints,
ProgressListener listener)
Test to see if this coverage access is suitable for creating a
CoverageStore referred
by Name, with the specified set of parameters. |
boolean |
canDelete(Name name,
Map<String,Serializable> params,
Hints hints)
Test to see if this coverage access is suitable for deleting a
CoverageSource
referred by Name, with the specified set of parameters. |
CoverageStore |
create(Name name,
Map<String,Serializable> params,
Hints hints,
ProgressListener listener)
Create a
CoverageStore with the specified name. |
boolean |
delete(Name name,
Map<String,Serializable> params,
Hints hints)
Asks this
CoverageAccess to entirely remove a certain Coverage from the available
CoverageSource s. |
void |
dispose()
This will free any cached info object or header information.
|
Map<String,Parameter<?>> |
getAccessParameterInfo(CoverageAccess.AccessType accessType)
Describes the required (and optional) parameters that can be used to open a
CoverageSource . |
Map<String,Serializable> |
getConnectParameters()
Retrieves the parameters used to connect to this live instance of
CoverageAccess . |
int |
getCoveragesNumber(ProgressListener listener)
The number of Coverages made available.
|
Driver |
getDriver()
Returns the
Driver which has been used to connect to this CoverageAccess. |
ServiceInfo |
getInfo(ProgressListener listener)
Description of the CoverageAccess we are connected to here.
|
List<Name> |
getNames(ProgressListener listener)
Names of the available Coverages.
|
MetadataNode |
getStorageMetadata(String metadataDomain) |
Set<String> |
getStorageMetadataDomains() |
Set<CoverageAccess.AccessType> |
getSupportedAccessTypes()
|
boolean |
isCreateSupported()
Tells me whether or not this
CoverageAccess supports creation of a new coverage
storage. |
boolean |
isDeleteSupported()
Tells me whether or not this
CoverageAccess supports removal of an existing coverage
storage. |
Driver getDriver()
Driver
which has been used to connect to this CoverageAccess.Driver
used to connectServiceInfo getInfo(ProgressListener listener)
Set<CoverageAccess.AccessType> getSupportedAccessTypes()
Set
of supported CoverageAccess.AccessType
s for this CoverageAccess
instance.List<Name> getNames(ProgressListener listener)
Each Coverage named here represents a unique data product that may be accessed via the CoverageSource
IOException
int getCoveragesNumber(ProgressListener listener)
listener
- Map<String,Parameter<?>> getAccessParameterInfo(CoverageAccess.AccessType accessType)
CoverageSource
.
CoverageSource access(Name name, Map<String,Serializable> params, CoverageAccess.AccessType accessType, Hints hints, ProgressListener listener) throws IOException
CoverageSource
to access a Named Coverage.
Name
- Indicate the coverage to accessparams
- Additional parameters as needed to indicate what part of the data set to accessaccessType
- Requested level of accessHints
- Implementation specific hints; please review the javadocs for your Driver for
detailslistener
- used to report progress while obtianing accessIOException
boolean isCreateSupported()
CoverageAccess
supports creation of a new coverage
storage.
This method will only return true if getSupportedAccessTypes() == READ_WRITE.
true
when removal of of a new coverage storage is supported, false
otherwise.boolean canCreate(Name name, Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
CoverageStore
referred
by Name, with the specified set of parameters.
This method will only return true if getSupportedAccessTypes() == READ_WRITE.
Name
- The name of the data set to createparams
- Indicate the content to be createdHints
- Implementations specific Hints, please check the javadocs for your driver for
detailsIOException
CoverageStore create(Name name, Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
CoverageStore
with the specified name.
You can check isCreateSupported() prior to calling this method. Implementing subclasses
may throw an UnsupportedOperationException
in case the related Driver won't allow
CoverageStore
creation.
Name
- The name of the data set to createparams
- Indicate the content to be createdHints
- Implementations specific Hints, please check the javadocs for your driver for
detailsIllegalStateException
- if getSupportedAccessTypes() == READ_ONLYIOException
boolean isDeleteSupported()
CoverageAccess
supports removal of an existing coverage
storage.true
when removal of an existing coverage storage is supported,
false
otherwise.boolean canDelete(Name name, Map<String,Serializable> params, Hints hints) throws IOException
CoverageSource
referred by Name, with the specified set of parameters.Name
- Name of data set to remove fromParams
- Used to indicate what what of the data set to remove; if null
indicate the entire data set should be removedHints
- Implementation specific Hints; please consult the javadocs for the Driver you
are working with.IOException
boolean delete(Name name, Map<String,Serializable> params, Hints hints) throws IOException
CoverageAccess
to entirely remove a certain Coverage from the available
CoverageSource
s.
Many file based formats won't allow to perform such operation, but db based source should be quite happy with it.
name
- params
- accessType
- hints
- true
in case of success.IOException
Map<String,Serializable> getConnectParameters()
CoverageAccess
.CoverageAccess
.void dispose()
Often a CoverageAccess
will keep a file channel open, this will clean that sort of
thing up.
Once a CoverageAccess
has been disposed it can be seen as being in unspecified
state, hence calling a method on it may have unpredictable results.
MetadataNode getStorageMetadata(String metadataDomain)
Copyright © 1996–2019 Geotools. All rights reserved.