Search in sources :

Example 6 with OwsServiceIdentification

use of org.n52.shetland.ogc.ows.OwsServiceIdentification 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)

Example 7 with OwsServiceIdentification

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

the class OwsEncoderv110Test method should_encode_service_identification_with_service_type_codespace.

@Test
public void should_encode_service_identification_with_service_type_codespace() throws EncodingException {
    String serviceTypeValue = "serviceType";
    String serviceTypeCodeSpaceValue = "codeSpace";
    OwsServiceIdentification serviceId = new OwsServiceIdentification(new OwsCode(serviceTypeValue, URI.create(serviceTypeCodeSpaceValue)), null, null, null, null, null, null, null);
    XmlObject xbEncoded = encodeObjectToXml(OWSConstants.NS_OWS, serviceId);
    assertThat(xbEncoded, instanceOf(ServiceIdentification.class));
    ServiceIdentification xbServiceId = (ServiceIdentification) xbEncoded;
    assertThat(xbServiceId.getServiceType().getStringValue(), equalTo(serviceTypeValue));
    assertThat(xbServiceId.getServiceType().getCodeSpace(), equalTo(serviceTypeCodeSpaceValue));
}
Also used : OwsCode(org.n52.shetland.ogc.ows.OwsCode) XmlObject(org.apache.xmlbeans.XmlObject) OwsServiceIdentification(org.n52.shetland.ogc.ows.OwsServiceIdentification) ServiceIdentification(net.opengis.ows.x11.ServiceIdentificationDocument.ServiceIdentification) OwsServiceIdentification(org.n52.shetland.ogc.ows.OwsServiceIdentification) Test(org.junit.Test)

Aggregations

OwsServiceIdentification (org.n52.shetland.ogc.ows.OwsServiceIdentification)7 ServiceIdentification (net.opengis.ows.x11.ServiceIdentificationDocument.ServiceIdentification)3 OwsCode (org.n52.shetland.ogc.ows.OwsCode)3 OwsOperationsMetadata (org.n52.shetland.ogc.ows.OwsOperationsMetadata)3 OwsServiceProvider (org.n52.shetland.ogc.ows.OwsServiceProvider)3 XmlObject (org.apache.xmlbeans.XmlObject)2 Test (org.junit.Test)2 LocalizedString (org.n52.janmayen.i18n.LocalizedString)2 MultilingualString (org.n52.janmayen.i18n.MultilingualString)2 OwsCapabilities (org.n52.shetland.ogc.ows.OwsCapabilities)2 OwsCapabilitiesExtension (org.n52.shetland.ogc.ows.OwsCapabilitiesExtension)2 OwsKeyword (org.n52.shetland.ogc.ows.OwsKeyword)2 OwsLanguageString (org.n52.shetland.ogc.ows.OwsLanguageString)2 URI (java.net.URI)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 Locale (java.util.Locale)1 Stream (java.util.stream.Stream)1 CodeType (net.opengis.ows.x11.CodeType)1 DomainMetadataType (net.opengis.ows.x11.DomainMetadataType)1