use of org.n52.shetland.ogc.ows.OwsCapabilities 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.OwsCapabilities in project arctic-sea by 52North.
the class AbstractCapabilitiesBaseTypeDecoderTest method shouldNotThrowNullPointerExceptionWhenServiceIdentificationIsMissing.
@Test
public void shouldNotThrowNullPointerExceptionWhenServiceIdentificationIsMissing() throws DecodingException {
AbstractCapabilitiesBaseTypeDecoder<CapabilitiesBaseType, OwsCapabilities> decoder = new TestSeam();
CapabilitiesBaseType cbt = CapabilitiesBaseType.Factory.newInstance();
cbt.setVersion("2.0.0");
cbt.setUpdateSequence("nothing-to-see-here");
Assert.assertThat(decoder.parseCapabilitiesBaseType("SOS", cbt).getServiceIdentification().isPresent(), Is.is(false));
}
Aggregations