net.refractions.udig.catalog.rasterings
Class AbstractRasterService

java.lang.Object
  extended by IService
      extended by net.refractions.udig.catalog.rasterings.AbstractRasterService

public abstract class AbstractRasterService
extends IService

Provides a handle to a raster service allowing the service to be lazily loaded.

This class provides functionality common to services attached to GridCoverage based resources.

Since:
0.6.0
Author:
mleslie

Field Summary
protected  java.lang.Exception message
          message field reports any errors encountered.
protected  GridCoverageReader reader
          reader field
protected  Status status
          status field describes the status of the service
 
Constructor Summary
AbstractRasterService(java.net.URL id, GridFormatFactorySpi factory)
          Construct AbstractRasterService.
 
Method Summary
<T> boolean
canResolve(java.lang.Class<T> adaptee)
          Adapts to to provide GridCoverageReader
 java.util.Map<java.lang.String,java.io.Serializable> getConnectionParams()
           
 java.lang.String getDescription()
          Retrieves the string identifying this service.
 java.lang.Object getFormat()
          Finds or creates the GridFormat object describing the service.
 java.net.URL getIdentifier()
           
abstract  IServiceInfo getInfo(IProgressMonitor monitor)
           
 java.lang.Throwable getMessage()
           
 GridCoverageReader getReader(IProgressMonitor monitor)
          Finds or creates the Reader used to access this service.
 Status getStatus()
           
 java.lang.String getTitle()
          Retrieves a relatively human readable title for this service.
abstract  java.util.List<AbstractRasterGeoResource> members(IProgressMonitor monitor)
           
<T> T
resolve(java.lang.Class<T> adaptee, IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

status

protected Status status
status field describes the status of the service


message

protected java.lang.Exception message
message field reports any errors encountered. May be null.


reader

protected GridCoverageReader reader
reader field

Constructor Detail

AbstractRasterService

public AbstractRasterService(java.net.URL id,
                             GridFormatFactorySpi factory)
Construct AbstractRasterService.

Parameters:
id -
factory -
Method Detail

canResolve

public <T> boolean canResolve(java.lang.Class<T> adaptee)
Adapts to to provide GridCoverageReader


getStatus

public Status getStatus()

getMessage

public java.lang.Throwable getMessage()

getIdentifier

public java.net.URL getIdentifier()

getFormat

public java.lang.Object getFormat()
Finds or creates the GridFormat object describing the service.

Returns:
GridFormat describing this coverage.

getReader

public GridCoverageReader getReader(IProgressMonitor monitor)
Finds or creates the Reader used to access this service. Apon any exception, the message field is populated and null is returned.

Returns:
Reader linked to this service.

getDescription

public java.lang.String getDescription()
Retrieves the string identifying this service. This is the location of the resource to be loaded.

Returns:
String describing this service.

getTitle

public java.lang.String getTitle()
Retrieves a relatively human readable title for this service.

Returns:
Title of this service

resolve

public <T> T resolve(java.lang.Class<T> adaptee,
                     IProgressMonitor monitor)
          throws java.io.IOException
Throws:
java.io.IOException

members

public abstract java.util.List<AbstractRasterGeoResource> members(IProgressMonitor monitor)
                                                           throws java.io.IOException
Throws:
java.io.IOException

getConnectionParams

public java.util.Map<java.lang.String,java.io.Serializable> getConnectionParams()

getInfo

public abstract IServiceInfo getInfo(IProgressMonitor monitor)
                              throws java.io.IOException
Throws:
java.io.IOException