use of net.opengis.sensorML.x101.SystemDocument in project arctic-sea by 52North.
the class SensorMLEncoderv101 method createProcessDescription.
private XmlObject createProcessDescription(final AbstractProcess sensorDesc) throws EncodingException {
// TODO Review: System -> return doc; ProcessModel -> return type
if (sensorDesc instanceof System) {
System system = (System) sensorDesc;
SystemDocument xbSystemDoc = SystemDocument.Factory.newInstance(getXmlOptions());
SystemType xbSystem = xbSystemDoc.addNewSystem();
addAbstractProcessValues(xbSystem, system);
addSystemValues(xbSystem, system);
return xbSystem;
} else if (sensorDesc instanceof ProcessModel) {
// TODO: set values
ProcessModel processModel = (ProcessModel) sensorDesc;
ProcessModelDocument xbProcessModelDoc = ProcessModelDocument.Factory.newInstance(getXmlOptions());
ProcessModelType xbProcessModel = xbProcessModelDoc.addNewProcessModel();
addAbstractProcessValues(xbProcessModel, processModel);
addProcessModelValues(xbProcessModel, processModel);
return xbProcessModel;
} else if (sensorDesc instanceof org.n52.shetland.ogc.sensorML.Component) {
org.n52.shetland.ogc.sensorML.Component component = (org.n52.shetland.ogc.sensorML.Component) sensorDesc;
ComponentDocument cd = ComponentDocument.Factory.newInstance(getXmlOptions());
ComponentType ct = cd.addNewComponent();
addAbstractProcessValues(ct, component);
return ct;
} else {
throw unsupportedDescriptionType();
}
}
Aggregations