use of org.n52.shetland.ogc.sensorML.v20.AggregateProcess 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;
}
use of org.n52.shetland.ogc.sensorML.v20.AggregateProcess in project arctic-sea by 52North.
the class SensorMLEncoderv20 method addAggregateProcessValues.
private void addAggregateProcessValues(AggregateProcessType apt, AggregateProcess abstractProcess) throws EncodingException {
addAbstractProcessValues(apt, abstractProcess);
addDescribedObjectValues(apt, abstractProcess);
// set components
if (abstractProcess.isSetComponents()) {
List<SmlComponent> smlComponents = checkForComponents(abstractProcess);
if (!smlComponents.isEmpty()) {
ComponentListPropertyType clpt = createComponents(smlComponents);
if (clpt != null && clpt.getComponentList() != null && clpt.getComponentList().sizeOfComponentArray() > 0) {
apt.setComponents(clpt);
}
}
}
// set connections
}
Aggregations