Class IncompatibleResourceException
Object
Throwable
Exception
DataStoreException
IncompatibleResourceException
- All Implemented Interfaces:
Serializable
,LocalizedException
Thrown when a write operation cannot be performed because the resource to write
is incompatible with the data store.
For example, the file format may have restrictions that prevent the encoding of the coordinate
reference system used by the resource. The
getAspects()
method can help to identify
which aspects (class, CRS, etc.) are the causes of the incompatibility.- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an exception with no cause and no details message.IncompatibleResourceException
(String message) Creates an exception with the specified details message.IncompatibleResourceException
(String message, Throwable cause) Creates an exception with the specified details message and cause. -
Method Summary
Modifier and TypeMethodDescriptionaddAspect
(String name) Adds an identification of the aspect which is the cause of the incompatibility.Returns identifications of the aspects which are causes of the incompatibility.Methods inherited from class DataStoreException
getInternationalMessage, getLocalizedMessage, getMessage, initCause
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IncompatibleResourceException
public IncompatibleResourceException()Creates an exception with no cause and no details message. -
IncompatibleResourceException
Creates an exception with the specified details message.- Parameters:
message
- the detail message.
-
IncompatibleResourceException
-
-
Method Details
-
addAspect
Adds an identification of the aspect which is the cause of the incompatibility. It should be the name of a property such as"crs"
or"gridToCRS"
. SeegetAspects()
for a list of suggested values.- Parameters:
name
- an identification of the aspect which is incompatible.- Returns:
this
for method call chaining.- Since:
- 1.5
-
getAspects
Returns identifications of the aspects which are causes of the incompatibility. Some values are:"class"
: the resources is not an instance of the class expected by the writer."crs"
: the coordinate reference system cannot be encoded."gridToCRS"
: the "grid to CRS" component of the grid geometry of a raster cannot be encoded."gridGeometry"
: the grid geometry of a raster cannot be encoded for reason less specific thangridToCRS
."raster"
: the raster data cannot be encoded."unit"
: the unit of measurement cannot be encoded.
- Returns:
- identifications of aspects which are incompatible.
- Since:
- 1.5
-