use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getCommonParameters.
private Collection<OwsDomain> getCommonParameters(String service) {
OwsDomain serviceParameter = new OwsDomain(OWSConstants.RequestParams.service, new OwsAllowedValues(new OwsValue(service)));
OwsDomain versionParameter = new OwsDomain(OWSConstants.RequestParams.version, getSupportedVersions(service));
return Arrays.asList(serviceParameter, versionParameter);
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getAcceptLanguagesDomain.
private OwsDomain getAcceptLanguagesDomain() {
Set<Locale> availableLocales = serviceMetadataRepository.getAvailableLocales();
OwsPossibleValues possibleValues = new OwsAllowedValues(availableLocales.stream().map(LocaleHelper::encode).map(OwsValue::new));
return new OwsDomain(GetCapabilitiesParams.AcceptLanguages, possibleValues);
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getSectionsDomain.
private OwsDomain getSectionsDomain() {
OwsPossibleValues possibleValues = new OwsAllowedValues(Arrays.stream(OWSConstants.CapabilitiesSection.values()).map(Object::toString).map(OwsValue::new));
OwsValue defaultValue = new OwsValue(OWSConstants.CapabilitiesSection.All.toString());
return new OwsDomain(GetCapabilitiesParams.Sections, possibleValues, defaultValue);
}
use of org.n52.shetland.ogc.ows.OwsDomain 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);
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractCapabilitiesBaseTypeDecoder method parseOperationMetadata.
private OwsOperationsMetadata parseOperationMetadata(OperationsMetadata operationsMetadata) {
if (operationsMetadata == null) {
return null;
}
List<OwsOperation> operations = parseOperations(operationsMetadata.getOperationArray());
List<OwsDomain> parameters = parseDomains(operationsMetadata.getParameterArray());
List<OwsDomain> constraints = parseDomains(operationsMetadata.getConstraintArray());
OwsOperationMetadataExtension extension = parseOperationsMetadataExtension(operationsMetadata.getExtendedCapabilities());
return new OwsOperationsMetadata(operations, parameters, constraints, extension);
}
Aggregations