Search in sources :

Example 1 with DescribedObject

use of org.n52.shetland.ogc.sensorML.v20.DescribedObject in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parseIdentifications.

private void parseIdentifications(DescribedObject describedObject, IdentifierListPropertyType[] identificationArray) {
    for (final IdentifierListPropertyType ilpt : identificationArray) {
        if (ilpt.isSetIdentifierList() && CollectionHelper.isNotNullOrEmpty(ilpt.getIdentifierList().getIdentifier2Array())) {
            for (final Identifier i : ilpt.getIdentifierList().getIdentifier2Array()) {
                if (i.getTerm() != null) {
                    final SmlIdentifier identifier = new SmlIdentifier();
                    parseTerm(i.getTerm(), identifier);
                    describedObject.addIdentifier(identifier);
                    if (isIdentificationProcedureIdentifier(identifier)) {
                        describedObject.setIdentifier(identifier.getValue());
                    }
                }
            }
        }
    }
}
Also used : Identifier(net.opengis.sensorml.x20.IdentifierListType.Identifier) SmlIdentifier(org.n52.shetland.ogc.sensorML.elements.SmlIdentifier) IdentifierListPropertyType(net.opengis.sensorml.x20.IdentifierListPropertyType) SmlIdentifier(org.n52.shetland.ogc.sensorML.elements.SmlIdentifier)

Example 2 with DescribedObject

use of org.n52.shetland.ogc.sensorML.v20.DescribedObject in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parseSimpleProcess.

private DescribedObject parseSimpleProcess(SimpleProcessType describedObject) throws DecodingException {
    SimpleProcess sp = new SimpleProcess();
    parseAbstractProcess(describedObject, sp);
    parseDescribedObject(describedObject, sp);
    return sp;
}
Also used : SimpleProcess(org.n52.shetland.ogc.sensorML.v20.SimpleProcess)

Example 3 with DescribedObject

use of org.n52.shetland.ogc.sensorML.v20.DescribedObject in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parsePhysicalSystem.

private DescribedObject parsePhysicalSystem(PhysicalSystemType describedObject) throws DecodingException {
    PhysicalSystem ps = new PhysicalSystem();
    parseAbstractPhysicalProcess(describedObject, ps);
    parseAbstractProcess(describedObject, ps);
    parseDescribedObject(describedObject, ps);
    if (describedObject.isSetComponents()) {
        ps.addComponents(parseComponents(describedObject.getComponents()));
        final List<Integer> compsToRemove = checkComponentsForRemoval(describedObject.getComponents().getComponentList());
        compsToRemove.forEach(describedObject.getComponents().getComponentList()::removeComponent);
        if (removeEmptyComponents(describedObject.getComponents())) {
            describedObject.unsetComponents();
        }
    }
    return ps;
}
Also used : PhysicalSystem(org.n52.shetland.ogc.sensorML.v20.PhysicalSystem)

Example 4 with DescribedObject

use of org.n52.shetland.ogc.sensorML.v20.DescribedObject in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parseAggregateProcess.

private DescribedObject parseAggregateProcess(AggregateProcessType describedObject) throws DecodingException {
    AggregateProcess ap = new AggregateProcess();
    parseAbstractProcess(describedObject, ap);
    parseDescribedObject(describedObject, ap);
    if (describedObject.isSetComponents()) {
        ap.addComponents(parseComponents(describedObject.getComponents()));
        List<Integer> compsToRemove = checkComponentsForRemoval(describedObject.getComponents().getComponentList());
        compsToRemove.forEach(describedObject.getComponents().getComponentList()::removeComponent);
        if (removeEmptyComponents(describedObject.getComponents())) {
            describedObject.unsetComponents();
        }
    }
    if (describedObject.isSetConnections()) {
        ap.setConnections(parseConnections(describedObject.getConnections()));
    }
    return ap;
}
Also used : AggregateProcess(org.n52.shetland.ogc.sensorML.v20.AggregateProcess)

Example 5 with DescribedObject

use of org.n52.shetland.ogc.sensorML.v20.DescribedObject in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parsePhysicalComponent.

private DescribedObject parsePhysicalComponent(PhysicalComponentType describedObject) throws DecodingException {
    PhysicalComponent pc = new PhysicalComponent();
    parseAbstractPhysicalProcess(describedObject, pc);
    parseAbstractProcess(describedObject, pc);
    parseDescribedObject(describedObject, pc);
    return pc;
}
Also used : PhysicalComponent(org.n52.shetland.ogc.sensorML.v20.PhysicalComponent)

Aggregations

ContactListType (net.opengis.sensorml.x20.ContactListType)1 Capabilities (net.opengis.sensorml.x20.DescribedObjectType.Capabilities)1 IdentifierListPropertyType (net.opengis.sensorml.x20.IdentifierListPropertyType)1 Identifier (net.opengis.sensorml.x20.IdentifierListType.Identifier)1 XmlObject (org.apache.xmlbeans.XmlObject)1 Time (org.n52.shetland.ogc.gml.time.Time)1 TimeInstant (org.n52.shetland.ogc.gml.time.TimeInstant)1 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)1 SmlContact (org.n52.shetland.ogc.sensorML.SmlContact)1 SmlResponsibleParty (org.n52.shetland.ogc.sensorML.SmlResponsibleParty)1 SmlCapabilities (org.n52.shetland.ogc.sensorML.elements.SmlCapabilities)1 SmlIdentifier (org.n52.shetland.ogc.sensorML.elements.SmlIdentifier)1 AggregateProcess (org.n52.shetland.ogc.sensorML.v20.AggregateProcess)1 PhysicalComponent (org.n52.shetland.ogc.sensorML.v20.PhysicalComponent)1 PhysicalSystem (org.n52.shetland.ogc.sensorML.v20.PhysicalSystem)1 SimpleProcess (org.n52.shetland.ogc.sensorML.v20.SimpleProcess)1