Search in sources :

Example 6 with OwsDomain

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);
    }
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) XmlObject(org.apache.xmlbeans.XmlObject)

Example 7 with OwsDomain

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);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) OwsAllowedValues(org.n52.shetland.ogc.ows.OwsAllowedValues) OwsPossibleValues(org.n52.shetland.ogc.ows.OwsPossibleValues) OwsValue(org.n52.shetland.ogc.ows.OwsValue)

Example 8 with OwsDomain

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);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) OwsAllowedValues(org.n52.shetland.ogc.ows.OwsAllowedValues) OwsPossibleValues(org.n52.shetland.ogc.ows.OwsPossibleValues) OwsValue(org.n52.shetland.ogc.ows.OwsValue)

Example 9 with OwsDomain

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));
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) HashSet(java.util.HashSet)

Example 10 with OwsDomain

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);
}
Also used : OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) RequestOperatorKey(org.n52.iceland.request.operator.RequestOperatorKey) OwsOperationsMetadata(org.n52.shetland.ogc.ows.OwsOperationsMetadata) OwsOperation(org.n52.shetland.ogc.ows.OwsOperation) OwsServiceKey(org.n52.shetland.ogc.ows.service.OwsServiceKey) OwsOperationMetadataExtension(org.n52.shetland.ogc.ows.OwsOperationMetadataExtension) LinkedList(java.util.LinkedList)

Aggregations

OwsDomain (org.n52.shetland.ogc.ows.OwsDomain)12 OwsAllowedValues (org.n52.shetland.ogc.ows.OwsAllowedValues)5 OwsPossibleValues (org.n52.shetland.ogc.ows.OwsPossibleValues)5 OwsValue (org.n52.shetland.ogc.ows.OwsValue)5 OwsOperationsMetadata (org.n52.shetland.ogc.ows.OwsOperationsMetadata)3 XmlObject (org.apache.xmlbeans.XmlObject)2 OwsMetadata (org.n52.shetland.ogc.ows.OwsMetadata)2 OwsOperation (org.n52.shetland.ogc.ows.OwsOperation)2 OwsOperationMetadataExtension (org.n52.shetland.ogc.ows.OwsOperationMetadataExtension)2 Strings (com.google.common.base.Strings)1 URI (java.net.URI)1 HashSet (java.util.HashSet)1 LinkedList (java.util.LinkedList)1 Locale (java.util.Locale)1 Objects (java.util.Objects)1 DomainMetadataType (net.opengis.ows.x11.DomainMetadataType)1 DomainType (net.opengis.ows.x11.DomainType)1 MetadataType (net.opengis.ows.x11.MetadataType)1 RequestOperatorKey (org.n52.iceland.request.operator.RequestOperatorKey)1 LocaleHelper (org.n52.janmayen.i18n.LocaleHelper)1