use of net.opengis.sensorML.x101.TermDocument.Term in project arctic-sea by 52North.
the class SensorMLEncoderv101 method createIdentification.
/**
* Creates the valueentification section of the SensorML description.
*
* @param identifications
* SOS valueentifications
*
* @return XML Identification array
*/
protected Identification[] createIdentification(List<SmlIdentifier> identifications) {
Identification xbIdentification = Identification.Factory.newInstance(getXmlOptions());
IdentifierList xbIdentifierList = xbIdentification.addNewIdentifierList();
identifications.forEach(sosSMLIdentifier -> {
Identifier xbIdentifier = xbIdentifierList.addNewIdentifier();
if (sosSMLIdentifier.getName() != null) {
xbIdentifier.setName(sosSMLIdentifier.getName());
}
Term xbTerm = xbIdentifier.addNewTerm();
xbTerm.setDefinition(sosSMLIdentifier.getDefinition());
xbTerm.setValue(sosSMLIdentifier.getValue());
});
return new Identification[] { xbIdentification };
}
use of net.opengis.sensorML.x101.TermDocument.Term in project arctic-sea by 52North.
the class SensorMLDecoderV101Test method addIdentifier.
private void addIdentifier(IdentifierList xbIdentifierList, String name, String definition, String value) {
Identifier xbIdentifier = xbIdentifierList.addNewIdentifier();
xbIdentifier.setName(name);
Term xbTerm = xbIdentifier.addNewTerm();
xbTerm.setDefinition(definition);
xbTerm.setValue(value);
}
use of net.opengis.sensorML.x101.TermDocument.Term in project arctic-sea by 52North.
the class SensorMLEncoderv101 method createClassification.
/**
* Creates the classification section of the SensorML description.
*
* @param classifications
* SOS classifications
*
* @return XML Classification array
*/
private Classification[] createClassification(List<SmlClassifier> classifications) {
Classification xbClassification = Classification.Factory.newInstance(getXmlOptions());
ClassifierList xbClassifierList = xbClassification.addNewClassifierList();
classifications.forEach(sosSMLClassifier -> {
Classifier xbClassifier = xbClassifierList.addNewClassifier();
if (sosSMLClassifier.getName() != null) {
xbClassifier.setName(sosSMLClassifier.getName());
}
Term xbTerm = xbClassifier.addNewTerm();
xbTerm.setValue(sosSMLClassifier.getValue());
if (sosSMLClassifier.isSetDefinition()) {
xbTerm.setDefinition(sosSMLClassifier.getDefinition());
}
if (sosSMLClassifier.isSetCodeSpace()) {
xbTerm.addNewCodeSpace().setHref(sosSMLClassifier.getCodeSpace());
}
});
return new Classification[] { xbClassification };
}
Aggregations