Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.ID


        super.keywords = keywords;
    }
   
    @Override
    public String getTitle() {
        ID id = service.getID();
       
        String title;
        if( id.isFile() ){
            title = id.toFile().getAbsolutePath();           
        }
        else {
            title = id.toString();
        }
        return title;
    }
View Full Code Here


     *
     * @param id
     * @param factory
     */
    public AbstractRasterService( URL url, String typeQualifier, GridFormatFactorySpi factory ) {
        this.id = new ID( url, typeQualifier );
        this.factory = factory;
    }
View Full Code Here

     */
    public synchronized AbstractGridCoverage2DReader getReader(IProgressMonitor monitor) {
        if (this.reader == null) {
            try {
                AbstractGridFormat frmt = (AbstractGridFormat) getFormat();
                ID id = getID();
                if( id.isFile() ){
                    File file = id.toFile();
                    if (file != null) {
                        // to force crs
                        // Hints hints = new Hints();
                        // hints.put(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, )
                        this.reader = (AbstractGridCoverage2DReader) frmt.getReader(file);
                        return this.reader;
                  }
                  else {
                    throw new FileNotFoundException( id.toFile().toString() );
                  }
                }
                this.reader = (AbstractGridCoverage2DReader) frmt.getReader( id.toURL() );
            } catch (Exception ex) {
                this.message = ex;
            }
        }
        return this.reader;
View Full Code Here

       
        GeoTiffFormatFactorySpi factory = GeoTiffServiceExtension.getFactory();
        GeoTiffFormat format = (GeoTiffFormat) factory.createFormat();
       
        try {
            ID id = new ID(url);
            File file = id.toFile();
       
            format.accepts(file);
           
        } catch (RuntimeException ex) {
            ex.printStackTrace();
View Full Code Here

          (name.lastIndexOf('.') == -1 ? name.length() : name
              .lastIndexOf('.')));

    }
    this.fileName = name;
    this.id = new ID(service.getID(), fileName);
  }
View Full Code Here

        };
        CatalogRefForTesting ref=new CatalogRefForTesting();
        ref.parseResourceParameters(string);
       
        assertEquals( 1, ref.getParams().entrySet().size());
        ID url=ref.getParams().keySet().iterator().next();
        Map<String, Serializable> map = ref.getParams().get(url);
        assertEquals( new URL("http://testURL.test").toString(),url.toString()); //$NON-NLS-1$
        assertEquals( 4 ,map.entrySet().size());
        assertEquals( "v1", map.get("k1")); //$NON-NLS-1$ //$NON-NLS-2$
        assertEquals( "v2", map.get("k2")); //$NON-NLS-1$ //$NON-NLS-2$
        assertEquals( "v3", map.get("k3")); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

            OracleServiceImpl oracle = (OracleServiceImpl) context;
            return oracle.getConnectionParams();
        }
        // we need to check the provided object (probably a URL)
        // and ensure it is ment for us
        ID id = ID.cast( context );
        if( id.toString().indexOf("oracle") != -1){
           
        }       
        return null;
    }
View Full Code Here

    }

    public IService add( IService service ) throws UnsupportedOperationException {
        if (service == null || service.getIdentifier() == null)
            throw new NullPointerException("Cannot have a null id"); //$NON-NLS-1$
        ID id = service.getID();

        IService found = getById(IService.class, id, new NullProgressMonitor());

        if (found != null) {
            // clean up the service that was passed in
View Full Code Here

     * @see org.locationtech.udig.catalog.ICatalog#search(org.opengis.filter.Filter)
     * @return List<IResolve>
     * @throws IOException
     */
    public List<IResolve> find( URL query, IProgressMonitor monitor ) {
        return find(new ID(query), monitor);
    }
View Full Code Here

            monitor2 = new NullProgressMonitor();

        if (roughMatch) {
            URL url1 = id.toURL();
            URL url2 = handle.getIdentifier();
            if (new ID(url1).equals(new ID(url2))) {
                return handle;
            }
        } else {
            if (id.equals(handle.getID())) {
                return handle;
View Full Code Here

TOP

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

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.