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);
}
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));
}
Aggregations