use of net.opengis.samplingSpecimen.x20.LocationPropertyType in project arctic-sea by 52North.
the class SpecimenEncoderv20 method addCurrentLocation.
private void addCurrentLocation(SFSpecimenType sfst, SfSpecimen specimen) {
if (specimen.isSetCurrentLocation()) {
if (!specimen.getCurrentLocation().getInstance().isPresent()) {
Reference reference = specimen.getCurrentLocation().getReference();
LocationPropertyType lpt = sfst.addNewCurrentLocation();
reference.getActuate().map(Actuate::toString).map(ActuateType.Enum::forString).ifPresent(lpt::setActuate);
reference.getArcrole().ifPresent(lpt::setArcrole);
reference.getHref().map(URI::toString).ifPresent(lpt::setHref);
reference.getRole().ifPresent(lpt::setRole);
reference.getShow().map(Show::toString).map(ShowType.Enum::forString).ifPresent(lpt::setShow);
reference.getTitle().ifPresent(lpt::setTitle);
reference.getType().map(Type::toString).map(TypeType.Enum::forString).ifPresent(lpt::setType);
}
}
}
Aggregations