Examples of CSWConfiguration


Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testSortByIdentifier() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=brief&sortBy=dc:identifier:A";
        Document d = getAsDOM(request, "ISO-8859-1");
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);

        // basic checks
        assertXpathEvaluatesTo("brief", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("12", "//csw:SearchResults/@numberOfRecordsMatched", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

    @Test
    public void testSortByDateSelectElements() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results" +
            "&elementName=dc:identifier,dc:type,dc:date&sortBy=dc:date:A";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);

        // basic checks
        assertXpathEvaluatesTo("full", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("12", "//csw:SearchResults/@numberOfRecordsMatched", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

    @Test
    public void testFilterBBox() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results" +
                "&elementName=dc:identifier,ows:BoundingBox&constraint=BBOX(ows:BoundingBox, 47.0, -4.5, 52.0, 1.0)";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        print(d);

        // basic checks
        assertXpathEvaluatesTo("full", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("2", "//csw:SearchResults/@numberOfRecordsMatched", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

    @Test
    public void testValidateGet() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=validate";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);
       
        XpathEngine xpath = XMLUnit.newXpathEngine();
        assertXpathEvaluatesTo("http://localhost:8080/geoserver/" + request, "/csw:Acknowledgement/csw:EchoedRequest/ows:Get/@xlink:href", d);
       
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testValidatePost() throws Exception {
        String request = getResourceAsString("GetRecordsValidate.xml");
        Document d = postAsDOM("csw", request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);
       
        XpathEngine xpath = XMLUnit.newXpathEngine();
        String timeStamp = xpath.evaluate("/csw:Acknowledgement/@timeStamp", d);
        assertGMLTimestamp(timeStamp);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testStartPositionOverNumberOfRecords() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=brief&startPosition=50&maxRecords=10";
        Document d = getAsDOM(request, "ISO-8859-1");
        checkValidationErrors(d, new CSWConfiguration());
       
        // check we have the expected results
        assertXpathEvaluatesTo("brief", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("12", "//csw:SearchResults/@numberOfRecordsMatched", d);
        assertXpathEvaluatesTo("0", "//csw:SearchResults/@numberOfRecordsReturned", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

        assertEquals("REC-12", dr.getId().get(2).toString());
    }

    @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 org.geotools.csw.CSWConfiguration

     *
     * @throws TransformerException
     * @throws ParserConfigurationException
     */
    protected void checkValidationErrors(Document dom) throws Exception {
        checkValidationErrors(dom, new CSWConfiguration());
    }
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

    public void testRecords() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record" +
            "&resultType=results&elementSetName=full&maxRecords=100";
        Document d = getAsDOM(request);
        //print(d);
        checkValidationErrors(d, new CSWConfiguration());
       

        assertXpathExists("//csw:Record[dc:title='"+ NAME_BUILDINGSANDBRIDGES + "']", d);  
        assertXpathExists("//csw:Record[dc:title='"+ NAME_FORESTSANDSTREAMS + "']", d);       
       
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

    public void testAllRecords() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record" +
            "&resultType=results&elementSetName=full&maxRecords=100";
        Document d = getAsDOM(request);
        //print(d);
        checkValidationErrors(d, new CSWConfiguration());

        // we have the right kind of document
        assertXpathEvaluatesTo("1", "count(/csw:GetRecordsResponse)", d);

        // check we have the expected results
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.