Package org.geoserver.wfsv.response.v1_1_0

Source Code of org.geoserver.wfsv.response.v1_1_0.VersionedSchemaBuilder

package org.geoserver.wfsv.response.v1_1_0;

import static org.geoserver.ows.util.ResponseUtils.*;

import java.util.Map;

import org.eclipse.xsd.XSDSchema;
import org.geoserver.config.GeoServer;
import org.geoserver.wfs.xml.FeatureTypeSchemaBuilder;
import org.geoserver.wfs.xml.GML3Profile;
import org.geoserver.wfsv.xml.v1_1_0.WFSVConfiguration;
import org.opengis.feature.type.AttributeDescriptor;

public class VersionedSchemaBuilder extends FeatureTypeSchemaBuilder {
    /**
     * Cached gml3 schema
     */
    private static XSDSchema gml3Schema;

    public VersionedSchemaBuilder(GeoServer gs, WFSVConfiguration configuration) {
        super(gs);

        profiles.add(new GML3Profile());

        gmlNamespace = org.geoserver.wfsv.xml.v1_1_0.WFSV.NAMESPACE;
        gmlSchemaLocation = "wfs/1.1.0/wfsv.xsd";
        baseType = "AbstractVersionedFeatureType";
        substitutionGroup = "_VersionedFeature";
        describeFeatureTypeParams = params("request", "DescribeFeatureType",
                "version", "1.0.0",
                "service", "WFS",
                "versioned", "true");
        gmlPrefix = "wfsv";
        xmlConfiguration = new org.geotools.gml3.GMLConfiguration();
    }

    protected XSDSchema gmlSchema() {
        if (gml3Schema == null) {
            gml3Schema = xmlConfiguration.schema();
        }

        return gml3Schema;
    }
   
    protected boolean filterAttributeType( AttributeDescriptor attribute ) {
        return super.filterAttributeType( attribute ) ||
            "metaDataProperty".equals( attribute.getName() ) ||
            "location".equals( attribute.getName() );
    }
}
TOP

Related Classes of org.geoserver.wfsv.response.v1_1_0.VersionedSchemaBuilder

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.