org.geotools.catalog
Class AbstractGeoResource

Object
  extended by AbstractGeoResource
All Implemented Interfaces:
GeoResource, Resolve
Direct Known Subclasses:
AbstractFileGeoResource, FeatureSourceGeoResource, ShapefileGeoResource, WFSGeoResource, WMSGeoResource

public abstract class AbstractGeoResource
extends Object
implements GeoResource

Abstract implementation of GeoResource.

Module:
modules/library/main   (gt2-main.jar) (Maven report) (SVN head)

Nested Class Summary
 
Nested classes/interfaces inherited from interface Resolve
Resolve.Status
 
Field Summary
protected static Logger logger
          logger
 
Constructor Summary
AbstractGeoResource()
           
 
Method Summary
 void addListener(ResolveChangeListener listener)
          This method does nothing.
 boolean equals(Object other)
          This should represent the identifier
 void fire(ResolveChangeEvent event)
          This method does nothing.
 Throwable getMessage()
          In the event that an error occurs during a resolve, that error can be reported back with this method.
 int hashCode()
          This should represent the identified
 List members(ProgressListener monitor)
          return null ... almost always a leaf
 Resolve parent(ProgressListener monitor)
          This method is shorthand for return (Service) resolve(Service.class, monitor);
 void removeListener(ResolveChangeListener listener)
          This method does nothing.
protected  void setMessage(Throwable msg)
          Sets the cached error message.
 String toString()
          Indicate class and id.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface GeoResource
getInfo, resolve
 
Methods inherited from interface Resolve
canResolve, getIdentifier, getStatus
 

Field Detail

logger

protected static Logger logger
logger

Constructor Detail

AbstractGeoResource

public AbstractGeoResource()
Method Detail

parent

public Resolve parent(ProgressListener monitor)
               throws IOException
This method is shorthand for
        
                return (Service) resolve(Service.class, monitor);
        
 

Specified by:
parent in interface Resolve
Parameters:
monitor - DOCUMENT ME!
Returns:
The service containg the resource, an object of type Service.
Throws:
IOException - DOCUMENT ME!
See Also:
GeoResource.resolve(Class, ProgressListener)

members

public List members(ProgressListener monitor)
return null ... almost always a leaf

Specified by:
members in interface Resolve
Parameters:
monitor - Progress monitor used to report status while blocking. May be null.
Returns:
A list (possibly empty) of members, null if the members could not be obtained or the instance has not members. Objects in the returned list implement the Resolve interface.
See Also:
net.refractions.udig.catalog.IResolve#members(org.eclipse.core.runtime.ProgressListener)

getMessage

public 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.

Specified by:
getMessage in interface Resolve
Returns:
The cached error message.
See Also:
Resolve.Status

setMessage

protected void setMessage(Throwable msg)
Sets the cached error message.

Parameters:
msg - An exception which occured when connecting to the service.

equals

public boolean equals(Object other)
This should represent the identifier

Overrides:
equals in class Object
Parameters:
other -
See Also:
Object.equals(java.lang.Object)

addListener

public void addListener(ResolveChangeListener listener)
This method does nothing. Sublcasses should override if events are supported.

Specified by:
addListener in interface Resolve
Parameters:
listener - DOCUMENT ME!

removeListener

public void removeListener(ResolveChangeListener listener)
This method does nothing. Sublcasses should override if events are supported.

Specified by:
removeListener in interface Resolve
Parameters:
listener - DOCUMENT ME!

fire

public void fire(ResolveChangeEvent event)
This method does nothing. Sublcasses should override if events are supported.

Specified by:
fire in interface Resolve
Parameters:
event - DOCUMENT ME!

hashCode

public int hashCode()
This should represent the identified

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Indicate class and id.

Overrides:
toString in class Object
Returns:
string representing this IResolve


Copyright © 1996-2008 Geotools. All Rights Reserved.