Search in sources :

Example 1 with GetResultResponseDocument

use of net.opengis.sos.x20.GetResultResponseDocument in project arctic-sea by 52North.

the class SosDecoderv20 method parseGetResultResponse.

private OwsServiceResponse parseGetResultResponse(final GetResultResponseDocument getResultResponseDoc) throws DecodingException {
    final GetResultResponse sosGetResultResponse = new GetResultResponse();
    final GetResultResponseType getResultResponse = getResultResponseDoc.getGetResultResponse();
    final String resultValues = parseResultValues(getResultResponse.getResultValues());
    sosGetResultResponse.setResultValues(resultValues);
    return sosGetResultResponse;
}
Also used : GetResultResponseType(net.opengis.sos.x20.GetResultResponseType) GetResultResponse(org.n52.shetland.ogc.sos.response.GetResultResponse) XmlString(org.apache.xmlbeans.XmlString)

Example 2 with GetResultResponseDocument

use of net.opengis.sos.x20.GetResultResponseDocument in project arctic-sea by 52North.

the class GetResultResponseEncoder method create.

@Override
protected XmlObject create(GetResultResponse response) throws EncodingException {
    GetResultResponseDocument doc = GetResultResponseDocument.Factory.newInstance(getXmlOptions());
    GetResultResponseType gtr = doc.addNewGetResultResponse();
    XmlObject resultValues = gtr.addNewResultValues();
    if (response.hasResultValues()) {
        XmlString xmlString = XmlString.Factory.newInstance();
        xmlString.setStringValue(response.getResultValues());
        resultValues.set(xmlString);
    }
    return doc;
}
Also used : GetResultResponseDocument(net.opengis.sos.x20.GetResultResponseDocument) GetResultResponseType(net.opengis.sos.x20.GetResultResponseType) XmlString(org.apache.xmlbeans.XmlString) XmlObject(org.apache.xmlbeans.XmlObject)

Aggregations

GetResultResponseType (net.opengis.sos.x20.GetResultResponseType)2 XmlString (org.apache.xmlbeans.XmlString)2 GetResultResponseDocument (net.opengis.sos.x20.GetResultResponseDocument)1 XmlObject (org.apache.xmlbeans.XmlObject)1 GetResultResponse (org.n52.shetland.ogc.sos.response.GetResultResponse)1