Package net.opengis.wfs20.impl

Examples of net.opengis.wfs20.impl.CreateStoredQueryResponseTypeImpl


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetValueCollection(ValueCollectionType newValueCollection, NotificationChain msgs) {
        ValueCollectionType oldValueCollection = valueCollection;
        valueCollection = newValueCollection;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wfs20Package.ADDITIONAL_OBJECTS_TYPE__VALUE_COLLECTION, oldValueCollection, newValueCollection);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here


        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

        }
        else {
            throw new WFSException(request, String.format("Stored query %s does not exist.", request.getId()));
        }
       
        Wfs20Factory factory = Wfs20Factory.eINSTANCE;
        ExecutionStatusType response = factory.createExecutionStatusType();
        response.setStatus("OK");
        return response;
    }
View Full Code Here

        this.storedQueryProvider = storedQueryProvider;
    }
   
    public DescribeStoredQueriesResponseType run(DescribeStoredQueriesType request) throws WFSException {
       
        Wfs20Factory factory = Wfs20Factory.eINSTANCE;
        DescribeStoredQueriesResponseType response =
            factory.createDescribeStoredQueriesResponseType();
       
        List<StoredQueryProvider> providers =
            GeoServerExtensions.extensions(StoredQueryProvider.class);
       
        if (request.getStoredQueryId().isEmpty()) {
View Full Code Here

            catch(Exception e) {
                throw new WFSException(request, "Error occured creating stored query", e);
            }
        }

        Wfs20Factory factory = Wfs20Factory.eINSTANCE;
        CreateStoredQueryResponseType response = factory.createCreateStoredQueryResponseType();
        response.setStatus("OK");
        return response;
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfs20.impl.CreateStoredQueryResponseTypeImpl

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.