Package org.geotools.data.wfs.v1_0_0.xml

Examples of org.geotools.data.wfs.v1_0_0.xml.WFSCapabilitiesComplexTypes$GetCapabilitiesType


    Parser parser = new Parser(new CSWConfiguration());

    @Test
    public void testParseCapabilitiesRequest() throws Exception {
        String capRequestPath = "GetCapabilities.xml";
        GetCapabilitiesType caps = (GetCapabilitiesType) parser.parse(getClass().getResourceAsStream(capRequestPath));
        assertEquals("CSW", caps.getService());
       
        List versions = caps.getAcceptVersions().getVersion();
        assertEquals("2.0.2", versions.get(0));
        assertEquals("2.0.0", versions.get(1));
        assertEquals("0.7.2", versions.get(2));
       
        List sections = caps.getSections().getSection();
        assertEquals("OperationsMetadata", sections.get(0));
    }
View Full Code Here


     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        GetCapabilitiesType getCapabilities;

        if ((value != null) && value instanceof GetCapabilitiesType) {
            getCapabilities = (GetCapabilitiesType) value;
        } else {
            getCapabilities = owsfactory.createGetCapabilitiesType();
        }

        getCapabilities.setAcceptVersions((AcceptVersionsType) node.getChildValue(
                AcceptVersionsType.class));
        getCapabilities.setSections((SectionsType) node.getChildValue(SectionsType.class));
        getCapabilities.setAcceptFormats((AcceptFormatsType) node.getChildValue(
                AcceptFormatsType.class));
        getCapabilities.setUpdateSequence((String) node.getAttributeValue("updateSequence"));

        return getCapabilities;
    }
View Full Code Here

        assertEquals( "application/xml", response.getMimeType(null,null));
    }
  
    public void testEncode() throws Exception {
        Ows10Factory f = Ows10Factory.eINSTANCE;
        GetCapabilitiesType caps = f.createGetCapabilitiesType();
        AcceptVersionsType versions = f.createAcceptVersionsType();
        caps.setAcceptVersions( versions );
       
        versions.getVersion().add( "1.0.0" );
        versions.getVersion().add( "1.1.0" );
       
        ByteArrayOutputStream output = new ByteArrayOutputStream();
View Full Code Here

           
            "</ows:GetCapabilities>";

        buildDocument(xml);

        GetCapabilitiesType getCaps = (GetCapabilitiesType) parse();
        assertNotNull(getCaps);
       
        assertEquals( 1, getCaps.getAcceptVersions().getVersion().size() );
    }
View Full Code Here

        assertEquals( "application/xml", response.getMimeType(null,null));
    }
  
    public void testEncode() throws Exception {
        Ows10Factory f = Ows10Factory.eINSTANCE;
        GetCapabilitiesType caps = f.createGetCapabilitiesType();
        AcceptVersionsType versions = f.createAcceptVersionsType();
        caps.setAcceptVersions( versions );
       
        versions.getVersion().add( "1.0.0" );
        versions.getVersion().add( "1.1.0" );
       
        ByteArrayOutputStream output = new ByteArrayOutputStream();
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        GetCapabilitiesType getCapabilities;

        if ((value != null) && value instanceof GetCapabilitiesType) {
            getCapabilities = (GetCapabilitiesType) value;
        } else {
            getCapabilities = owsfactory.createGetCapabilitiesType();
        }

        getCapabilities.setAcceptVersions((AcceptVersionsType) node.getChildValue(
                AcceptVersionsType.class));
        getCapabilities.setSections((SectionsType) node.getChildValue(SectionsType.class));
        getCapabilities.setAcceptFormats((AcceptFormatsType) node.getChildValue(
                AcceptFormatsType.class));
        getCapabilities.setUpdateSequence((String) node.getAttributeValue("updateSequence"));

        return getCapabilities;
    }
View Full Code Here

   
    @Override
    protected void qualifyRequest(WorkspaceInfo workspace, LayerInfo layer, Operation operation, Request request) {
        NamespaceInfo ns = catalog.getNamespaceByPrefix(workspace.getName());
       
        GetCapabilitiesType caps =
            (GetCapabilitiesType) OwsUtils.parameter(operation.getParameters(), GetCapabilitiesType.class);
        if (caps != null) {
            caps.setNamespace(workspace.getName());
            return;
        }
       
        DescribeFeatureTypeType dft =
            (DescribeFeatureTypeType) OwsUtils.parameter(operation.getParameters(), DescribeFeatureTypeType.class);
View Full Code Here

        raw.put("sections", "OperationsMetadata,foo");
        raw.put("acceptFormats", "application/xml,text/plain");

        GetCapabilitiesKvpRequestReader reader = new GetCapabilitiesKvpRequestReader();
        Object request = reader.createRequest();
        GetCapabilitiesType caps = (GetCapabilitiesType) reader.read(request, parseKvp(raw), raw);
        assertReturnedCapabilitiesComplete(caps);
    }
View Full Code Here

    }

    @Test
    public void testXMLReader() throws Exception {
        CSWXmlReader reader = new CSWXmlReader("GetCapabilities", "2.0.2", new CSWConfiguration());
        GetCapabilitiesType caps = (GetCapabilitiesType) reader.read(null,
                getResourceAsReader("GetCapabilities.xml"), (Map) null);
        assertReturnedCapabilitiesComplete(caps);
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        GetCapabilitiesType getCapabilities;

        if ((value != null) && value instanceof GetCapabilitiesType) {
            getCapabilities = (GetCapabilitiesType) value;
        } else {
            getCapabilities = owsfactory.createGetCapabilitiesType();
        }

        getCapabilities.setAcceptVersions((AcceptVersionsType) node.getChildValue(
                AcceptVersionsType.class));
        getCapabilities.setSections((SectionsType) node.getChildValue(SectionsType.class));
        getCapabilities.setAcceptFormats((AcceptFormatsType) node.getChildValue(
                AcceptFormatsType.class));
        getCapabilities.setUpdateSequence((String) node.getAttributeValue("updateSequence"));

        return getCapabilities;
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.wfs.v1_0_0.xml.WFSCapabilitiesComplexTypes$GetCapabilitiesType

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.