Search in sources :

Example 1 with LocationPropertyType

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);
        }
    }
}
Also used : ActuateType(org.w3.x1999.xlink.ActuateType) Actuate(org.n52.shetland.w3c.xlink.Actuate) LocationPropertyType(net.opengis.samplingSpecimen.x20.LocationPropertyType) 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) 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