Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IResolve


            if (URLUtils.urlEquals(query, identifier, true)) {
                if (query.getRef() == null && URLUtils.urlEquals(query, identifier, false)) {
                    found.add(service);
                } else {
                    IResolve res = getChildById(service, resourceId, monitor);
                    if (res != null) {
                        found.add(res);
                    }
                }
            }
View Full Code Here


            if (children == null || children.isEmpty()) {
                return null;
            }
            for( IResolve child : children ) {
                IResolve found = getChildById(child, id, null);
                if (found != null) {
                    return found;
                }
            }
        } catch (IOException e) {
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
     */
    @Override
    public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
        IResolve resolve = (IResolve) receiver;
        if( resolve == null ){
            return false;
        }
        // that is the class equivelent of "instanceof"
        if( PROPERTY_FEATURESOURCE.equals(property)){
            return resolve.canResolve( SimpleFeatureSource.class );           
        }
        else if( PROPERTY_FEATURESTORE.equals(property)){
            return resolve.canResolve( SimpleFeatureStore.class );           
        }
        else if( PROPERTY_DATASTORE.equals(property)){
            return resolve.canResolve( DataStore.class );           
        }
        else if( PROPERTY_WMS.equals(property)){
            return resolve.canResolve( WebMapServer.class );           
        }
        else if( PROPERTY_WMS_LAYER.equals(property)){
            return resolve.canResolve( org.geotools.data.ows.Layer.class );           
        }
        else if( PROPERTY_SCHEMA.equals(property)){
            return resolve.canResolve( SimpleFeatureType.class );           
        }
        else if( PROPERTY_STYLE.equals(property)){
            return resolve.canResolve( Style.class );           
        }
        return false;
    }
View Full Code Here

            if (matchParentURL || matchParentID) {
                if (matchedService(query, identifier)) {
                    found.add(service);
                    found.addAll(friends(service));
                } else {
                    IResolve res = getChildById(service, id, true, monitor);
                    if (res != null) {
                        found.add(res);
                        found.addAll(friends(res));
                    }
                }
            }
        }
        // first pass 1.2 - use urlEquals on unCONNECTED service for subset check
        for( IService service : services ) {
            if (service.getStatus() == CONNECTED)
                continue; // already checked in pass 1.1
            URL identifier = service.getIdentifier();
            if (URLUtils.urlEquals(query, identifier, true)) {
                if (service.getStatus() != NOTCONNECTED)
                    continue; // look into not connected service that "match"
                if (matchedService(query, identifier)) {
                    found.add(service);
                    found.addAll(friends(service));
                } else {
                    IResolve res = getChildById(service, id, true, monitor);
                    if (res != null) {
                        found.add(res);
                        found.addAll(friends(res));
                    }
                }
            }
        }
        // first pass 1.3 - use urlEquals on BROKEN or RESTRICTED_ACCESS service for subset check
        // the hope here is that a "friend" will still have data! May be tough for friends
        // to negotiate a match w/ a broken services - but there is still hope...
        for( IService service : services ) {
            if (service.getStatus() == CONNECTED || service.getStatus() == NOTCONNECTED) {
                continue; // already checked in pass 1.1-1.2
            }
            URL identifier = service.getIdentifier();
            if (URLUtils.urlEquals(query, identifier, true)) {
                if (matchedService(query, identifier)) {
                    found.add(service);
                    found.addAll(friends(service));
                } else {
                    IResolve res = getChildById(service, id, true, monitor);
                    if (res != null) {
                        found.add(res);
                        found.addAll(friends(res));
                    }
                }
View Full Code Here

        URL url = id.toURL();
        if (IResolve.class.isAssignableFrom(type)) {
            for( IService service : services ) {
                if (URLUtils.urlEquals(url, service.getIdentifier(), true)) {
                    IResolve child = getChildById(service, id, false, monitor2);
                    if (child != null)
                        return type.cast(child);
                }
            }
        }
View Full Code Here

            if (children == null || children.isEmpty())
                return null;

            monitor2.beginTask(Messages.CatalogImpl_monitorTask2, children.size());
            for( IResolve child : children ) {
                IResolve found = getChildById(child, id, roughMatch, null);
                if (found != null)
                    return found;
            }
        } catch (IOException e) {
            CatalogPlugin.log("Could not search children of " + handle.getIdentifier(), e); //$NON-NLS-1$
View Full Code Here

public class WFSConnectionFactory extends UDIGConnectionFactory {

  public boolean canProcess( Object data ) {       
        if( data instanceof IResolve ){
            IResolve resolve = (IResolve) data;
            return resolve.canResolve( WFSDataStore.class );
        }
        return toCapabilitiesURL(data) != null;
    }
View Full Code Here

        path = path(handle);
        found = null;
    }
    /** Find available parents if provided handle */
    static List<IResolve> path( IResolve handle ) {
        IResolve handle2=handle;

        LinkedList<IResolve> path = new LinkedList<IResolve>();
        while( handle2 != null ) {
            path.addFirst(handle2);
            try {
                handle2 = handle2.parent(null);
            } catch (IOException e) {
                handle2 = null; // no more parents
            }
        }
        return path;
View Full Code Here

            return null;
        if (reference.enqueue()) {
            dispose();
            return null;
        }
        IResolve handle = reference.get();
        if (handle == null) {
            dispose();
        }
        return null;
    }
View Full Code Here

     */
    public abstract void reset( IResolve handle, IResolveChangeEvent event );

    /** Actual listener implemtnation */
    final public void changed( IResolveChangeEvent event ) {
        IResolve handle = getHandle();
        if (handle == null) {
            dispose();
            return;
        }
        if (event.getResolve() == handle) {
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.IResolve

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.