Search in sources :

Example 1 with OwsCapabilitiesExtension

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

the class AbstractGetCapabilitiesHandler method createCapabilities.

private OwsCapabilities createCapabilities(GetCapabilitiesRequest request, String service, String version) throws OwsExceptionReport {
    Set<CapabilitiesSection> sections = getRequestedSections(request);
    Locale requestedLocale = getRequestedLocale(request);
    String updateSequence = null;
    OwsServiceIdentification serviceIdentification = null;
    if (sections.contains(CapabilitiesSection.ServiceIdentification)) {
        serviceIdentification = getServiceIdentification(service, requestedLocale);
    }
    OwsServiceProvider serviceProvider = null;
    if (sections.contains(CapabilitiesSection.ServiceProvider)) {
        serviceProvider = getServiceProvider(service, requestedLocale);
    }
    OwsOperationsMetadata operationsMetadata = null;
    if (sections.contains(CapabilitiesSection.OperationsMetadata)) {
        operationsMetadata = getOperations(service, version);
    }
    Set<String> languages = null;
    if (sections.contains(CapabilitiesSection.Languages)) {
        languages = getLanguages();
    }
    T contents = null;
    if (sections.contains(CapabilitiesSection.Contents)) {
        contents = createContents(service, version);
    }
    Collection<OwsCapabilitiesExtension> extensions = getExtensions(request, service, version);
    OwsCapabilities capabilities = new OwsCapabilities(service, version, updateSequence, serviceIdentification, serviceProvider, operationsMetadata, languages, extensions);
    return createCapabilities(capabilities, contents);
}
Also used : Locale(java.util.Locale) OwsCapabilitiesExtension(org.n52.shetland.ogc.ows.OwsCapabilitiesExtension) CapabilitiesSection(org.n52.shetland.ogc.ows.OWSConstants.CapabilitiesSection) OwsOperationsMetadata(org.n52.shetland.ogc.ows.OwsOperationsMetadata) OwsServiceProvider(org.n52.shetland.ogc.ows.OwsServiceProvider) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) OwsServiceIdentification(org.n52.shetland.ogc.ows.OwsServiceIdentification)

Example 2 with OwsCapabilitiesExtension

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

the class AbstractCapabilitiesBaseTypeDecoder method parseCapabilitiesBaseType.

protected OwsCapabilities parseCapabilitiesBaseType(String service, CapabilitiesBaseType cbt) throws DecodingException {
    if (cbt == null) {
        return null;
    }
    OwsServiceIdentification serviceIdentification = parseServiceIdentification(cbt.getServiceIdentification());
    OwsServiceProvider serviceProvider = parseServiceProvider(cbt.getServiceProvider());
    OwsOperationsMetadata operationsMetadata = parseOperationMetadata(cbt.getOperationsMetadata());
    Collection<String> languages = null;
    Collection<OwsCapabilitiesExtension> extensions = null;
    return new OwsCapabilities(service, cbt.getVersion(), cbt.getUpdateSequence(), serviceIdentification, serviceProvider, operationsMetadata, languages, extensions);
}
Also used : OwsCapabilitiesExtension(org.n52.shetland.ogc.ows.OwsCapabilitiesExtension) OwsOperationsMetadata(org.n52.shetland.ogc.ows.OwsOperationsMetadata) OwsServiceProvider(org.n52.shetland.ogc.ows.OwsServiceProvider) LocalizedString(org.n52.janmayen.i18n.LocalizedString) MultilingualString(org.n52.janmayen.i18n.MultilingualString) OwsLanguageString(org.n52.shetland.ogc.ows.OwsLanguageString) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) OwsServiceIdentification(org.n52.shetland.ogc.ows.OwsServiceIdentification)

Aggregations

OwsCapabilities (org.n52.shetland.ogc.ows.OwsCapabilities)2 OwsCapabilitiesExtension (org.n52.shetland.ogc.ows.OwsCapabilitiesExtension)2 OwsOperationsMetadata (org.n52.shetland.ogc.ows.OwsOperationsMetadata)2 OwsServiceIdentification (org.n52.shetland.ogc.ows.OwsServiceIdentification)2 OwsServiceProvider (org.n52.shetland.ogc.ows.OwsServiceProvider)2 Locale (java.util.Locale)1 LocalizedString (org.n52.janmayen.i18n.LocalizedString)1 MultilingualString (org.n52.janmayen.i18n.MultilingualString)1 CapabilitiesSection (org.n52.shetland.ogc.ows.OWSConstants.CapabilitiesSection)1 OwsLanguageString (org.n52.shetland.ogc.ows.OwsLanguageString)1