Package net.opengis.wfs20

Examples of net.opengis.wfs20.UpdateType


        b.add("one");
        b.add("1");
        b.add(DATE_FORMAT.parse("2011-06-20 11:11:11"));
        features.add(b.buildFeature(null));

        ValueCollectionType vc = Wfs20Factory.eINSTANCE.createValueCollectionType();
        PropertyValueCollection valueCollection = new PropertyValueCollection(features, featureType.getDescriptor("geom"), filterFac.property("geom"));
        vc.getMember().add(valueCollection);

        Document doc = encode(vc, WFS.ValueCollection);
        assertEquals("wfs:ValueCollection", doc.getDocumentElement().getNodeName());
        assertEquals(2, getElementsByQName(doc, WFS.member).getLength());
       
        NodeList geoms = getElementsByQName(doc, new QName("http://geotools.org", "geom"));
        assertEquals(2, geoms.getLength());

        assertNotNull(getElementByQName((Element)geoms.item(0), GML.Point));
        assertNotNull(getElementByQName((Element)geoms.item(1), GML.Point));
       
        vc = Wfs20Factory.eINSTANCE.createValueCollectionType();
        vc.getMember().add(new PropertyValueCollection(features, featureType.getDescriptor("str"), filterFac.property("str")));

        doc = encode(vc, WFS.ValueCollection);
        assertEquals("wfs:ValueCollection", doc.getDocumentElement().getNodeName());
        assertEquals(2, getElementsByQName(doc, WFS.member).getLength());
       
        NodeList strs = getElementsByQName(doc, new QName("http://geotools.org", "str"));
        assertEquals(2, strs.getLength());

        Set vals = new HashSet(Arrays.asList("zero", "one"));
        vals.remove(strs.item(0).getFirstChild().getNodeValue());
        vals.remove(strs.item(1).getFirstChild().getNodeValue());
        assertTrue(vals.isEmpty());
       
        vc = Wfs20Factory.eINSTANCE.createValueCollectionType();
        vc.getMember().add(new PropertyValueCollection(features, featureType.getDescriptor("date"), filterFac.property("date")));

        doc = encode(vc, WFS.ValueCollection);
        assertEquals("wfs:ValueCollection", doc.getDocumentElement().getNodeName());
        assertEquals(2, getElementsByQName(doc, WFS.member).getLength());
       
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetValueList(ValueListType newValueList, NotificationChain msgs) {
        ValueListType oldValueList = valueList;
        valueList = newValueList;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wfs20Package.ELEMENT_TYPE__VALUE_LIST, oldValueList, newValueList);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setValueReference(ValueReferenceType newValueReference) {
        ValueReferenceType oldValueReference = valueReference;
        valueReference = newValueReference;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.PROPERTY_TYPE__VALUE_REFERENCE, oldValueReference, valueReference));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetWSDL(WSDLType newWSDL, NotificationChain msgs) {
        WSDLType oldWSDL = wSDL;
        wSDL = newWSDL;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wfs20Package.WFS_CAPABILITIES_TYPE__WSDL, oldWSDL, newWSDL);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

import org.w3c.dom.Element;

public class ListStoredQueriesResponseTypeBindingTest extends WFSTestSupport {

    public void testEncode() throws Exception {
        Wfs20Factory factory = Wfs20Factory.eINSTANCE;
       
        StoredQueryListItemType sqli = factory.createStoredQueryListItemType();
        sqli.setId("fooId");
       
        TitleType title = factory.createTitleType();
        title.setValue("fooTitle");
        sqli.getTitle().add(title);
       
        sqli.getReturnFeatureType().add(new QName("http://foo.org", "fooName", "foo"));
       
        ListStoredQueriesResponseType lsqr = factory.createListStoredQueriesResponseType();
        lsqr.getStoredQuery().add(sqli);

        Document dom = encode(lsqr, WFS.ListStoredQueriesResponse);
       
        Element e = getElementByQName(dom, WFS.StoredQuery);
View Full Code Here

       
        assertEquals(1, sqd.getQueryExpressionText().size());
    }

    public void testEncode() throws Exception {
        Wfs20Factory f = Wfs20Factory.eINSTANCE;
        StoredQueryDescriptionType sqd = f.createStoredQueryDescriptionType();
        sqd.setId("foo");

        ParameterExpressionType p = f.createParameterExpressionType();
        p.setName("AreaOfInterest");
        p.setType(GML.Polygon);
        sqd.getParameter().add(p);

        String xml =
        "<wfs:Query typeNames='myns:Parks'>" +
        "  <fes:Filter>" +
        "   <fes:Within>\n" +
        "     <fes:ValueReference>geometry</fes:ValueReference>" +
        "     ${AreaOfInterest}" +
        "   </fes:Within>" +
        "  </fes:Filter>" +
        "</wfs:Query> ";
       
        QueryExpressionTextType qet = f.createQueryExpressionTextType();
        sqd.getQueryExpressionText().add(qet);
       
        qet.setLanguage("urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression");
        qet.setReturnFeatureTypes(Arrays.asList(new QName("http://www.someserver.com/myns", "Parks")));
        qet.setValue(xml);
View Full Code Here

    public static boolean invokeSetResourceProperty(String prop, String value, String filesystemEPRUrl)
    {
        SetResourcePropertiesDocument setResourcePropertiesDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setResourceProperties = setResourcePropertiesDocument.addNewSetResourceProperties();
        UpdateType updateType = UpdateType.Factory.newInstance();

        XmlObject simpleType = XmlBeanUtils.addChildElement(updateType, QName.valueOf(prop));
        XmlBeanUtils.setValue(simpleType, value);
        setResourceProperties.setUpdateArray(new UpdateType[]{updateType});
View Full Code Here

    protected void updateResourceProperty( XmlObject[] propElems )
    {
        SetResourcePropertiesPortTypeImpl setProvider = new SetResourcePropertiesPortTypeImpl( m_resourceContext );
        SetResourcePropertiesDocument setDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setType = setDocument.addNewSetResourceProperties();
        UpdateType updateType = setType.addNewUpdate();
        for ( int i = 0; i < propElems.length; i++ )
        {
            XmlBeanUtils.addChildElement( updateType, propElems[i] );
        }
        setProvider.setResourceProperties( setDocument ).getSetResourcePropertiesResponse();
View Full Code Here

        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );

        SetResourcePropertiesProvider set_provider = new SetResourcePropertiesProvider( m_resourceContext );
        UpdateDocument updateDoc = UpdateDocument.Factory.newInstance();
        UpdateType update = updateDoc.addNewUpdate();

        XmlObject xmlObject =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + newValue + "</foo:Ebi>" );
        XmlBeanUtils.addChildElement( update, xmlObject );
View Full Code Here

        m_resourceContext = new SushiResourceContext( true );
        insertXsdAnyPropElem();
        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.FUGU, INITIAL_PROP_VALUE_FUGU );
        SetResourcePropertiesProvider set_provider = new SetResourcePropertiesProvider( m_resourceContext );
        UpdateDocument updateDoc = UpdateDocument.Factory.newInstance();
        UpdateType update = updateDoc.addNewUpdate();
        XmlObject anyXBean = createXsdAnyPropElem();
        final String newValue = "yummy!";
        XmlBeanUtils.setValue( anyXBean, newValue );
        XmlBeanUtils.addChildElement( update, anyXBean );
        set_provider.updateResourceProperty( updateDoc.getUpdate() );
View Full Code Here

TOP

Related Classes of net.opengis.wfs20.UpdateType

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.