use of org.n52.shetland.inspire.base.Identifier in project arctic-sea by 52North.
the class WmlObservationProcessDecoderv20 method parseObservationProcess.
private Object parseObservationProcess(ObservationProcessType opt) throws DecodingException {
ObservationProcess observationProcess = new ObservationProcess();
observationProcess.setGmlId(opt.getId());
// parse identifier, names, description, locations
parseAbstractFeatureType(opt, observationProcess);
parseProcessType(opt, observationProcess);
parseOriginatingProcess(opt, observationProcess);
parseAggregatingDuration(opt, observationProcess);
parseVerticalDatum(opt, observationProcess);
parseComment(opt, observationProcess);
parseProcessReference(opt, observationProcess);
parseInput(opt, observationProcess);
parseParameter(opt, observationProcess);
setDescriptionXml(opt, observationProcess);
return observationProcess;
}
use of org.n52.shetland.inspire.base.Identifier in project arctic-sea by 52North.
the class OmDecoderv20 method parseOmObservation.
private OmObservation parseOmObservation(OMObservationType omObservation) throws DecodingException {
Map<String, AbstractFeature> featureMap = Maps.newHashMap();
OmObservation sosObservation = new OmObservation();
// parse identifier, description
parseAbstractFeatureType(omObservation, sosObservation);
OmObservationConstellation observationConstallation = getObservationConstellation(omObservation, featureMap);
sosObservation.setObservationConstellation(observationConstallation);
sosObservation.setResultTime(getResultTime(omObservation));
sosObservation.setValidTime(getValidTime(omObservation));
if (omObservation.getParameterArray() != null) {
sosObservation.setParameter(parseNamedValueTypeArray(omObservation.getParameterArray()));
}
sosObservation.setValue(getObservationValue(omObservation));
return sosObservation;
}
use of org.n52.shetland.inspire.base.Identifier in project arctic-sea by 52North.
the class SamplingDecoderv20 method parseSpatialSamplingFeature.
private AbstractFeature parseSpatialSamplingFeature(final SFSpatialSamplingFeatureType spatialSamplingFeature) throws DecodingException {
final SamplingFeature sosFeat = new SamplingFeature(null, spatialSamplingFeature.getId());
// parse identifier, names, description
parseAbstractFeatureType(spatialSamplingFeature, sosFeat);
sosFeat.setFeatureType(getFeatureType(spatialSamplingFeature.getType()));
sosFeat.setSampledFeatures(getSampledFeatures(spatialSamplingFeature.getSampledFeatureArray()));
sosFeat.setXml(getXmlDescription(spatialSamplingFeature));
sosFeat.setGeometry(getGeometry(spatialSamplingFeature.getShape()));
checkTypeAndGeometry(sosFeat);
sosFeat.setGmlId(spatialSamplingFeature.getId());
return sosFeat;
}
use of org.n52.shetland.inspire.base.Identifier in project arctic-sea by 52North.
the class SensorMLDecoderV101 method parseIdentifications.
/**
* Parses the identifications and sets the AbstractProcess' identifiers
*
* @param abstractProcess The AbstractProcess to which identifiers are added
* @param identificationArray XML identification
*/
private void parseIdentifications(final AbstractProcess abstractProcess, final Identification[] identificationArray) {
for (final Identification xbIdentification : identificationArray) {
if (xbIdentification.getIdentifierList() != null) {
for (final Identifier xbIdentifier : xbIdentification.getIdentifierList().getIdentifierArray()) {
if (xbIdentifier.getName() != null && xbIdentifier.getTerm() != null) {
final SmlIdentifier identifier = new SmlIdentifier(xbIdentifier.getName(), xbIdentifier.getTerm().getDefinition(), xbIdentifier.getTerm().getValue());
abstractProcess.addIdentifier(identifier);
if (isIdentificationProcedureIdentifier(identifier)) {
abstractProcess.setIdentifier(identifier.getValue());
}
}
}
}
}
}
use of org.n52.shetland.inspire.base.Identifier 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 };
}
Aggregations