Search in sources :

Example 1 with OwsValuesUnit

use of org.n52.shetland.ogc.ows.OwsValuesUnit in project arctic-sea by 52North.

the class AbstractCapabilitiesBaseTypeDecoder method parseDomain.

private OwsDomain parseDomain(DomainType domain) {
    if (domain == null) {
        return null;
    }
    OwsValue defaultValue = parseValue(domain.getDefaultValue());
    Collection<OwsMetadata> metadata = parseMetadata(domain.getMetadataArray());
    OwsDomainMetadata meaning = parseDomainMetadata(domain.getMeaning());
    OwsDomainMetadata dataType = parseDomainMetadata(domain.getDataType());
    OwsValuesUnit valuesUnit = Stream.of(parseUom(domain.getUOM()), parseReferenceSystem(domain.getReferenceSystem())).filter(Objects::nonNull).findFirst().orElse(null);
    OwsPossibleValues possibleValues = Stream.of(parseAnyValue(domain.getAnyValue()), parseAllowedValues(domain.getAllowedValues()), parseValuesReference(domain.getValuesReference()), parseNoValues(domain.getNoValues())).filter(Objects::nonNull).findFirst().orElse(null);
    return new OwsDomain(domain.getName(), possibleValues, defaultValue, meaning, dataType, valuesUnit, metadata);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) OwsDomainMetadata(org.n52.shetland.ogc.ows.OwsDomainMetadata) OwsMetadata(org.n52.shetland.ogc.ows.OwsMetadata) OwsValuesUnit(org.n52.shetland.ogc.ows.OwsValuesUnit) Objects(java.util.Objects) OwsPossibleValues(org.n52.shetland.ogc.ows.OwsPossibleValues) OwsValue(org.n52.shetland.ogc.ows.OwsValue)

Aggregations

Objects (java.util.Objects)1 OwsDomain (org.n52.shetland.ogc.ows.OwsDomain)1 OwsDomainMetadata (org.n52.shetland.ogc.ows.OwsDomainMetadata)1 OwsMetadata (org.n52.shetland.ogc.ows.OwsMetadata)1 OwsPossibleValues (org.n52.shetland.ogc.ows.OwsPossibleValues)1 OwsValue (org.n52.shetland.ogc.ows.OwsValue)1 OwsValuesUnit (org.n52.shetland.ogc.ows.OwsValuesUnit)1