private void addSensorDescription(final RegisterSensor regSensor, final ParameterContainer parameters) throws OXFException { final SensorDescription sensorDesc = regSensor.addNewSensorDescription(); SensorMLDocument sensorDescripiton = null; try { sensorDescripiton = SensorMLDocument.Factory.parse((String) parameters.getParameterShellWithCommonName(REGISTER_SENSOR_ML_DOC_PARAMETER).getSpecifiedValue()); } catch (final XmlException e) { LOGGER.error(String.format("Exception thrown: %s", e.getMessage()), e); } sensorDesc.set(sensorDescripiton); }
/** * Sets the "RegisterSensor" element */ public void setRegisterSensor(net.opengis.sos.x10.RegisterSensorDocument.RegisterSensor registerSensor) { synchronized (monitor()) { check_orphaned(); net.opengis.sos.x10.RegisterSensorDocument.RegisterSensor target = null; target = (net.opengis.sos.x10.RegisterSensorDocument.RegisterSensor)get_store().find_element_user(REGISTERSENSOR$0, 0); if (target == null) { target = (net.opengis.sos.x10.RegisterSensorDocument.RegisterSensor)get_store().add_element_user(REGISTERSENSOR$0); } target.set(registerSensor); } }
private void addObservationTemplate(final RegisterSensor regSensor, final ParameterContainer parameters) throws OXFException { ObservationTemplate obsTemp = ObservationTemplate.Factory.newInstance(); // TODO add method "addParameterShell(String, XmlObject)" to ParameterContainer try { obsTemp = regSensor.addNewObservationTemplate(); final ObservationType obsType = ObservationType.Factory.parse((String)parameters.getParameterShellWithCommonName(REGISTER_SENSOR_OBSERVATION_TEMPLATE).getSpecifiedValue()); obsTemp.set(obsType); } catch (final XmlException e) { throw new OXFException("Could not parse observation type from paramter shell.",e); } regSensor.setObservationTemplate(obsTemp); }
private void addOperationMetadata(final RegisterSensor regSensor, final ParameterContainer parameters) { regSensor.setVersion((String) parameters.getParameterShellWithCommonName(VERSION).getSpecifiedValue()); regSensor.setService((String) parameters.getParameterShellWithCommonName(SERVICE).getSpecifiedValue()); }