Search in sources :

Example 6 with Component

use of net.opengis.sensorML.x101.ComponentsDocument.Components.ComponentList.Component 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

Component (net.opengis.sensorML.x101.ComponentsDocument.Components.ComponentList.Component)5 SystemType (net.opengis.sensorML.x101.SystemType)5 System (org.n52.shetland.ogc.sensorML.System)4 SmlComponent (org.n52.shetland.ogc.sensorML.elements.SmlComponent)4 SweAbstractDataComponent (org.n52.shetland.ogc.swe.SweAbstractDataComponent)4 AbstractProcess (org.n52.shetland.ogc.sensorML.AbstractProcess)3 SensorML (org.n52.shetland.ogc.sensorML.SensorML)3 AbstractProcessType (net.opengis.sensorML.x101.AbstractProcessType)2 ComponentDocument (net.opengis.sensorML.x101.ComponentDocument)2 ComponentType (net.opengis.sensorML.x101.ComponentType)2 Components (net.opengis.sensorML.x101.ComponentsDocument.Components)2 ComponentList (net.opengis.sensorML.x101.ComponentsDocument.Components.ComponentList)2 ProcessModelDocument (net.opengis.sensorML.x101.ProcessModelDocument)2 ProcessModelType (net.opengis.sensorML.x101.ProcessModelType)2 SensorMLDocument (net.opengis.sensorML.x101.SensorMLDocument)2 Member (net.opengis.sensorML.x101.SensorMLDocument.SensorML.Member)2 SystemDocument (net.opengis.sensorML.x101.SystemDocument)2 AbstractDataComponentType (net.opengis.swe.x101.AbstractDataComponentType)2 SchemaType (org.apache.xmlbeans.SchemaType)2 XmlException (org.apache.xmlbeans.XmlException)2