Package net.opengis.wfs

Examples of net.opengis.wfs.InsertElementType


    }

    @Test
    public void testDataStoreChangeDoesNotAffectTileLayer() {

        InsertElementType insert = mock(InsertElementType.class);
        TransactionEvent event = mock(TransactionEvent.class);

        QName layerName = new QName("testType");
        when(event.getLayerName()).thenReturn(layerName);
        when(event.getSource()).thenReturn(insert);
View Full Code Here


        when(event.getRequest()).thenReturn(transaction);

        QName layerName = new QName("testType");
        when(event.getLayerName()).thenReturn(layerName);

        InsertElementType insert = mock(InsertElementType.class);

        when(event.getSource()).thenReturn(insert);
        when(event.getType()).thenReturn(TransactionEventType.PRE_INSERT);

        when(
View Full Code Here

     * @generated modifiable
     */
    @SuppressWarnings("unchecked")
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        InsertElementType insertElement = wfsfactory.createInsertElementType();

        //<xsd:choice>
        //   <xsd:element ref="gml:_FeatureCollection"/>
        //   <xsd:sequence>
        //       <xsd:element maxOccurs="unbounded" ref="gml:_Feature"/>
        //   </xsd:sequence>
        //</xsd:choice>
        if (node.hasChild(FeatureCollection.class)) {
            SimpleFeatureCollection fc = (SimpleFeatureCollection) node.getChildValue(FeatureCollection.class);
            insertElement.getFeature().addAll(DataUtilities.list(fc));
        } else if (node.hasChild(SimpleFeature.class)) {
            insertElement.getFeature().addAll(node.getChildValues(SimpleFeature.class));
        }

        //<xsd:attribute default="GenerateNew" name="idgen"
        //    type="wfs:IdentifierGenerationOptionType" use="optional">
        if (node.hasAttribute("idgen")) {
            insertElement.setIdgen((IdentifierGenerationOptionType) node.getAttributeValue("idgen"));
        }

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

        //<xsd:attribute default="text/xml; subtype=gml/3.1.1"
        //     name="inputFormat" type="xsd:string" use="optional">
        if (node.hasAttribute("inputFormat")) {
            insertElement.setInputFormat((String) node.getAttributeValue("inputFormat"));
        }

        //<xsd:attribute name="srsName" type="xsd:anyURI" use="optional">
        if (node.hasAttribute("srsName")) {
            insertElement.setSrsName((URI) node.getAttributeValue("srsName"));
        }

        return insertElement;
    }
View Full Code Here

        return insertElement;
    }

    public Object getProperty(Object object, QName name)
        throws Exception {
        InsertElementType insert = (InsertElementType) object;

        if (GML._Feature.equals(name)) {
            return insert.getFeature();
        }

        return super.getProperty(object, name);
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfs.InsertElementType

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.