Package net.opengis.wfsv

Examples of net.opengis.wfsv.GetVersionedFeatureType


     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        GetVersionedFeatureType getFeature = wfsvFactory.createGetVersionedFeatureType();

        // lt;xsd:element maxOccurs="unbounded" ref="wfs:Query"/>
        getFeature.getQuery().addAll(node.getChildValues(QueryType.class));

        // <xsd:attribute default="results" name="resultType"
        // type="wfs:ResultTypeType" use="optional">
        // Funny, it seems resultType is not being parsed, still a string...
        if (node.hasAttribute("resultType")) {
            Object rt = node.getAttributeValue("resultType");
            if ("results".equals(rt)) {
                getFeature.setResultType(ResultTypeType.RESULTS_LITERAL);
            } else if ("hits".equals(rt)) {
                getFeature.setResultType(ResultTypeType.HITS_LITERAL);
            } else {
                getFeature.setResultType((ResultTypeType) rt);
            }
        }
       
        if (node.hasAttribute("version")) {
            getFeature.setVersion((String) node
                    .getAttributeValue("version"));
        }

        // <xsd:attribute default="text/xml; subtype=gml/3.1.1"
        // name="outputFormat" type="xsd:string" use="optional">
        if (node.hasAttribute("outputFormat")) {
            getFeature.setOutputFormat((String) node
                    .getAttributeValue("outputFormat"));
        } else if("1.0.0".equals(getFeature.getVersion())) {
            // use GML2 output by default for 1.0 requests
            getFeature.setOutputFormat("GML2");
        }

        // <xsd:attribute name="maxFeatures" type="xsd:positiveInteger"
        // use="optional">
        if (node.hasAttribute("maxFeatures")) {
            getFeature.setMaxFeatures((BigInteger) node
                    .getAttributeValue("maxFeatures"));
        }

        // <xsd:attribute name="traverseXlinkDepth" type="xsd:string"
        // use="optional">
        if (node.hasAttribute("traverseXlinkDepth")) {
            getFeature.setTraverseXlinkDepth((String) node
                    .getAttributeValue("traverseXlinkDepth"));
        }

        // <xsd:attribute name="traverseXlinkExpiry"
        // type="xsd:positiveInteger" use="optional">
        if (node.hasAttribute("traverseXlinkExpiry")) {
            getFeature.setTraverseXlinkExpiry((BigInteger) node
                    .getAttributeValue("traverseXlinkExpiry"));
        }

        return getFeature;
    }
View Full Code Here


     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {
        GetVersionedFeatureType getFeature = wfsvFactory.createGetVersionedFeatureType();

        // lt;xsd:element maxOccurs="unbounded" ref="wfs:Query"/>
        getFeature.getQuery().addAll(node.getChildValues(QueryType.class));

        // <xsd:attribute default="results" name="resultType"
        // type="wfs:ResultTypeType" use="optional">
        // Funny, it seems resultType is not being parsed, still a string...
        if (node.hasAttribute("resultType")) {
            Object rt = node.getAttributeValue("resultType");
            if ("results".equals(rt)) {
                getFeature.setResultType(ResultTypeType.RESULTS_LITERAL);
            } else if ("hits".equals(rt)) {
                getFeature.setResultType(ResultTypeType.HITS_LITERAL);
            } else {
                getFeature.setResultType((ResultTypeType) rt);
            }
        }
       
        if (node.hasAttribute("version")) {
            getFeature.setVersion((String) node
                    .getAttributeValue("version"));
        }

        // <xsd:attribute default="text/xml; subtype=gml/3.1.1"
        // name="outputFormat" type="xsd:string" use="optional">
        if (node.hasAttribute("outputFormat")) {
            getFeature.setOutputFormat((String) node
                    .getAttributeValue("outputFormat"));
        } else if("1.0.0".equals(getFeature.getVersion())) {
            // use GML2 output by default for 1.0 requests
            getFeature.setOutputFormat("GML2");
        }

        // <xsd:attribute name="maxFeatures" type="xsd:positiveInteger"
        // use="optional">
        if (node.hasAttribute("maxFeatures")) {
            getFeature.setMaxFeatures((BigInteger) node
                    .getAttributeValue("maxFeatures"));
        }

        // <xsd:attribute name="traverseXlinkDepth" type="xsd:string"
        // use="optional">
        if (node.hasAttribute("traverseXlinkDepth")) {
            getFeature.setTraverseXlinkDepth((String) node
                    .getAttributeValue("traverseXlinkDepth"));
        }

        // <xsd:attribute name="traverseXlinkExpiry"
        // type="xsd:positiveInteger" use="optional">
        if (node.hasAttribute("traverseXlinkExpiry")) {
            getFeature.setTraverseXlinkExpiry((BigInteger) node
                    .getAttributeValue("traverseXlinkExpiry"));
        }

        return getFeature;
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfsv.GetVersionedFeatureType

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.