Search in sources :

Example 1 with OwsCapabilities

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

the class CapabilitiesDecoder method decode.

@Override
@SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE")
public SosCapabilities decode(Capabilities c) throws DecodingException {
    if (c != null) {
        OwsCapabilities owsCapabilities = parseCapabilitiesBaseType(SosConstants.SOS, c);
        FilterCapabilities filterCapabilities = parseFilterCapabilities(c.getFilterCapabilities());
        Collection<SosObservationOffering> contents = parseContents(c.getContents());
        return new SosCapabilities(owsCapabilities, filterCapabilities, contents);
    }
    throw new UnsupportedDecoderInputException(this, c);
}
Also used : FilterCapabilities(org.n52.shetland.ogc.filter.FilterCapabilities) SosCapabilities(org.n52.shetland.ogc.sos.SosCapabilities) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) SosObservationOffering(org.n52.shetland.ogc.sos.SosObservationOffering) UnsupportedDecoderInputException(org.n52.svalbard.decode.exception.UnsupportedDecoderInputException) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Example 2 with OwsCapabilities

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

the class CapabilitiesTypeDecoder method decode.

@Override
@SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE")
public SosCapabilities decode(CapabilitiesType ct) throws DecodingException {
    if (ct != null) {
        OwsCapabilities owsCapabilities = parseCapabilitiesBaseType(SosConstants.SOS, ct);
        FilterCapabilities filterCapabilities = parseFilterCapabilities(ct.getFilterCapabilities());
        Collection<SosObservationOffering> contents = parseContents(ct.getContents());
        return new SosCapabilities(owsCapabilities, filterCapabilities, contents);
    }
    throw new UnsupportedDecoderInputException(this, ct);
}
Also used : FilterCapabilities(org.n52.shetland.ogc.filter.FilterCapabilities) SosCapabilities(org.n52.shetland.ogc.sos.SosCapabilities) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) SosObservationOffering(org.n52.shetland.ogc.sos.SosObservationOffering) UnsupportedDecoderInputException(org.n52.svalbard.decode.exception.UnsupportedDecoderInputException) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Example 3 with OwsCapabilities

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

the class CapabilitiesV1DocumentDecoder method decode.

@Override
@SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE")
public GetCapabilitiesResponse decode(CapabilitiesDocument cd) throws DecodingException {
    if (cd != null) {
        GetCapabilitiesResponse response = new GetCapabilitiesResponse();
        OwsCapabilities capabilities = (OwsCapabilities) decodeXmlObject(cd.getCapabilities());
        response.setCapabilities(capabilities);
        return response;
    }
    throw new UnsupportedDecoderInputException(this, cd);
}
Also used : GetCapabilitiesResponse(org.n52.shetland.ogc.ows.service.GetCapabilitiesResponse) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) UnsupportedDecoderInputException(org.n52.svalbard.decode.exception.UnsupportedDecoderInputException) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Example 4 with OwsCapabilities

use of org.n52.shetland.ogc.ows.OwsCapabilities 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 5 with OwsCapabilities

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

the class CapabilitiesDocumentDecoder method decode.

@Override
@SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE")
public GetCapabilitiesResponse decode(CapabilitiesDocument cd) throws DecodingException {
    if (cd != null) {
        GetCapabilitiesResponse response = new GetCapabilitiesResponse();
        OwsCapabilities capabilities = (OwsCapabilities) decodeXmlObject(cd.getCapabilities());
        response.setCapabilities(capabilities);
        return response;
    }
    throw new UnsupportedDecoderInputException(this, cd);
}
Also used : GetCapabilitiesResponse(org.n52.shetland.ogc.ows.service.GetCapabilitiesResponse) OwsCapabilities(org.n52.shetland.ogc.ows.OwsCapabilities) UnsupportedDecoderInputException(org.n52.svalbard.decode.exception.UnsupportedDecoderInputException) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Aggregations

OwsCapabilities (org.n52.shetland.ogc.ows.OwsCapabilities)7 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)4 UnsupportedDecoderInputException (org.n52.svalbard.decode.exception.UnsupportedDecoderInputException)4 FilterCapabilities (org.n52.shetland.ogc.filter.FilterCapabilities)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 GetCapabilitiesResponse (org.n52.shetland.ogc.ows.service.GetCapabilitiesResponse)2 SosCapabilities (org.n52.shetland.ogc.sos.SosCapabilities)2 SosObservationOffering (org.n52.shetland.ogc.sos.SosObservationOffering)2 Locale (java.util.Locale)1 CapabilitiesBaseType (net.opengis.ows.x11.CapabilitiesBaseType)1 Test (org.junit.Test)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