Search in sources :

Example 1 with SystemDocument

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();
    }
}
Also used : ProcessModel(org.n52.shetland.ogc.sensorML.ProcessModel) ComponentType(net.opengis.sensorML.x101.ComponentType) AbstractDataComponentType(net.opengis.swe.x101.AbstractDataComponentType) ComponentDocument(net.opengis.sensorML.x101.ComponentDocument) SystemType(net.opengis.sensorML.x101.SystemType) ProcessModelDocument(net.opengis.sensorML.x101.ProcessModelDocument) System(org.n52.shetland.ogc.sensorML.System) SystemDocument(net.opengis.sensorML.x101.SystemDocument) SmlComponent(org.n52.shetland.ogc.sensorML.elements.SmlComponent) Component(net.opengis.sensorML.x101.ComponentsDocument.Components.ComponentList.Component) SweAbstractDataComponent(org.n52.shetland.ogc.swe.SweAbstractDataComponent) ProcessModelType(net.opengis.sensorML.x101.ProcessModelType)

Aggregations

ComponentDocument (net.opengis.sensorML.x101.ComponentDocument)1 ComponentType (net.opengis.sensorML.x101.ComponentType)1 Component (net.opengis.sensorML.x101.ComponentsDocument.Components.ComponentList.Component)1 ProcessModelDocument (net.opengis.sensorML.x101.ProcessModelDocument)1 ProcessModelType (net.opengis.sensorML.x101.ProcessModelType)1 SystemDocument (net.opengis.sensorML.x101.SystemDocument)1 SystemType (net.opengis.sensorML.x101.SystemType)1 AbstractDataComponentType (net.opengis.swe.x101.AbstractDataComponentType)1 ProcessModel (org.n52.shetland.ogc.sensorML.ProcessModel)1 System (org.n52.shetland.ogc.sensorML.System)1 SmlComponent (org.n52.shetland.ogc.sensorML.elements.SmlComponent)1 SweAbstractDataComponent (org.n52.shetland.ogc.swe.SweAbstractDataComponent)1