Package net.opengis.wfs

Examples of net.opengis.wfs.TransactionType


        }

        final SimpleFeatureCollection affectedFeatures = event.getAffectedFeatures();
        final ReferencedEnvelope affectedBounds = affectedFeatures.getBounds();

        final TransactionType transaction = event.getRequest();

        for (String tileLayerName : affectedTileLayers) {
            addLayerDirtyRegion(transaction, tileLayerName, affectedBounds);
        }
    }
View Full Code Here


    }

    @Test
    public void testNoInteractionsInUnusedMethods() {

        TransactionType request = mock(TransactionType.class);

        TransactionType returned = listener.beforeTransaction(request);
        assertSame(request, returned);
        verifyNoMoreInteractions(request, mediator);

        listener.beforeCommit(request);
        verifyNoMoreInteractions(request, mediator);
View Full Code Here

    }

    @Test
    public void testAfterTransactionUncommitted() {

        TransactionType request = mock(TransactionType.class);
        TransactionResponseType result = mock(TransactionResponseType.class);
        boolean committed = false;

        listener.afterTransaction(request, result, committed);
View Full Code Here

        issueInsert(extendedProperties, affectedBounds1);

        issueInsert(extendedProperties, affectedBounds2);

        TransactionType request = mock(TransactionType.class);
        TransactionResponseType result = mock(TransactionResponseType.class);
        when(request.getExtendedProperties()).thenReturn(extendedProperties);

        when(mediator.getDeclaredCrs(anyString())).thenReturn(WGS84);
        listener.afterTransaction(request, result, true);

        ReferencedEnvelope expectedEnv = new ReferencedEnvelope(affectedBounds1);
View Full Code Here

     * "theGroup"
     */
    private void issueInsert(Map<Object, Object> extendedProperties,
            ReferencedEnvelope affectedBounds) {

        TransactionType transaction = mock(TransactionType.class);
        when(transaction.getExtendedProperties()).thenReturn(extendedProperties);

        TransactionEvent event = mock(TransactionEvent.class);

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

View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        TransactionType transaction = wfsfactory.createTransactionType();

        //&lt;xsd:element minOccurs="0" ref="wfs:LockId"&gt;
        if (node.hasChild("LockId")) {
            transaction.setLockId((String) node.getChildValue("LockId"));
        }

        //&lt;xsd:choice maxOccurs="unbounded" minOccurs="0"&gt;
        //  &lt;xsd:element ref="wfs:Insert"/&gt;
        //  &lt;xsd:element ref="wfs:Update"/&gt;
        //  &lt;xsd:element ref="wfs:Delete"/&gt;
        //  &lt;xsd:element ref="wfs:Native"/&gt;
        //&lt;/xsd:choice&gt;
        for (Iterator itr = node.getChildren().iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();
            Object cv = child.getValue();

            if (cv instanceof InsertElementType) {
                transaction.getInsert().add(cv);
            } else if (cv instanceof UpdateElementType) {
                transaction.getUpdate().add(cv);
            } else if (cv instanceof DeleteElementType) {
                transaction.getDelete().add(cv);
            } else if (cv instanceof NativeType) {
                transaction.getNative().add(cv);
            }
        }

        //&lt;xsd:attribute name="releaseAction" type="wfs:AllSomeType" use="optional"&gt;
        if (node.hasAttribute(AllSomeType.class)) {
            transaction.setReleaseAction((AllSomeType) node.getAttributeValue(AllSomeType.class));
        }

        return transaction;
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        TransactionType transaction = wfsfactory.createTransactionType();

        //lock id
        if (node.hasChild("LockId")) {
            transaction.setLockId((String) node.getChildValue("LockId"));
        }

        //transactions, need to maintain order
        for (Iterator itr = node.getChildren().iterator(); itr.hasNext();) {
            Node child = (Node) itr.next();
            Object cv = child.getValue();

            if (cv instanceof InsertElementType) {
                transaction.getInsert().add(cv);
            } else if (cv instanceof UpdateElementType) {
                transaction.getUpdate().add(cv);
            } else if (cv instanceof DeleteElementType) {
                transaction.getDelete().add(cv);
            } else if (cv instanceof NativeType) {
                transaction.getNative().add(cv);
            }
        }

        //service + version
        WFSBindingUtils.service(transaction, node);
        WFSBindingUtils.version(transaction, node);

        //handle
        if (node.hasAttribute("handle")) {
            transaction.setHandle((String) node.getAttributeValue("handle"));
        }

        //release action
        if (node.hasAttribute(AllSomeType.class)) {
            transaction.setReleaseAction((AllSomeType) node.getAttributeValue(AllSomeType.class));
        }

        return transaction;
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfs.TransactionType

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.