Package org.geotools.data

Examples of org.geotools.data.ServiceInfo


        try {
            if (server == null ) { //$NON-NLS-1$
                WmsPlugin.log("WebMapService required", new ServiceNotFoundException()); //$NON-NLS-1$
                return null;
            }
            ServiceInfo serverInfo = server.getInfo();
            URI serverURI = serverInfo.getSource();
            String source = serverURI != null ? serverURI.toString() : null;
           
            String version = server.getCapabilities().getVersion();
            if (source == null || "".equals(source)) { //$NON-NLS-1$
                WmsPlugin.log("GetCapabilities SERVICE is required", new ServiceNotFoundException()); //$NON-NLS-1$
View Full Code Here


    }

    @Override
    protected DataStoreServiceInfo createInfo( IProgressMonitor monitor ) throws IOException {
        DataAccess< ? , ? > access = toDataAccess();
        ServiceInfo gtInfo = access.getInfo();
        return new DataStoreServiceInfo(factory,connectionParams,gtInfo);
    }
View Full Code Here

        WFSDataStore wfs = (WFSDataStore) layer.getResource( WFSDataStore.class, null );
        SimpleFeatureType type = layer.getSchema();
        String typeName = type.getName().getLocalPart();
       
        int hidden = layer.isVisible() ? 1 : 0;
        ServiceInfo serviceInfo = wfs.getInfo();
    String title = serviceInfo.getTitle();
        String version = "1.0.0"; // only known entry at this time //$NON-NLS-1$
        URI source = serviceInfo.getSource();
        String get = source == null? "" : source.toString();
       
        ResourceInfo resourceInfo = wfs.getFeatureSource(typeName).getInfo();
        append( 4, out, "<SimpleFeatureType hidden=\""+ hidden +"\">" ); //$NON-NLS-1$ //$NON-NLS-2$
        append( 6, out,   "<Server service=\"OGC:WFS\" title=\""+title+"\" version=\""+version+"\">" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
View Full Code Here

    @Override
    protected IGeoResourceInfo createInfo( IProgressMonitor monitor ) throws IOException {
        try {
            AbstractGridCoverage2DReader reader = getReader(monitor);
            ServiceInfo serviceInfo = reader.getInfo();

            String name = serviceInfo.getTitle();
            String title = serviceInfo.getTitle();
            String description = serviceInfo.getDescription();
            URI schema = serviceInfo.getSchema();
            String[] keywords = serviceInfo.getKeywords().toArray(
                    new String[serviceInfo.getKeywords().size()]);

            GeneralEnvelope env = reader.getOriginalEnvelope();
            Envelope bounds = new Envelope(env.getMinimum(0), env.getMaximum(0), env.getMinimum(1),
                    env.getMaximum(1));
            CoordinateReferenceSystem crs = reader.getCrs();
View Full Code Here

        final int numImages = reader.getGridCoverageCount();
        final boolean hasMoreGridCoverages = reader.hasMoreGridCoverages();
        Assert.assertEquals(1, numImages);
        Assert.assertEquals(false, hasMoreGridCoverages);
       
        final ServiceInfo serviceInfo = reader.getInfo();
        reader.getInfo("coverage");
        reader.dispose();

        boolean writersAvailable = true;
        boolean hasWriteParams = true;
View Full Code Here

    private Layer find(String name) {
        return find(name, capabilities);
    }

    public void testServiceInfo() {
        ServiceInfo info = wms.getInfo();
        assertNotNull(info);

        assertEquals(serverURL, wms.getCapabilities().getRequest().getGetCapabilities().getGet());
        assertEquals("GeoServer Web Map Service", info.getTitle());

        assertNotNull(info.getDescription());
    }
View Full Code Here

            assertTrue(fsource != null);

            fsource = ds.getFeatureSource(new NameImpl(typeName));
            assertTrue(fsource != null);

            ServiceInfo si = ds.getInfo();
            assertTrue(si != null);
            System.out.println(si);

            List<Name> names = ds.getNames();
            assertTrue(names.contains(new NameImpl(typeName)));
View Full Code Here

DataStore dataStore = null;
SimpleFeatureSource featureSource = null;

void exampleInfo() {
    // exampleInfo start
    ServiceInfo info = dataStore.getInfo();
   
    // Human readable name and description
    String title = info.getTitle();
    String text = info.getDescription();
   
    // keywords (dublin core keywords like a web page)
    Set<String> keywords = info.getKeywords();
   
    // formal metadata
    URI publisher = info.getPublisher(); // authority publishing data
    URI schema = info.getSchema(); // used for data conforming to a standard
    URI source = info.getSource(); // location where information is published from
   
    // exampleInfo end
}
View Full Code Here

        }
    }
   
    @Test
    public void testInfo() throws Exception {
        ServiceInfo info = ds.getInfo();
        Name name = transformed.getSchema().getName();
        assertEquals("Features from " + name,  info.getDescription());
        assertEquals(name.toString(),  info.getTitle());
        assertEquals(new URI(name.getNamespaceURI()),  info.getSchema());
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.ServiceInfo

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.