Package org.geotools.data.gen.info

Examples of org.geotools.data.gen.info.GeneralizationInfosProvider


        String providerParam = (String) GENERALIZATION_INFOS_PROVIDER_PARAM.lookUp(params);
        URI namespace = (URI) NAMESPACEP.lookUp(params);

        try {
            Class providerClass = Class.forName(providerClassName);
            GeneralizationInfosProvider provider = (GeneralizationInfosProvider) providerClass
                    .newInstance();
            GeneralizationInfos gInfos = provider.getGeneralizationInfos(providerParam);

            Class repositoryClass = Class.forName(repositoryClassName);
            Repository repository = (Repository) repositoryClass.newInstance();

            return new PreGeneralizedDataStore(gInfos, repository, namespace);
View Full Code Here


        TestSetup.initialize();
    }

    public void testSimpleFeatureBasics() {

        GeneralizationInfosProvider provider = new GeneralizationInfosProviderImpl();
        GeneralizationInfos ginfos = null;
        PreGeneralizedDataStore ds = null;
        SimpleFeatureCollection fCollection = null;
        String typeName = "GenStreams";
        try {
            ginfos = provider.getGeneralizationInfos("src/test/resources/geninfo_vertical.xml");
            ds = new PreGeneralizedDataStore(ginfos, TestSetup.REPOSITORY);
            fCollection = ds.getFeatureSource(typeName).getFeatures();
        } catch (IOException ex) {
            ex.printStackTrace();
            Assert.fail();
View Full Code Here

        }
    }

    public void testUnsupported() {

        GeneralizationInfosProvider provider = new GeneralizationInfosProviderImpl();
        GeneralizationInfos ginfos = null;
        PreGeneralizedDataStore ds = null;
        SimpleFeatureCollection fCollection = null;
        String typeName = "GenStreams";
        try {
            ginfos = provider.getGeneralizationInfos("src/test/resources/geninfo_vertical.xml");
            ds = new PreGeneralizedDataStore(ginfos, TestSetup.REPOSITORY);
            fCollection = ds.getFeatureSource(typeName).getFeatures();
        } catch (IOException ex) {
            ex.printStackTrace();
            Assert.fail();
View Full Code Here

        TestSetup.initialize();
    }

    public void testNotSupportedFeatures() {

        GeneralizationInfosProvider provider = new GeneralizationInfosProviderImpl();
        GeneralizationInfos ginfos = null;
        PreGeneralizedDataStore ds = null;
        SimpleFeatureCollection fCollection = null;
        String typeName = null;
        try {
            ginfos = provider.getGeneralizationInfos("src/test/resources/geninfo_only_base.xml");
            ds = new PreGeneralizedDataStore(ginfos, TestSetup.REPOSITORY);
            typeName = ds.getTypeNames()[0];
            fCollection = ds.getFeatureSource(typeName).getFeatures();
        } catch (IOException ex) {
            ex.printStackTrace();
View Full Code Here

        PreGeneralizedDataStore ds = DSMap.get(configName);
        if (ds != null)
            return ds;

        GeneralizationInfosProvider provider = new GeneralizationInfosProviderImpl();
        GeneralizationInfos ginfos = null;
        ginfos = provider.getGeneralizationInfos(configName);
        ds = new PreGeneralizedDataStore(ginfos, getRepository());
        DSMap.put(configName, ds);
        return ds;
    }
View Full Code Here

        TestSetup.initialize();
    }

    public void testBaseFunctionallity() {

        GeneralizationInfosProvider provider = new GeneralizationInfosProviderImpl();
        GeneralizationInfos ginfos = null;
        try {
            ginfos = provider.getGeneralizationInfos("src/test/resources/geninfo_only_base.xml");
            PreGeneralizedDataStore ds = new PreGeneralizedDataStore(ginfos, TestSetup.REPOSITORY);

            String typeName = ds.getTypeNames()[0];
            assertTrue("GenStreams".equals(typeName));
            Query query = new DefaultQuery(typeName);
View Full Code Here

    }

    public void testNotSupportedFeatures() {

        GeneralizationInfosProvider provider = new GeneralizationInfosProviderImpl();
        GeneralizationInfos ginfos = null;
        PreGeneralizedDataStore ds = null;
        String typeName = null;
        try {
            ginfos = provider.getGeneralizationInfos("src/test/resources/geninfo_only_base.xml");
            ds = new PreGeneralizedDataStore(ginfos, TestSetup.REPOSITORY);
            typeName = ds.getTypeNames()[0];
        } catch (IOException ex) {
            ex.printStackTrace();
            Assert.fail();
View Full Code Here

TOP

Related Classes of org.geotools.data.gen.info.GeneralizationInfosProvider

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.