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