Examples of CSWConfiguration


Examples of org.geotools.csw.CSWConfiguration

        assertEquals(ElementSetType.BRIEF, query.getElementSetName().getValue());
    }

    @Test
    public void testXMLReaderParameter() throws Exception {
        CSWXmlReader reader = new CSWXmlReader("GetRecords", "2.0.2", new CSWConfiguration());
        GetRecordsType gr = (GetRecordsType) reader.read(null,
                getResourceAsReader("GetRecordsBrief.xml"), (Map) null);
        // check the attributes
        assertEquals("application/xml", gr.getOutputFormat());
        assertEquals("urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0", gr.getOutputSchema());
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

    @Test
    public void testHitRequest() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);

        // we have the right kind of document
        assertXpathEvaluatesTo("1", "count(/csw:GetRecordsResponse)", d);
        XpathEngine xpath = XMLUnit.newXpathEngine();
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testHitMaxOffset() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&startPosition=5&maxRecords=2";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);

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

Examples of org.geotools.csw.CSWConfiguration

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

Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testAllRecordsBrief() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=brief";
        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("10", "//csw:SearchResults/@numberOfRecordsReturned", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

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

Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testEmptyResult() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&constraint=dc:title = 'foo'";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());

        // print(d);
        assertXpathEvaluatesTo("summary", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("0", "//csw:SearchResults/@numberOfRecordsMatched", d);
        assertXpathEvaluatesTo("0", "//csw:SearchResults/@numberOfRecordsReturned", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

        assertIpsumRecords(d);
    }
   
    private void assertIpsumRecords(Document d) throws Exception {
        checkValidationErrors(d, new CSWConfiguration());
       
        // basic checks
        assertXpathEvaluatesTo("brief", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("2", "//csw:SearchResults/@numberOfRecordsMatched", d);
        assertXpathEvaluatesTo("2", "//csw:SearchResults/@numberOfRecordsReturned", d);
View Full Code Here

Examples of org.geotools.csw.CSWConfiguration

   
    @Test
    public void testFullTextSearch() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=brief&constraint=AnyText like '%25sed%25'";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);

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

Examples of org.geotools.csw.CSWConfiguration

     */
    @Test
    public void testFullTextSearchCaseInsensitive() throws Exception {
        String request = "csw?service=CSW&version=2.0.2&request=GetRecords&typeNames=csw:Record&resultType=results&elementSetName=full&constraint=AnyText like '%25lorem%25'";
        Document d = getAsDOM(request);
        checkValidationErrors(d, new CSWConfiguration());
        // print(d);

        // basic checks
        assertXpathEvaluatesTo("full", "//csw:SearchResults/@elementSet", d);
        assertXpathEvaluatesTo("5", "//csw:SearchResults/@numberOfRecordsMatched", d);
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.