org.geotools.catalog.shapefile
Class ShapefileGeoResource

java.lang.Object
  extended byorg.geotools.catalog.AbstractGeoResource
      extended byorg.geotools.catalog.shapefile.ShapefileGeoResource
All Implemented Interfaces:
GeoResource, Resolve

public class ShapefileGeoResource
extends AbstractGeoResource


Nested Class Summary
 
Nested classes inherited from class org.geotools.catalog.Resolve
Resolve.Status
 
Method Summary
 boolean canResolve(java.lang.Class adaptee)
          Non blocking method which is used to determine if a resolve into an instance of a particular class is supported.
protected  FeatureSource getFeatureSource(ProgressListener monitor)
           
 java.net.URI getIdentifier()
          Returns a URI which uniqley identifies the Resolve.
 GeoResourceInfo getInfo(ProgressListener monitor)
          Blocking operation to describe this service.
 java.lang.Throwable getMessage()
          In the event that an error occurs during a resolve, that error can be reported back with this method.
 Resolve.Status getStatus()
          Status of the resolve.
 java.lang.Object resolve(java.lang.Class adaptee, ProgressListener monitor)
          Blocking operation to resolve into the adaptee, if available.
 
Methods inherited from class org.geotools.catalog.AbstractGeoResource
addListener, equals, fire, hashCode, members, parent, removeListener, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

canResolve

public boolean canResolve(java.lang.Class adaptee)
Description copied from interface: Resolve
Non blocking method which is used to determine if a resolve into an instance of a particular class is supported.

Parameters:
adaptee - Class of object to resolve into.
Returns:
true if a resolution for adaptee is avaialble
See Also:
IResolve#resolve(Class,ProgressListener)

resolve

public java.lang.Object resolve(java.lang.Class adaptee,
                                ProgressListener monitor)
                         throws java.io.IOException
Description copied from interface: GeoResource
Blocking operation to resolve into the adaptee, if available.

Required adaptions:

Example (no casting required):


 IGeoResourceInfo info = resovle(IGeoResourceInfo.class);
 

Recommendated adaptions:

Parameters:
adaptee -
monitor -
Returns:
instance of adaptee, or null if unavailable (IGeoResourceInfo and IService must be supported)
Throws:
java.io.IOException - DOCUMENT ME!
See Also:
GeoResourceInfo, IService, IResolve#resolve(Class, ProgressListener)

getInfo

public GeoResourceInfo getInfo(ProgressListener monitor)
                        throws java.io.IOException
Description copied from interface: GeoResource
Blocking operation to describe this service.

As an example this method is used by LabelDecorators to aquire title, and icon.

Parameters:
monitor - DOCUMENT ME!
Returns:
IGeoResourceInfo resolve(IGeoResourceInfo.class,ProgressListener monitor);
Throws:
java.io.IOException - DOCUMENT ME!
See Also:
GeoResource.resolve(Class, ProgressListener)

getFeatureSource

protected FeatureSource getFeatureSource(ProgressListener monitor)
                                  throws java.io.IOException
Throws:
java.io.IOException

getStatus

public Resolve.Status getStatus()
Description copied from interface: Resolve
Status of the resolve. Resolving into other types of objects often involves connecting to a remote service or resource. This method is provided to indicate the state of any connections.

Returns:
One of Resolve.Status.BROKEN,Resolve.Status.CONNECTED, or Resolve.Status.NOTCONNECTED.

getMessage

public java.lang.Throwable getMessage()
Description copied from interface: Resolve
In the event that an error occurs during a resolve, that error can be reported back with this method. This method returns a value when Resolve.getStatus() returns Resolve.Status.BROKEN, otherwise it return null.

Returns:
An exception that occured during a resolve, otherwise null.
See Also:
Resolve.Status

getIdentifier

public java.net.URI getIdentifier()
Description copied from interface: Resolve
Returns a URI which uniqley identifies the Resolve.

Returns:
Id of the Resolve, should never be null.


Copyright © GeoTools. All Rights Reserved.