Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IGeoResourceInfo


    @Test
    public void testResolve() throws IOException {
        IService children = getResolve().resolve(IService.class, null);
        assertTrue("May not have null parent", children != null); //$NON-NLS-1$
        IGeoResourceInfo info = getResolve().resolve(IGeoResourceInfo.class, null);
        if (!isLeaf())
            assertTrue("May not have null info", info != null); //$NON-NLS-1$
    }
View Full Code Here


        FakeProgress monitor = new FakeProgress();
        IService children = getResolve().resolve(IService.class, monitor);
        assertTrue("May not have null parent", children != null); //$NON-NLS-1$

        monitor = new FakeProgress();
        IGeoResourceInfo info = getResolve().resolve(IGeoResourceInfo.class, monitor);
        if (!isLeaf())
            assertTrue("May not have null info", info != null); //$NON-NLS-1$
    }
View Full Code Here

    private URL id = null;
   
    public GoogleResource(OGCLayer layer) {
        service = null; // we do not have a service (you will need to connect first!)
        id = layer.getId();
        info = new IGeoResourceInfo(layer.getTitle(), layer.getName(), layer.getDescription(), getSchema(),
                new Envelope(), null, new String[] {layer.getServertype(), layer.getName(), layer.getTitle()}, getIcon() );
    }
View Full Code Here

*/
@SuppressWarnings("deprecation")
public class GeoToolsAdapters {

    static public IGeoResourceInfo info( final ResourceInfo info ){
        return new IGeoResourceInfo(){
            @Override
            public ReferencedEnvelope getBounds() {
                return (ReferencedEnvelope) info.getBounds();
            }
            @Override
View Full Code Here

            return null;
        }
        String title = resource.getTitle(); // this is from the non-blocking cache!
        if( title == null){
            // fine - no title let us try to connect to find one
            IGeoResourceInfo info = null;
            try {
                info = resource.getInfo(null);
                title = info.getTitle();
                if( title == null ){
                    title = info.getName();
                }
            } catch (IOException e) {
            }
        }
        String layerName = title;
View Full Code Here

            }
        }
        IGeoResource resource = layer.findGeoResource(FeatureSource.class);
        if (resource == null)
            return null;
        IGeoResourceInfo info;
        try {
            info = resource.getInfo(null);
        } catch (IOException e) {
            info = null;
        }
        if (info != null) {
            ImageDescriptor infoIcon = info.getImageDescriptor();
            if (infoIcon != null)
                return infoIcon;
        }
        if (resource.canResolve(GridCoverageReader.class)) {
            ImageDescriptor icon = Glyph.grid(null, null, null, null);
View Full Code Here

        }
       
        //
        // Resource based glyph?
        //
        IGeoResourceInfo info = null;
        try {
            if( !layer.getGeoResources().isEmpty() ){
                info = layer.getGeoResources().get(0).getInfo(null);
            }
        } catch (IOException e) {
            //
        }
        if (info != null) {
            ImageDescriptor infoIcon = info.getImageDescriptor();
            if (infoIcon != null)
                return infoIcon;
        }

        if (layer.hasResource(GridCoverageReader.class)) {
View Full Code Here

    private URL id = null;
   
    public CswResource(OGCLayer layer) {
        service = null; // we do not have a service (you will need to connect first!)
        id = layer.getId();
        info = new IGeoResourceInfo(layer.getTitle(), layer.getName(), layer.getDescription(), getSchema(),
                new Envelope(), null, new String[] {layer.getServertype(), layer.getName(), layer.getTitle()}, getIcon() );
    }
View Full Code Here

            GeneralEnvelope env = reader.getOriginalEnvelope();
            Envelope bounds = new Envelope(env.getMinimum(0), env.getMaximum(0), env.getMinimum(1),
                    env.getMaximum(1));
            CoordinateReferenceSystem crs = reader.getCrs();
            ImageDescriptor icon = null;
            IGeoResourceInfo rasterInfo = new IGeoResourceInfo(title, name, description, schema,
                    bounds, crs, keywords, icon);
            return rasterInfo;
        } catch (Exception e) {
            // e.printStackTrace();
            msg = e;
View Full Code Here

TOP

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

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.