Examples of CSWRecordsResult


Examples of org.geoserver.csw.response.CSWRecordsResult

                records = new CompositeFeatureCollection(results);
            }

            ElementSetType elementSet = getElementSetName(request);

            CSWRecordsResult result = new CSWRecordsResult(elementSet,
                    request.getOutputSchema(), numberOfRecordsMatched, numberOfRecordsMatched, 0, timestamp, records);
            return result;
        } catch(IOException e) {
            throw new ServiceException("Request failed due to: " + e.getMessage(), e);
        }
View Full Code Here

Examples of org.geoserver.csw.response.CSWRecordsResult

        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
    }

    public void testEncodeBrief() throws Exception {
        // setup the request
        CSWRecordsResult response = getCSWResponse();
        GetRecordsType request = getCSWRequest();

        // transform it into a GetRecordsResponse
        CSWRecordTransformer tx = new CSWRecordTransformer(request, false);
        tx.setIndentation(2);
View Full Code Here

Examples of org.geoserver.csw.response.CSWRecordsResult

        assertXpathEvaluatesTo("Lorem ipsum dolor sit amet", "//csw:BriefRecord[dc:identifier = 'urn:uuid:a06af396-3105-442d-8b40-22b57a90d2f2']/dc:title", dom);
    }
   
    public void testEncodeSummary() throws Exception {
        // setup the request
        CSWRecordsResult response = getCSWResponse();
        response.setElementSet(ElementSetType.SUMMARY);
        GetRecordsType request = getCSWRequest();

        // transform it into a GetRecordsResponse (this time with the canonical location)
        CSWRecordTransformer tx = new CSWRecordTransformer(request, true);
        tx.setIndentation(2);
View Full Code Here

Examples of org.geoserver.csw.response.CSWRecordsResult

        assertXpathEvaluatesTo("68.41 17.92", "//csw:SummaryRecord[dc:identifier = 'urn:uuid:1ef30a8b-876d-4828-9246-c37ab4510bbd']/ows:BoundingBox/ows:UpperCorner", dom);
    }
   
    public void testEncodeFull() throws Exception {
        // setup the request
        CSWRecordsResult response = getCSWResponse();
        response.setElementSet(null);
        GetRecordsType request = getCSWRequest();

        // transform it into a GetRecordsResponse (this time with the canonical location)
        CSWRecordTransformer tx = new CSWRecordTransformer(request, true);
        tx.setIndentation(2);
View Full Code Here

Examples of org.geoserver.csw.response.CSWRecordsResult

        cal.set(Calendar.YEAR, 2012);
        cal.set(Calendar.MONTH, 6);
        cal.set(Calendar.DAY_OF_MONTH, 10);
        cal.set(Calendar.HOUR_OF_DAY, 15);
        FeatureCollection fc = store.getRecords(Query.ALL, Transaction.AUTO_COMMIT);
        CSWRecordsResult response = new CSWRecordsResult(ElementSetType.BRIEF,
                "http://www.opengis.net/cat/csw/2.0.2", 100, 12, 13, cal.getTime(), fc);
        return response;
    }
View Full Code Here

Examples of org.geoserver.csw.response.CSWRecordsResult

            // in case this is a hits request we are actually not returning any record
            if(resultType == ResultType.HITS) {
                numberOfRecordsReturned = 0;
            }
           
            CSWRecordsResult result = new CSWRecordsResult(elementSet,
                    request.getOutputSchema(), numberOfRecordsMatched, numberOfRecordsReturned, nextRecord, timestamp, records);
            return result;
        } catch(IOException e) {
            throw new ServiceException("Request failed due to: " + e.getMessage(), e);
        }
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.