org.geotools.catalog
Interface Service

All Superinterfaces:
Resolve
All Known Implementing Classes:
AbstractService

public interface Service
extends Resolve

Represents a geo spatial service handle. Follows the same design as IResource.

Represents a spatial service, which may be lazily loaded. The existance of this object does not ensure that the advertized data is guaranteed to exist, nor does this interface guarantee that the service exists based on this object's existance. We should also note the resource management is left to the user, and that resolve() is not guaranteed to return the same instance object from two subsequent calls, but may. This is merely a handle to some information about a service, and a method of aquiring an instance of the service ...

NOTE: This may be the result of communications with a metadata service, and as such this service handle may not have been validated yet. Remember to check the service status.

Since:
0.6
Author:
David Zwiers, Refractions Research, Justin Deoliveira, The Open Planning Project
See Also:
ServiceInfo, ServiceFinder

Nested Class Summary
 
Nested classes inherited from class org.geotools.catalog.Resolve
Resolve.Status
 
Method Summary
 java.util.Map getConnectionParams()
          Accessor to the set of params used to create this entry.
 ServiceInfo getInfo(ProgressListener monitor)
           
 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 interface org.geotools.catalog.Resolve
addListener, canResolve, fire, getIdentifier, getMessage, getStatus, parent, removeListener
 

Method Detail

members

public java.util.List members(ProgressListener monitor)
                       throws java.io.IOException
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.

Specified by:
members in interface Resolve
Parameters:
monitor - Progress monitor used to report status while blocking. May be null.
Returns:
A list of type GeoResource.
Throws:
java.io.IOException - in the result of an I/O error.

resolve

public java.lang.Object resolve(java.lang.Class adaptee,
                                ProgressListener monitor)
                         throws java.io.IOException
Will attempt to morph into the adaptee, and return that object. Required adaptions: May Block.

Specified by:
resolve in interface Resolve
Parameters:
adaptee -
monitor -
Returns:
instance of adaptee, or null if unavailable (IServiceInfo and List must be supported)
Throws:
java.io.IOException - in the result of an I/O error.
See Also:
ServiceInfo, GeoResource, IResolve#resolve(Class, ProgressListener)

getConnectionParams

public java.util.Map getConnectionParams()
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

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)


Copyright © GeoTools. All Rights Reserved.