use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class FesEncoderv20 method setConformance.
/**
* Sets the FES conformance classes in the filter capabilities section.
*
* @param conformance XML FES conformence
* @param sosConformance Service conformance
*
* @throws EncodingException If an error occurs
*/
private void setConformance(final ConformanceType conformance, Collection<OwsDomain> sosConformance) throws EncodingException {
for (OwsDomain owsDomainType : sosConformance) {
XmlObject encodeObjectToXml = encodeObjectToXml(OWSConstants.NS_OWS, owsDomainType);
conformance.addNewConstraint().set(encodeObjectToXml);
}
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getAcceptVersionsDomain.
private OwsDomain getAcceptVersionsDomain(String service) {
Set<String> supportedVersions = this.serviceOperatorRepository.getSupportedVersions(service);
OwsValue defaultValue = new OwsValue(Comparables.version().max(supportedVersions));
OwsPossibleValues possibleValues = new OwsAllowedValues(supportedVersions.stream().map(OwsValue::new));
return new OwsDomain(GetCapabilitiesParams.AcceptVersions, possibleValues, defaultValue);
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getAcceptFormatsDomain.
private OwsDomain getAcceptFormatsDomain() {
OwsValue defaultValue = new OwsValue(MediaTypes.APPLICATION_XML.toString());
OwsPossibleValues possibleValues = new OwsAllowedValues(defaultValue);
return new OwsDomain(GetCapabilitiesParams.AcceptFormats, possibleValues, defaultValue);
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getOperationParameters.
@Override
protected Set<OwsDomain> getOperationParameters(String service, String version) {
OwsDomain acceptFormats = getAcceptFormatsDomain();
OwsDomain acceptVersions = getAcceptVersionsDomain(service);
OwsDomain sections = getSectionsDomain();
OwsDomain updateSequence = getUpdateSequenceDomain();
OwsDomain acceptLanguages = getAcceptLanguagesDomain();
return new HashSet<>(Arrays.asList(acceptFormats, acceptVersions, acceptLanguages, sections, updateSequence));
}
use of org.n52.shetland.ogc.ows.OwsDomain in project arctic-sea by 52North.
the class AbstractGetCapabilitiesHandler method getOperations.
private OwsOperationsMetadata getOperations(String service, String version) throws OwsExceptionReport {
Collection<OwsDomain> parameters = getCommonParameters(service);
Collection<OwsDomain> constraints = null;
Collection<OwsOperation> operations = new LinkedList<>();
OwsOperationMetadataExtension extension = getOperationsMetadataExtension(service, version);
for (RequestOperatorKey operatorKey : requestOperatorRepository.getActiveRequestOperatorKeys(new OwsServiceKey(service, version))) {
Optional.ofNullable(requestOperatorRepository.getRequestOperator(operatorKey).getOperationMetadata(service, version)).ifPresent(operations::add);
}
return new OwsOperationsMetadata(operations, parameters, constraints, extension);
}
Aggregations