org.geotools.catalog.shapefile
Class ShapefileService

java.lang.Object
  extended byorg.geotools.catalog.AbstractService
      extended byorg.geotools.catalog.shapefile.ShapefileService
All Implemented Interfaces:
Resolve, Service

public class ShapefileService
extends AbstractService

Implementation of a service handle for shapefiles.

See Also:
org.geotools.gtcatalog.Service

Nested Class Summary
 
Nested classes inherited from class org.geotools.catalog.Resolve
Resolve.Status
 
Constructor Summary
ShapefileService(Catalog parent, java.net.URI uri, java.util.Map params)
           
 
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.
 java.util.Map getConnectionParams()
          Accessor to the set of params used to create this entry.
protected  ShapefileDataStore getDataStore(ProgressListener monitor)
           
 java.net.URI getIdentifier()
          Returns a URI which uniqley identifies the Resolve.
 ServiceInfo getInfo(ProgressListener monitor)
           
 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.util.List members(ProgressListener monitor)
          Return list of IGeoResources managed by this service.
 java.lang.Object resolve(java.lang.Class adaptee, ProgressListener monitor)
          Will attempt to morph into the adaptee, and return that object.
 
Methods inherited from class org.geotools.catalog.AbstractService
addListener, equals, fire, hashCode, parent, removeListener, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShapefileService

public ShapefileService(Catalog parent,
                        java.net.URI uri,
                        java.util.Map params)
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: Service
Will attempt to morph into the adaptee, and return that object. Required adaptions: May Block.

Parameters:
adaptee -
monitor -
Returns:
instance of adaptee, or null if unavailable (IServiceInfo and List must be supported)
Throws:
java.io.IOException
See Also:
ServiceInfo, GeoResource, IResolve#resolve(Class, ProgressListener)

getInfo

public ServiceInfo getInfo(ProgressListener monitor)
                    throws java.io.IOException
Returns:
IServiceInfo resolve(IServiceInfo.class,ProgressListener monitor);
Throws:
java.io.IOException
See Also:
IService#resolve(Class, ProgressListener)

getDataStore

protected ShapefileDataStore getDataStore(ProgressListener monitor)
                                   throws java.io.IOException
Throws:
java.io.IOException

members

public java.util.List members(ProgressListener monitor)
                       throws java.io.IOException
Description copied from interface: Service
Return list of IGeoResources managed by this service. This method must return the same result as the following:
   
   (List)resolve(List.class,monitor);
   
 

Many file based serivces will just contain a single IGeoResource.

Returns:
A list of type GeoResource.
Throws:
java.io.IOException

getConnectionParams

public java.util.Map getConnectionParams()
Description copied from interface: Service
Accessor to the set of params used to create this entry. There is no guarantee that these params created a usable service (@see getStatus() ). These params may have been modified within the factory during creation. This method is intended to be used for cloning (@see IServiceFactory) or for persistence between sessions.

Returns:
A map with key of type String, and value of type Serializable.
See Also:
ServiceFinder

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.