org.geotools.catalog
Interface Catalog

All Superinterfaces:
Resolve
All Known Implementing Classes:
AbstractCatalog

public interface Catalog
extends Resolve

Extension of Resolve which represents a local catalog or web registry service.

Conceptually provides a searchable Catalog of "Spatial Data Sources". Metadata search is abitrary.

Since:
0.7.0
Author:
David Zwiers, Refractions Research, Justin Deoliveira, The Open Planning Project

Nested Class Summary
 
Nested classes inherited from class org.geotools.catalog.Resolve
Resolve.Status
 
Method Summary
 void add(Service service)
          Adds the specified entry to this catalog.
 java.util.List find(java.net.URI id, ProgressListener monitor)
          Find resources matching this id directly from this Catalog.
 java.util.List findService(java.net.URI query, ProgressListener monitor)
          Find Service matching this id directly from this Catalog.
 CatalogInfo getInfo(ProgressListener monitor)
          Aquire info on this Catalog.
 void remove(Service service)
          Removes the specified entry to this catalog.
 void replace(java.net.URI id, Service service)
          Replaces the specified entry in this catalog.
 java.lang.Object resolve(java.lang.Class adaptee, ProgressListener monitor)
          Will attempt to morph into the adaptee, and return that object.
 java.util.List search(java.lang.String pattern, com.vividsolutions.jts.geom.Envelope bbox, ProgressListener monitor)
          Performs a search on this catalog based on the specified inputs.
 
Methods inherited from interface org.geotools.catalog.Resolve
addListener, canResolve, fire, getIdentifier, getMessage, getStatus, members, parent, removeListener
 

Method Detail

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 - May Be Null
Returns:
Throws:
java.io.IOException - in the result of an I/O error.
See Also:
CatalogInfo, IService

add

public void add(Service service)
         throws java.lang.UnsupportedOperationException
Adds the specified entry to this catalog. In some cases the catalog will be backed onto a server, which may not allow for additions.

An IService may belong to more than one Catalog.

Throws:
java.lang.UnsupportedOperationException

remove

public void remove(Service service)
            throws java.lang.UnsupportedOperationException
Removes the specified entry to this catalog. In some cases the catalog will be backed onto a server, which may not allow for deletions.

Parameters:
service -
Throws:
java.lang.UnsupportedOperationException

replace

public void replace(java.net.URI id,
                    Service service)
             throws java.lang.UnsupportedOperationException
Replaces the specified entry in this catalog. In some cases the catalog will be backed onto a server, which may not allow for deletions.

Parameters:
id -
service -
Throws:
java.lang.UnsupportedOperationException

find

public java.util.List find(java.net.URI id,
                           ProgressListener monitor)
Find resources matching this id directly from this Catalog.

Parameters:
id - used to match resolves
monitor - used to show the progress of the find.
Returns:
List (possibly empty) of resolves (objects implementing the Resolve interface)

findService

public java.util.List findService(java.net.URI query,
                                  ProgressListener monitor)
Find Service matching this id directly from this Catalog. This method is guaranteed to be non-blocking.

Parameters:
monitor - monitor used to watch progress
Returns:
List (possibly empty) of matching services (objects of type Service).

search

public java.util.List search(java.lang.String pattern,
                             com.vividsolutions.jts.geom.Envelope bbox,
                             ProgressListener monitor)
                      throws java.io.IOException
Performs a search on this catalog based on the specified inputs.

The pattern uses the following conventions:

The bbox provided shall be in Lat - Long, or null if the search is not to be contained within a specified area.

Parameters:
pattern - Search pattern (see above)
bbox - The bbox in Lat-Long (ESPG 4269), or null
monitor - for progress, or null if monitoring is not desired
Returns:
List containg objects of type Resolve.
Throws:
java.io.IOException

getInfo

public CatalogInfo getInfo(ProgressListener monitor)
                    throws java.io.IOException
Aquire info on this Catalog.

This is functionally equivalent to: resolve(ICatalogInfo.class,monitor)

Returns:
ICatalogInfo resolve(ICatalogInfo.class,ProgressListener monitor);
Throws:
java.io.IOException
See Also:
resolve(Class, ProgressListener)


Copyright © GeoTools. All Rights Reserved.