Package net.opengis.wfs20

Examples of net.opengis.wfs20.Wfs20Factory


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetOutputFormats(OutputFormatListType newOutputFormats, NotificationChain msgs) {
        OutputFormatListType oldOutputFormats = outputFormats;
        outputFormats = newOutputFormats;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wfs20Package.FEATURE_TYPE_TYPE__OUTPUT_FORMATS, oldOutputFormats, newOutputFormats);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here


        return eType.getOtherCRS();
    }

    @Override
    public Set<String> getOutputFormats() {
        final OutputFormatListType outputFormats = eType.getOutputFormats();
        if (null == outputFormats) {
            return Collections.emptySet();
        }

        List<String> ftypeDeclaredFormats = outputFormats.getFormat();
        if (null == ftypeDeclaredFormats || ftypeDeclaredFormats.isEmpty()) {
            return Collections.emptySet();
        }

        return new HashSet<String>(ftypeDeclaredFormats);
View Full Code Here

       
        StoredQueryDescriptionType  sqd = csq.getStoredQueryDefinition().get(0);
        assertEquals("Features In Polygon", sqd.getTitle().get(0).getValue());
       
        assertEquals(1, sqd.getParameter().size());
        ParameterExpressionType pe = sqd.getParameter().get(0);
        assertEquals("AreaOfInterest", pe.getName());
        assertEquals(GML.Polygon, pe.getType());
       
        assertEquals(1, sqd.getQueryExpressionText().size());
        QueryExpressionTextType qet = sqd.getQueryExpressionText().get(0);
        assertEquals("urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression", qet.getLanguage());
        assertFalse(qet.isIsPrivate());
View Full Code Here

        StoredQueryDescriptionType sqd = (StoredQueryDescriptionType) parse(WFS.StoredQueryDescriptionType);
        assertNotNull(sqd);
       
        assertEquals(1, sqd.getParameter().size());
       
        ParameterExpressionType p = sqd.getParameter().get(0);
        assertEquals("AreaOfInterest", p.getName());
        assertEquals(GML.Polygon, p.getType());
       
        assertEquals(1, sqd.getQueryExpressionText().size());
    }
View Full Code Here

    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>" +
View Full Code Here

       
        assertEquals(1, gf.getAbstractQueryExpression().size());
       
        StoredQueryType sq = (StoredQueryType) gf.getAbstractQueryExpression().get(0);
        assertEquals(1, sq.getParameter().size());
        ParameterType p = sq.getParameter().get(0);
        assertEquals("AreaOfInterest", p.getName());
        assertNotNull(p.getValue());
        assertTrue(p.getValue().contains("gml:Polygon"));
    }
View Full Code Here

        assertEquals(1, t.getAbstractTransactionAction().size());
       
        UpdateType u = (UpdateType) t.getAbstractTransactionAction().get(0);
        assertEquals(1, u.getProperty().size());
       
        PropertyType p = u.getProperty().get(0);
        assertEquals("population", p.getValueReference().getValue().getLocalPart());
        assertEquals("4070000", p.getValue());
       
        Id id = (Id) u.getFilter();
        assertNotNull(id);
        assertTrue(id.getIDs().contains("BuiltUpA_1M.10131"));
    }
View Full Code Here

        ParameterExpressionType pe = sqd.getParameter().get(0);
        assertEquals("AreaOfInterest", pe.getName());
        assertEquals(GML.Polygon, pe.getType());
       
        assertEquals(1, sqd.getQueryExpressionText().size());
        QueryExpressionTextType qet = sqd.getQueryExpressionText().get(0);
        assertEquals("urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression", qet.getLanguage());
        assertFalse(qet.isIsPrivate());
        assertEquals(3, qet.getReturnFeatureTypes().size());
        assertNotNull(qet.getValue());
        assertTrue(qet.getValue().contains("wfs:Query"));
    }
View Full Code Here

   
    @Override
    public Element encode(Object object, Document document, Element value) throws Exception {
        Element e = super.encode(object, document, value);
       
        QueryExpressionTextType qe = (QueryExpressionTextType) object;
        if (!qe.isIsPrivate()) {
            //include the query text

            //this is a hack, but we need to build up a dom with namespaces without actually
            // having them decelared by the edxpression text, so we first parse the query
            // expression with a sax handler that can transform to a namespace aware dom
            // using the current namespace context
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);

            ConvertToDomHandler h = new ConvertToDomHandler(
                dbf.newDocumentBuilder().newDocument(), namespaceContext);
           
            SAXParser saxp = SAXParserFactory.newInstance().newSAXParser();
            saxp.parse(new ByteArrayInputStream(qe.getValue().getBytes()), h);
           
            Document d = h.getDocument();
            e.appendChild(document.importNode(d.getDocumentElement(), true));
        }
       
View Full Code Here

        "     ${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);

        Document dom = encode(sqd, WFS.StoredQueryDescription, WFS.StoredQueryDescriptionType);
        assertEquals("wfs:StoredQueryDescription", dom.getDocumentElement().getNodeName());
        assertEquals(1, dom.getElementsByTagName("wfs:QueryExpressionText").getLength());
       
View Full Code Here

TOP

Related Classes of net.opengis.wfs20.Wfs20Factory

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.