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