Package org.geotools.data

Examples of org.geotools.data.DefaultServiceInfo


        List<String> layerNames = typeInfoCache.getTypeNames();
        return layerNames.toArray(new String[layerNames.size()]);
    }

    public ServiceInfo getInfo() {
        DefaultServiceInfo info = new DefaultServiceInfo();
        info.setTitle("ArcSDE connection to " + connectionPool.getConfig().getServerName()
                + " using database version '" + version + "'");
        info.setDescription("GeoTools ArcSDE DataStore plugin");
        try {
            info.setSchema(typeInfoCache.getNamesapceURI() == null ? FeatureTypes.DEFAULT_NAMESPACE
                    : new URI(typeInfoCache.getNamesapceURI()));
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        return info;
View Full Code Here


    public ServiceInfo getInfo( ProgressListener listener ) {
        if (listener == null){
            listener = new NullProgressListener();
        }
        listener.started();
        final DefaultServiceInfo info = new DefaultServiceInfo();

        // Fix that
        Collection<Name> coverageNames = getNames(listener);
        Iterator<Name> namesIterator = coverageNames.iterator();
        if (namesIterator.hasNext()) {
            info.setTitle(namesIterator.next().toString());
        }
        try {
            info.setSource(source.toURI());
        } catch (URISyntaxException e1) {

        } finally {
            listener.complete();
        }
View Full Code Here

    }

    public ServiceInfo getInfo() {
        // TODO
        DefaultServiceInfo info = new DefaultServiceInfo();
        info.setDescription("Generalized Feature Store ");
        info.setSchema(FeatureTypes.DEFAULT_NAMESPACE);
        try {
            info.setPublisher(new URI(System.getProperty("user.name")));
            // TODO IBM SDK problem
            // info.setPublisher( new URI(System.getenv("user.name")) );
        } catch (URISyntaxException e) {
        }
        return info;
View Full Code Here

     *
     * @return ServiceInfo describing getSource().
     */
    public synchronized ServiceInfo getInfo() {
      if (serviceInfo!=null)
        return new DefaultServiceInfo(this.serviceInfo);
     
        DefaultServiceInfo localInfo = new DefaultServiceInfo();
        serviceInfo=localInfo;
        localInfo.setDescription(source.toString());

        if (source instanceof URL) {
            URL url = (URL) source;
            localInfo.setTitle(url.getFile());

            try {
                localInfo.setSource(url.toURI());
            } catch (URISyntaxException e) {
            }
        } else if (source instanceof File) {
            File file = (File) source;
            String filename = file.getName();

            if ((filename == null) || (filename.length() == 0)) {
                localInfo.setTitle(file.getName());
            }

            localInfo.setSource(file.toURI());
        }

        return new DefaultServiceInfo(localInfo);
    }
View Full Code Here

     * Subclasses should provide additional format specific information.
     *
     * @return ServiceInfo describing getSource().
     */
    public ServiceInfo getInfo() {
        DefaultServiceInfo info = new DefaultServiceInfo();
        info.setDescription(source == null ? null : String.valueOf(source));
        if (source instanceof URL) {
            URL url = (URL) source;
            info.setTitle(url.getFile());
            try {
                info.setSource(url.toURI());
            } catch (URISyntaxException e) {
            }
        } else if (source instanceof File) {
            File file = (File) source;
            String filename = file.getName();
            if (filename == null || filename.length() == 0) {
                info.setTitle(file.getName());
            }
            info.setSource(file.toURI());
        }
        return info;
    }
View Full Code Here

    }

    public ServiceInfo getInfo ()
    {
        DefaultServiceInfo info = new DefaultServiceInfo();
        info.setTitle( "MongoDB Data Store" );
        info.setDescription( "Features from MongoDB" );
        try
        {
            info.setSchema( new URI( config.getNamespace() ) );
        }
        catch (Throwable t)
        {
        }
        return info;
View Full Code Here

    }

    @Override
    public ServiceInfo getInfo() {
        if (serviceInfo == null) {
            serviceInfo = new DefaultServiceInfo();
            serviceInfo.setTitle(rasterInfo.getRasterTable());
            serviceInfo.setDescription(rasterInfo.toString());
            Set<String> keywords = new HashSet<String>();
            keywords.add("ArcSDE");
            serviceInfo.setKeywords(keywords);
View Full Code Here

    }

    @Override
    public ServiceInfo getInfo() {
        try {
            DefaultServiceInfo info = new DefaultServiceInfo();
            SimpleFeatureType schema = source.getSchema();
            info.setDescription("Features from " + schema.getName());
            info.setSchema(new URI(schema.getName().getNamespaceURI()));
            info.setTitle(schema.getName().toString());
            return info;
        } catch (Exception e) {
            throw new RuntimeException("Feature source returned an invalid namespace URI", e);
        }
    }
View Full Code Here

    }
    // constructor end

    // info start
    public ServiceInfo getInfo() {
        DefaultServiceInfo info = new DefaultServiceInfo();
        info.setDescription("Features from " + file );
        info.setSchema(FeatureTypes.DEFAULT_NAMESPACE);
        info.setSource(file.toURI());
        try {
            info.setPublisher(new URI(System.getProperty("user.name")));
        } catch (URISyntaxException e) {
        }
        return info;
    }
View Full Code Here

            Name typeName) throws IOException {
        return getFeatureSource(typeName.getLocalPart());
    }

    public ServiceInfo getInfo() {
        DefaultServiceInfo info = new DefaultServiceInfo();
        info.setDescription("Features from Directory " + cache.directory );
        info.setSchema( FeatureTypes.DEFAULT_NAMESPACE );
        info.setSource( cache.directory.toURI() );
        try {
            info.setPublisher( new URI(System.getProperty("user.name")) );
        } catch (URISyntaxException e) {
        }
        return info;
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.DefaultServiceInfo

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.