Search in sources :

Example 1 with Connection

use of net.opengis.sensorml.x20.ConnectionListType.Connection in project arctic-sea by 52North.

the class SensorMLDecoderV20 method parseConnections.

private SmlConnection parseConnections(ConnectionListPropertyType connections) throws DecodingException {
    SmlConnection sosSmlConnection = new SmlConnection();
    if (connections.isSetConnectionList() && connections.getConnectionList().getConnectionArray() != null) {
        for (final Connection connection : connections.getConnectionList().getConnectionArray()) {
            if (connection.getLink() != null) {
                LinkType link = connection.getLink();
                sosSmlConnection.addConnection(new SmlLink(link.getDestination().getRef(), link.getSource().getRef()));
            }
        }
    }
    return sosSmlConnection;
}
Also used : SmlConnection(org.n52.shetland.ogc.sensorML.elements.SmlConnection) SmlLink(org.n52.shetland.ogc.sensorML.elements.SmlLink) SmlConnection(org.n52.shetland.ogc.sensorML.elements.SmlConnection) Connection(net.opengis.sensorml.x20.ConnectionListType.Connection) LinkType(net.opengis.sensorml.x20.LinkType)

Aggregations

Connection (net.opengis.sensorml.x20.ConnectionListType.Connection)1 LinkType (net.opengis.sensorml.x20.LinkType)1 SmlConnection (org.n52.shetland.ogc.sensorML.elements.SmlConnection)1 SmlLink (org.n52.shetland.ogc.sensorML.elements.SmlLink)1