Search in sources :

Example 1 with SFProcessPropertyType

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);
        }
    }
}
Also used : ActuateType(org.w3.x1999.xlink.ActuateType) Actuate(org.n52.shetland.w3c.xlink.Actuate) TypeType(org.w3.x1999.xlink.TypeType) Type(org.n52.shetland.w3c.xlink.Type) SFProcessPropertyType(net.opengis.sampling.x20.SFProcessPropertyType) ActuateType(org.w3.x1999.xlink.ActuateType) FeatureType(org.n52.shetland.ogc.sos.FeatureType) LocationPropertyType(net.opengis.samplingSpecimen.x20.LocationPropertyType) SFSpecimenType(net.opengis.samplingSpecimen.x20.SFSpecimenType) ShowType(org.w3.x1999.xlink.ShowType) SupportedType(org.n52.shetland.ogc.SupportedType) Reference(org.n52.shetland.w3c.xlink.Reference) Show(org.n52.shetland.w3c.xlink.Show) SFProcessPropertyType(net.opengis.sampling.x20.SFProcessPropertyType) TypeType(org.w3.x1999.xlink.TypeType) ShowType(org.w3.x1999.xlink.ShowType)

Aggregations

SFProcessPropertyType (net.opengis.sampling.x20.SFProcessPropertyType)1 LocationPropertyType (net.opengis.samplingSpecimen.x20.LocationPropertyType)1 SFSpecimenType (net.opengis.samplingSpecimen.x20.SFSpecimenType)1 SupportedType (org.n52.shetland.ogc.SupportedType)1 FeatureType (org.n52.shetland.ogc.sos.FeatureType)1 Actuate (org.n52.shetland.w3c.xlink.Actuate)1 Reference (org.n52.shetland.w3c.xlink.Reference)1 Show (org.n52.shetland.w3c.xlink.Show)1 Type (org.n52.shetland.w3c.xlink.Type)1 ActuateType (org.w3.x1999.xlink.ActuateType)1 ShowType (org.w3.x1999.xlink.ShowType)1 TypeType (org.w3.x1999.xlink.TypeType)1