use of org.n52.shetland.ogc.sensorML.elements.SmlLocation in project arctic-sea by 52North.
the class SensorMLEncoderv20 method createInputs.
// /**
// * Creates the location section of the SensorML description.
// *
// * @param dot
// * the described object
// * @param location
// * SOS location representation.
// *
// * @throws EncodingException
// * if an error occurs
// */
// private void createLocation(DescribedObjectType dot, SmlLocation location) throws EncodingException {
// dot.addNewLocation().addNewAbstractGeometry().set(encodeObjectToXmlGml32(location.getPoint()));
// }
/**
* Creates the inputs section of the SensorML description.
*
* @param inputs
* SOS SWE representation.
*
* @return XML Inputs element
*
* @throws EncodingException
* if an error occurs
*/
private Inputs createInputs(final List<SmlIo> inputs) throws EncodingException {
final Inputs xbInputs = Inputs.Factory.newInstance(getXmlOptions());
final InputListType xbInputList = xbInputs.addNewInputList();
int counter = 1;
for (final SmlIo sosSMLIo : inputs) {
if (!sosSMLIo.isSetName()) {
sosSMLIo.setIoName("input_" + counter++);
} else {
sosSMLIo.setIoName(NcName.makeValid(sosSMLIo.getIoName()));
}
addInput(xbInputList.addNewInput(), sosSMLIo);
}
return xbInputs;
}
Aggregations