Examples of FeatureTypeInfoImpl


Examples of org.geoserver.catalog.impl.FeatureTypeInfoImpl

     */
    public MapLayerInfo addFeatureTypeLayer(final String name,
            Class<? extends Geometry> geometryType) throws IOException {

        final DataStore dataStore = this.dataStore;
        FeatureTypeInfoImpl featureTypeInfo = new FeatureTypeInfoImpl(catalog) {
            /**
             * Override to avoid going down to the catalog and geoserver resource loader etc
             */
            @Override
            public FeatureSource getFeatureSource(ProgressListener listener, Hints hints) {
                try {
                    return dataStore.getFeatureSource(getQualifiedName());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
        };
        featureTypeInfo.setName(name);
        featureTypeInfo.setNativeName(name);
        featureTypeInfo.setEnabled(true);

        final DefaultGeographicCRS wgs84 = DefaultGeographicCRS.WGS84;

        ReferencedEnvelope bbox = new ReferencedEnvelope(-180, 180, -90, 90, wgs84);
        featureTypeInfo.setLatLonBoundingBox(bbox);
        featureTypeInfo.setNamespace(namespaceInfo);
        featureTypeInfo.setNativeBoundingBox(bbox);
        featureTypeInfo.setNativeCRS(wgs84);
        featureTypeInfo.setSRS("EPSG:4326");
        featureTypeInfo.setProjectionPolicy(ProjectionPolicy.FORCE_DECLARED);
        featureTypeInfo.setStore(dataStoreInfo);
        catalog.add(featureTypeInfo);

        LayerInfo layerInfo = new LayerInfoImpl();
        layerInfo.setResource(featureTypeInfo);
        layerInfo.setName(name);
View Full Code Here

Examples of org.geoserver.catalog.impl.FeatureTypeInfoImpl

        }
       
        @Override
        protected void postDoMarshal(Object result,
                HierarchicalStreamWriter writer, MarshallingContext context) {
            FeatureTypeInfoImpl featureType = (FeatureTypeInfoImpl) result;
           
            //ensure null list does not result
            if ( featureType.getAttributes() == null ){
                featureType.setAttributes(new ArrayList());
            }
            if( featureType.getMetadata() == null) {
                featureType.setMetadata(new MetadataMap());
            }
           
            callback.postEncodeFeatureType(featureType, writer, context);
        }
View Full Code Here

Examples of org.geoserver.catalog.impl.FeatureTypeInfoImpl

        super.setUpInternal();

        nameSpace = new NamespaceInfoImpl();
        nameSpace.setURI("topp");

        states = new FeatureTypeInfoImpl(null);
        states.setNamespace(nameSpace);
        states.setName("states");

        europe = new FeatureTypeInfoImpl(null);
        europe.setNamespace(nameSpace);
        europe.setName("europe");

        asia = new FeatureTypeInfoImpl(null);
        asia.setNamespace(nameSpace);
        asia.setName("asia");

        GeoXACMLConfig.setPolicyRepsoitoryBaseDir("src/test/resources/publicReadGeoRestricted/");
        GeoXACMLConfig.reset();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.