Search in sources :

Example 1 with ConnectionList

use of net.opengis.sensorML.x101.ConnectionsDocument.Connections.ConnectionList in project arctic-sea by 52North.

the class SensorMLEncoderv101 method createConnections.

private Connections createConnections(SmlConnection connections) {
    Connections c = Connections.Factory.newInstance();
    ConnectionList cl = c.addNewConnectionList();
    for (SmlLink link : connections.getConnections()) {
        Link l = cl.addNewConnection().addNewLink();
        l.addNewDestination().setRef(link.getDestination());
        l.addNewSource().setRef(link.getSource());
    }
    return c;
}
Also used : Connections(net.opengis.sensorML.x101.ConnectionsDocument.Connections) ConnectionList(net.opengis.sensorML.x101.ConnectionsDocument.Connections.ConnectionList) SmlLink(org.n52.shetland.ogc.sensorML.elements.SmlLink) Link(net.opengis.sensorML.x101.LinkDocument.Link) SmlLink(org.n52.shetland.ogc.sensorML.elements.SmlLink)

Aggregations

Connections (net.opengis.sensorML.x101.ConnectionsDocument.Connections)1 ConnectionList (net.opengis.sensorML.x101.ConnectionsDocument.Connections.ConnectionList)1 Link (net.opengis.sensorML.x101.LinkDocument.Link)1 SmlLink (org.n52.shetland.ogc.sensorML.elements.SmlLink)1