| java.lang.Object net.refractions.udig.catalog.ICatalog net.refractions.udig.catalog.internal.CatalogImpl
CatalogImpl | public class CatalogImpl extends ICatalog (Code) | | Implementation of an in memory catalog.
author: David Zwiers, Refractions Research since: 0.6 |
Method Summary | |
public void | add(IService entry) | public void | addCatalogListener(IResolveChangeListener listener) | public boolean | canResolve(Class<T> adaptee) | protected static boolean | check(IService service, AST pattern) | protected static boolean | check(IGeoResource resource, AST pattern) | protected static boolean | check(IGeoResource resource, AST pattern, Envelope bbox) | public IGeoResource | createTemporaryResource(Object descriptor) | public List<IResolve> | find(URL query, IProgressMonitor monitor) Quick search by url match. | public List<IService> | findService(URL query) Quick search by url match. | public void | fire(IResolveChangeEvent event) Fire a resource changed event, these may be batched into one delta for performance. | public List<IResolve> | friends(IResolve handle) Returns a list of friendly resources working with related data. | public T | getById(Class<T> type, URL ID, IProgressMonitor monitor) | public IResolve | getChildById(IResolve handle, URL ID, IProgressMonitor monitor) Utility method that will search in the provided handle for an ID match; especially good for
nested content such as folders or WMS layers.
Old Comment
The following comment was origional included in the source code: we are not sure it should
be belived ... | public URL | getIdentifier() | public Throwable | getMessage() | public IService | getServiceById(URL ID) Utility method to quick hunt for matching service. | public Status | getStatus() | public synchronized String[] | getTemporaryDescriptorClasses() | public void | loadFromFile(File catalogLocation, IServiceFactory factory) | public List<IResolve> | members(IProgressMonitor monitor2) | public void | remove(IService entry) | public void | removeCatalogListener(IResolveChangeListener listener) | public void | replace(URL id, IService entry) | public T | resolve(Class<T> adaptee, IProgressMonitor monitor2) | public void | saveToFile(File catalogLocation, IServiceFactory factory, IProgressMonitor monitor) | public synchronized List<IResolve> | search(String pattern, Envelope bbox, IProgressMonitor monitor2) Performs a search on this catalog based on the specified inputs. |
CatalogImpl | public CatalogImpl()(Code) | | |
canResolve | public boolean canResolve(Class<T> adaptee)(Code) | | |
fire | public void fire(IResolveChangeEvent event)(Code) | | Fire a resource changed event, these may be batched into one delta for performance.
Parameters: resoruce - IGeoResource undergoing change Parameters: mask - of IDelta constants indicating change throws: IOException - protected void fireResourceEvent( IGeoResource resource,IResolveDelta.Kind kind ) throws IOException { Object[] listeners =catalogListeners.getListeners(); if( listeners.length == 0 ) return;GeoReferenceDelta rDelta = new GeoReferenceDelta( resource, kind ); ServiceDeltasDelta = new ServiceDelta( resource.getService(null), IDelta.Kind.NO_CHANGE,Collections.singletonList( rDelta ) ); CatalogDelta cDelta = new CatalogDelta(Collections.singletonList( (IDelta)sDelta ) ); fire( new CatalogChangeEvent(resource, ICatalogChangeEvent.Type.POST_CHANGE, cDelta ) ); } |
friends | public List<IResolve> friends(IResolve handle)(Code) | | Returns a list of friendly resources working with related data.
This method is used internally to determine resource handles that
offer different entry points to the same information.
A friend can be found via:
- Making use of a CSW2.0 association
- URL Pattern matching for well known cases like GeoServer and MapServer
- Service Metadata, for example WMS resourceURL referencing a WFS FeatureType
All of these handles will be returned from the find( URL, monitor ) method.
Parameters: handle - List of frends, possibly empty |
getById | public T getById(Class<T> type, URL ID, IProgressMonitor monitor)(Code) | | |
getChildById | public IResolve getChildById(IResolve handle, URL ID, IProgressMonitor monitor)(Code) | | Utility method that will search in the provided handle for an ID match; especially good for
nested content such as folders or WMS layers.
Old Comment
The following comment was origional included in the source code: we are not sure it should
be belived ... we will do our best to search CONNECTED services first, nut NOTCONNECTED
is included in our search.
Although the following is a 'blocking' call, we have deemed it safe based on
the following reasons:
- This will only be called for Identifiers which are well known.
- The Services being checked have already been screened, and only a
limited number of services (ussually 1) will be called.
- The Id was acquired from the catalog ... and this is a look-up, in which case the uri exists.
- The Id was persisted.
In the future this will also be free, as we plan on caching the equivalent of a getCapabilities
document between runs (will have to be updated too as the app has time).
Repeate the following comment is out of date since people are using this method to look
for entries that have not been aded to the catalog yet.
|
getIdentifier | public URL getIdentifier()(Code) | | |
getServiceById | public IService getServiceById(URL ID)(Code) | | Utility method to quick hunt for matching service.
Parameters: ID - Identification of service to find Found service handle or null |
getStatus | public Status getStatus()(Code) | | |
getTemporaryDescriptorClasses | public synchronized String[] getTemporaryDescriptorClasses()(Code) | | |
search | public synchronized List<IResolve> search(String pattern, Envelope bbox, IProgressMonitor monitor2)(Code) | | Performs a search on this catalog based on the specified inputs. The pattern uses the
following conventions: use " " to surround a phase use + to represent 'AND' use - to
represent 'OR' use ! to represent 'NOT' use ( ) to designate scope The bbox provided shall be
in Lat - Long, or null if the search is not to be contained within a specified area.
See Also: net.refractions.udig.catalog.ICatalog.search(java.lang.Stringcom.vividsolutions.jts.geom.Envelope) Parameters: pattern - Parameters: bbox - used for an intersection test |
|
|