Search in sources :

Example 1 with DescribeSensorType

use of net.opengis.swes.x20.DescribeSensorType in project arctic-sea by 52North.

the class SwesDecoderv20 method parseDescribeSensor.

/**
 * parses the passes XmlBeans document and creates a SOS describeSensor
 * request
 *
 * @param xbDescSenDoc
 *            XmlBeans document representing the describeSensor request
 * @return Returns SOS describeSensor request
 *
 * @throws DecodingException
 *             * if validation of the request failed
 */
private OwsServiceRequest parseDescribeSensor(final DescribeSensorDocument xbDescSenDoc) throws DecodingException {
    final DescribeSensorRequest descSensorRequest = new DescribeSensorRequest();
    final DescribeSensorType xbDescSensor = xbDescSenDoc.getDescribeSensor();
    descSensorRequest.setService(xbDescSensor.getService());
    descSensorRequest.setVersion(xbDescSensor.getVersion());
    descSensorRequest.setProcedure(xbDescSensor.getProcedure());
    descSensorRequest.setProcedureDescriptionFormat(xbDescSensor.getProcedureDescriptionFormat());
    if (xbDescSensor.isSetValidTime()) {
        descSensorRequest.setValidTime(getValidTime(xbDescSensor.getValidTime()));
    }
    // extensions
    descSensorRequest.setExtensions(parseExtensibleRequest(xbDescSensor));
    return descSensorRequest;
}
Also used : DescribeSensorType(net.opengis.swes.x20.DescribeSensorType) DescribeSensorRequest(org.n52.shetland.ogc.sos.request.DescribeSensorRequest)

Example 2 with DescribeSensorType

use of net.opengis.swes.x20.DescribeSensorType in project arctic-sea by 52North.

the class DescribeSensorV2RequestEncoder method create.

@Override
protected XmlObject create(DescribeSensorRequest request) throws EncodingException {
    validateInput(request);
    DescribeSensorDocument doc = DescribeSensorDocument.Factory.newInstance(getXmlOptions());
    DescribeSensorType descSensType = doc.addNewDescribeSensor();
    descSensType.setVersion(request.getVersion());
    descSensType.setService(request.getService());
    descSensType.setProcedure(request.getProcedure());
    descSensType.setProcedureDescriptionFormat(request.getProcedureDescriptionFormat());
    return doc;
}
Also used : DescribeSensorDocument(net.opengis.swes.x20.DescribeSensorDocument) DescribeSensorType(net.opengis.swes.x20.DescribeSensorType)

Aggregations

DescribeSensorType (net.opengis.swes.x20.DescribeSensorType)2 DescribeSensorDocument (net.opengis.swes.x20.DescribeSensorDocument)1 DescribeSensorRequest (org.n52.shetland.ogc.sos.request.DescribeSensorRequest)1