public class DefaultCoverageAccess extends Object implements CoverageAccess
CoverageAccess.CoverageAccess.AccessType| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Parameter<?>> |
accessParameters |
protected EnumSet<CoverageAccess.AccessType> |
allowedAccessTypes |
protected Map<String,Serializable> |
connectionParameters |
protected Driver |
driver
Driver used to create this CoverageAccess.
|
protected List<Name> |
names |
| Constructor and Description |
|---|
DefaultCoverageAccess(Driver driver,
EnumSet<CoverageAccess.AccessType> allowedAccessTypes,
Map<String,Parameter<?>> accessParams,
Map<String,Serializable> connectionParameters) |
| 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
CoverageSources. |
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. |
protected final Driver driver
protected final EnumSet<CoverageAccess.AccessType> allowedAccessTypes
protected final Map<String,Serializable> connectionParameters
public DefaultCoverageAccess(Driver driver, EnumSet<CoverageAccess.AccessType> allowedAccessTypes, Map<String,Parameter<?>> accessParams, Map<String,Serializable> connectionParameters)
public CoverageSource access(Name name, Map<String,Serializable> params, CoverageAccess.AccessType accessType, Hints hints, ProgressListener listener) throws IOException
CoverageAccessCoverageSource to access a Named Coverage.
access in interface CoverageAccessparams - Additional parameters as needed to indicate what part of the data set to accessaccessType - Requested level of accesslistener - used to report progress while obtianing accessIOExceptionpublic boolean canCreate(Name name, Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
CoverageAccessCoverageStore referred
by Name, with the specified set of parameters.
This method will only return true if getSupportedAccessTypes() == READ_WRITE.
canCreate in interface CoverageAccessparams - Indicate the content to be createdIOExceptionpublic boolean canDelete(Name name, Map<String,Serializable> params, Hints hints) throws IOException
CoverageAccessCoverageSource
referred by Name, with the specified set of parameters.canDelete in interface CoverageAccessIOExceptionpublic CoverageStore create(Name name, Map<String,Serializable> params, Hints hints, ProgressListener listener) throws IOException
CoverageAccessCoverageStore 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.
create in interface CoverageAccessparams - Indicate the content to be createdIOExceptionpublic boolean delete(Name name, Map<String,Serializable> params, Hints hints) throws IOException
CoverageAccessCoverageAccess to entirely remove a certain Coverage from the available
CoverageSources.
Many file based formats won't allow to perform such operation, but db based source should be quite happy with it.
delete in interface CoverageAccesstrue in case of success.IOExceptionpublic Map<String,Parameter<?>> getAccessParameterInfo(CoverageAccess.AccessType accessType)
CoverageAccessCoverageSource.
getAccessParameterInfo in interface CoverageAccessMap describing the Map for #connect(Map).public Map<String,Serializable> getConnectParameters()
CoverageAccessCoverageAccess.getConnectParameters in interface CoverageAccessCoverageAccess.public int getCoveragesNumber(ProgressListener listener)
CoverageAccessgetCoveragesNumber in interface CoverageAccesspublic ServiceInfo getInfo(ProgressListener listener)
CoverageAccessgetInfo in interface CoverageAccesspublic List<Name> getNames(ProgressListener listener)
CoverageAccessEach Coverage named here represents a unique data product that may be accessed via the CoverageSource
getNames in interface CoverageAccesspublic MetadataNode getStorageMetadata(String metadataDomain)
getStorageMetadata in interface CoverageAccesspublic Set<String> getStorageMetadataDomains()
getStorageMetadataDomains in interface CoverageAccesspublic Set<CoverageAccess.AccessType> getSupportedAccessTypes()
CoverageAccessgetSupportedAccessTypes in interface CoverageAccessSet of supported CoverageAccess.AccessTypes for this CoverageAccess
instance.public boolean isCreateSupported()
CoverageAccessCoverageAccess supports creation of a new coverage
storage.
This method will only return true if getSupportedAccessTypes() == READ_WRITE.
isCreateSupported in interface CoverageAccesstrue when removal of of a new coverage storage is supported, false
otherwise.public boolean isDeleteSupported()
CoverageAccessCoverageAccess supports removal of an existing coverage
storage.isDeleteSupported in interface CoverageAccesstrue when removal of an existing coverage storage is supported,
false otherwise.public Driver getDriver()
CoverageAccessDriver which has been used to connect to this CoverageAccess.getDriver in interface CoverageAccessDriver used to connectpublic void dispose()
CoverageAccessOften 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.
dispose in interface CoverageAccessCopyright © 1996–2019 Geotools. All rights reserved.