Examples of GetRecordByIdType


Examples of net.opengis.cat.csw20.GetRecordByIdType

        assertEquals(filter, constraint.getFilter());
    }

    @Test
    public void testParseGetRecordsById() throws Exception {
        GetRecordByIdType gr = (GetRecordByIdType) parser.parse(getClass().getResourceAsStream(
                "GetRecordById.xml"));
        // check the attributes
        assertEquals("CSW", gr.getService());
        assertEquals("2.0.2", gr.getVersion());
        assertEquals("application/xml", gr.getOutputFormat());
        assertEquals("http://www.opengis.net/cat/csw/2.0.2", gr.getOutputSchema());
       
        // the element set name
        ElementSetNameType esn = gr.getElementSetName();
        assertEquals(ElementSetType.SUMMARY, esn.getValue());
       
        // the ids
        List<URI> ids = gr.getId();
        assertEquals(new URI("REC-10"), ids.get(0));
        assertEquals(new URI("REC-11"), ids.get(1));
        assertEquals(new URI("REC-12"), ids.get(2));
    }
View Full Code Here

Examples of net.opengis.cat.csw20.GetRecordByIdType

        raw.put("outputFormat", "application/xml");
        raw.put("outputSchema", "http://www.opengis.net/cat/csw/2.0.2");

        GetRecordByIdKvpRequestReader reader = new GetRecordByIdKvpRequestReader();
        Object request = reader.createRequest();
        GetRecordByIdType dr = (GetRecordByIdType) reader.read(request, parseKvp(raw), raw);
       
        assertGetRecordByIdValid(dr);
    }
View Full Code Here

Examples of net.opengis.cat.csw20.GetRecordByIdType

    }

    @Test
    public void testXMLReader() throws Exception {
        CSWXmlReader reader = new CSWXmlReader("GetRecordById", "2.0.2", new CSWConfiguration());
        GetRecordByIdType dr = (GetRecordByIdTypereader.read(null, getResourceAsReader("GetRecordById.xml"), (Map) null);
        assertGetRecordByIdValid(dr);
    }
View Full Code Here

Examples of net.opengis.cat.csw20.GetRecordByIdType

    }

    private String getRequestedSchema(Operation operation) {
        Object request = operation.getParameters()[0];
        if (request instanceof GetRecordByIdType) {
            GetRecordByIdType gr = (GetRecordByIdType) request;
            return gr.getOutputSchema();
        } else if (request instanceof GetRecordsType) {
            GetRecordsType gr = (GetRecordsType) request;
            return gr.getOutputSchema();
        } else {
            throw new IllegalArgumentException("Unsupported request object type: " + request);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.