Package net.opengis.cat.csw20

Examples of net.opengis.cat.csw20.ResultType


            for (QName qn : query.getElementName()) {
                result.add(store.translateProperty(rd, Types.toTypeName(qn)));
            }
            return result;
        } else {
            ElementSetType elementSet = getElementSet(query);
            List<Name> properties = rd.getPropertiesForElementSet(elementSet);
            if(properties != null) {
                List<PropertyName> result = new ArrayList<PropertyName>();
                for (Name pn : properties) {
                    result.add(store.translateProperty(rd, pn));
View Full Code Here


    private ElementSetType getElementSet(QueryType query) {
        if(query.getElementName() != null && query.getElementName().size() > 0) {
            return ElementSetType.FULL;
        }
        ElementSetType elementSet = query.getElementSetName() != null ? query.getElementSetName().getValue() : null;
        if(elementSet == null) {
            // the default is "summary"
            elementSet = ElementSetType.SUMMARY;
        }
        return elementSet;
View Full Code Here

    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

public class GetDomainTest {
    Parser parser = new Parser(new CSWConfiguration());
   
    @Test
    public void testParseGetDomainParameter() throws Exception {
        GetDomainType gd = (GetDomainType) parser.parse(getClass().getResourceAsStream(
                "GetDomainParameter.xml"));
        // check the attributes
        assertEquals("CSW", gd.getService());
        assertEquals("2.0.2", gd.getVersion());
       
        assertEquals("GetRecords.outputFormat", gd.getParameterName());
    }
View Full Code Here

        assertEquals("GetRecords.outputFormat", gd.getParameterName());
    }
   
    @Test
    public void testParseGetDomainProperty() throws Exception {
        GetDomainType gd = (GetDomainType) parser.parse(getClass().getResourceAsStream(
                "GetDomainProperty.xml"));
        // check the attributes
        assertEquals("CSW", gd.getService());
        assertEquals("2.0.2", gd.getVersion());
       
        assertEquals("foo", gd.getPropertyName());
    }
View Full Code Here

        raw.put("request", "GetDomain");
        raw.put("parameterName", "GetRecords.resultType");

        GetDomainKvpRequestReader reader = new GetDomainKvpRequestReader();
        Object request = reader.createRequest();
        GetDomainType gd = (GetDomainType) reader.read(request, parseKvp(raw), raw);

        assertEquals("CSW", gd.getService());
        assertEquals("2.0.2", gd.getVersion());
        assertEquals("GetRecords.resultType", gd.getParameterName());
    }
View Full Code Here

        raw.put("request", "GetDomain");
        raw.put("propertyName", "dc:title");

        GetDomainKvpRequestReader reader = new GetDomainKvpRequestReader();
        Object request = reader.createRequest();
        GetDomainType gd = (GetDomainType) reader.read(request, parseKvp(raw), raw);

        assertEquals("CSW", gd.getService());
        assertEquals("2.0.2", gd.getVersion());
        assertEquals("dc:title", gd.getPropertyName());
    }
View Full Code Here

    }

    @Test
    public void testXMLReaderParameter() throws Exception {
        CSWXmlReader reader = new CSWXmlReader("GetDomain", "2.0.2", new CSWConfiguration());
        GetDomainType gd = (GetDomainType) reader.read(null,
                getResourceAsReader("GetDomainParameter.xml"), (Map) null);
        assertEquals("CSW", gd.getService());
        assertEquals("2.0.2", gd.getVersion());
        assertEquals("GetRecords.resultType", gd.getParameterName());
    }
View Full Code Here

    }

    @Test
    public void testXMLReaderProperty() throws Exception {
        CSWXmlReader reader = new CSWXmlReader("GetDomain", "2.0.2", new CSWConfiguration());
        GetDomainType gd = (GetDomainType) reader.read(null,
                getResourceAsReader("GetDomainProperty.xml"), (Map) null);
        assertEquals("CSW", gd.getService());
        assertEquals("2.0.2", gd.getVersion());
        assertEquals("dc:title", gd.getPropertyName());
    }
View Full Code Here

        assertEquals(new URI("REC-12"), ids.get(2));
    }
   
    @Test
    public void testParseGetRecordsByIdResponse() throws Exception {
        GetRecordByIdResponseType response = (GetRecordByIdResponseType) parser.parse(getClass().getResourceAsStream(
                "GetRecordByIdResponse.xml"));
        assertNotNull(response);
        EList<AbstractRecordType> records = response.getAbstractRecord();
        assertEquals(1, records.size());
        RecordType record = (RecordType) records.get(0);
    }
View Full Code Here

TOP

Related Classes of net.opengis.cat.csw20.ResultType

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.