Package org.geotools.data.georest

Examples of org.geotools.data.georest.GeoRestDataStoreFactory


    private static final String FEATURESOURCE = "countries";

    private static final FilterFactory2 FF = CommonFactoryFinder.getFilterFactory2(null);

    public void testFactoryCanProcess() {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        Assert.assertTrue(factory.canProcess(createParams()));
    }
View Full Code Here


        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        Assert.assertTrue(factory.canProcess(createParams()));
    }

    public void testCreateDataStore() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        Assert.assertNotNull(ds);
    }
View Full Code Here

        DataStore ds = factory.createDataStore(createParams());
        Assert.assertNotNull(ds);
    }

    public void testGetFeatureSource() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        Assert.assertNotNull(source);
    }
View Full Code Here

        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        Assert.assertNotNull(source);
    }

    public void testGetSchema() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        SimpleFeatureType type = source.getSchema();
        Assert.assertNotNull(type);
        Assert.assertTrue(type.getAttributeCount() > 0);
    }
View Full Code Here

        Assert.assertNotNull(type);
        Assert.assertTrue(type.getAttributeCount() > 0);
    }

    public void testCountFeatures() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        int count = source.getCount(new Query(FEATURESOURCE, Filter.INCLUDE));
        Assert.assertTrue(count > 0);
        BBOX bbox = FF.bbox("geometry", 0, 0, 10, 10, "EPSG:4326");
        count = source.getCount(new Query(FEATURESOURCE, bbox, 5, new String[] {}, ""));
View Full Code Here

        count = source.getCount(new Query(FEATURESOURCE, bbox, 5, new String[] {}, ""));
        Assert.assertTrue(count == 5);
    }

    public void testGetFeatureReader() throws Exception {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        FeatureReader<SimpleFeatureType, SimpleFeature> r = ds.getFeatureReader(new Query(
                FEATURESOURCE), Transaction.AUTO_COMMIT);
        assertNotNull(r);
        assertTrue(r.hasNext());
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.georest.GeoRestDataStoreFactory

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.