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;
}
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;
}
Aggregations