Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.ID


*/
public class AddToCatalog implements IStartup {

    public void earlyStartup() {
        ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
        ID serviceUrl = new ID(MapGraphicService.SERVICE_URL);
        IService service = localCatalog.getById(IService.class, serviceUrl, ProgressManager.instance().get());
        if( service !=null )
            return;
       
        service=new MapGraphicService();
View Full Code Here


    public JGTtmsService( Map<String, Serializable> params ) {
        this.params = params;

        // get the file url from the connection parameters
        url = (URL) this.params.get(JGTtmsServiceExtension.KEY);
        id = new ID(url);

        tmsPropertiesFile = URLUtils.urlToFile(url);
        try {
            tmsCrs = CRS.decode(EPSG_MERCATOR);
        } catch (Exception e) {
View Full Code Here

    public IService createService( URL providedId, Map<String, Serializable> params ) {
        Iterator<DataStoreFactorySpi> available = DataStoreFinder.getAvailableDataStores();
        while( available.hasNext() ) {
            DataStoreFactorySpi factory = available.next();
            if (factory.canProcess(params)) {
                ID id = createID(providedId, factory, params);
                if( id == null ){
                    // cannot represent this in our catalog as we have
                    // no idea how to create an "id" for it
                    continue;
                }
View Full Code Here

    public static ID createID( URL providedId, DataAccessFactory factory,
            Map<String, Serializable> params ) {

        if (providedId != null) {
            // one was already provided!
            return new ID(providedId, factory.getDisplayName());
        }

        GTFormat format = GTFormat.format(factory);
        return format.toID(factory, params);
    }
View Full Code Here

        this.service = parent;
        this.parent = parent;
        this.typename = typename;
        try {
            identifier = new URL(parent.getIdentifier().toString() + "#" + typename); //$NON-NLS-1$
            id = new ID(parent.getID(), typename);
        } catch (MalformedURLException e) {
            identifier = parent.getIdentifier();
        }
    }
View Full Code Here

    public Style style( IProgressMonitor monitor ) throws IOException {
        SimpleFeatureSource source  = featureSource(null);

        SimpleFeatureType featureType = source.getSchema();
       
        ID fileID = parent.getID();
        if( !fileID.isFile() ){
            return null; // we are only checking for sidecar files
        }
        File file = fileID.toFile("sld");
        if( !file.exists()){
            file =fileID.toFile("SLD");
            if( !file.exists()){
                return null; // sidecar file not avaialble
            }
        }
        StyledLayerDescriptor sld = SLDs.parseSLD( file );
View Full Code Here

                        return "Wasn't able to move file: " + tmpFile.getAbsolutePath();
                    }
                }
            }
        }
        ID id = shapefile.getID();
    IServiceFactory serviceFactory = CatalogPlugin.getDefault().getServiceFactory();
    IService newService = serviceFactory.createService(parametersMap).iterator().next();
    ICatalog localCatalog = CatalogPlugin.getDefault().getLocalCatalog();
    localCatalog.replace(id, newService );
        return null;
View Full Code Here

        //this.url = url;
        if( url == null ){
            throw new NullPointerException("ShpService requres a URL");
        }
        try {
            id = new ID(url);
        } catch (Throwable t) {
            throw new IllegalArgumentException("Unable to create ID from:"+url,t);
        }
        this.params = params;
        Serializable memorymapped = params.get("memory mapped buffer"); //$NON-NLS-1$
View Full Code Here

    public URL getIdentifier() {
        return identifier;
    }
    public ID getID() {
        return new ID( getIdentifier() );       
    }
View Full Code Here

    return url;
  }

  @Override
  public ID getID() {
    return new ID(url);
  }
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.