eoxserver.services.ows package

Subpackages

Submodules

eoxserver.services.ows.component module

class eoxserver.services.ows.component.OptionsRequestHandler

Bases: object

Dummy request handler class to respond to HTTP OPTIONS requests.

handle(request)
class eoxserver.services.ows.component.ServiceComponent(*args, **kwargs)

Bases: Component

property exception_handlers

List of components that implement eoxserver.services.ows.interfaces.ExceptionHandlerInterface

property get_service_handlers

List of components that implement eoxserver.services.ows.interfaces.GetServiceHandlerInterface

property post_service_handlers

List of components that implement eoxserver.services.ows.interfaces.PostServiceHandlerInterface

query_exception_handler(request)
query_service_handler(request)

Tries to find the correct service handler for a given request. The request method can either be “POST” (in which case the request body is parsed as XML) or “GET” (in which case the request is parsed as “KVP”).

If necessary a version negotiation is conducted, following OWS guidelines.

Parameters

request – a Django HttpRequest object

Returns

the request handler component for the given request

Raises
query_service_handlers(service=None, versions=None, request=None, method=None)

Query the service handler components, filtering optionally by service, versions, request or method.

property service_handlers

List of components that implement eoxserver.services.ows.interfaces.ServiceHandlerInterface

version_negotiation(handlers, accepted_versions=None)
property version_negotiation_handlers

List of components that implement eoxserver.services.ows.interfaces.VersionNegotiationInterface

eoxserver.services.ows.component.filter_handlers(handlers, service=None, versions=None, request=None)

Utility function to filter the given OWS service handlers by their attributes ‘service’, ‘versions’ and ‘request’.

eoxserver.services.ows.component.handler_supports_service(handler, service=None)

Convenience method to check whether or not a handler supports a service.

eoxserver.services.ows.component.sort_handlers(handlers, ascending=True)

eoxserver.services.ows.decoders module

class eoxserver.services.ows.decoders.OWSCommonKVPDecoder(params)

Bases: Decoder

property acceptversions

Property getter function.

property request

Property getter function.

property service

Property getter function.

property version

Property getter function.

class eoxserver.services.ows.decoders.OWSCommonXMLDecoder(tree)

Bases: Decoder

property acceptversions

Property getter function.

namespaces = {'ows10': 'http://www.opengis.net/ows/1.0', 'ows11': 'http://www.opengis.net/ows/1.1', 'ows20': 'http://www.opengis.net/ows/2.0'}
property request

Property getter function.

property service

Property getter function.

property version

Property getter function.

eoxserver.services.ows.decoders.get_decoder(request)

Convenience function to return the right OWS Common request deocder for the given django.http.HttpRequest.

eoxserver.services.ows.interfaces module

class eoxserver.services.ows.interfaces.ExceptionHandlerInterface

Bases: object

Interface for OWS exception handlers.

handle_exception(request, exception)

The main exception handling method. Parameters are an object of the django.http.Request type and the raised exception.

property request

The supported request method.

property service

The name of the supported service in uppercase letters. This can also be an iterable, if the handler shall support more than one service specifier. Some service specifications demand that the service parameter can be omitted for certain requests. In this case this property can alse be None or contain None.

property versions

An iterable of all supported versions as strings.

class eoxserver.services.ows.interfaces.GetServiceHandlerInterface

Bases: ServiceHandlerInterface

Interface for service handlers that support HTTP GET requests.

class eoxserver.services.ows.interfaces.PostServiceHandlerInterface

Bases: ServiceHandlerInterface

Interface for service handlers that support HTTP POST requests.

class eoxserver.services.ows.interfaces.ServiceHandlerInterface

Bases: object

Interface for OWS Service handlers.

property constraints

Optional property to return a dict with constraints for default values.

handle(request)

The main handling method. Takes a django.http.Request object as single parameter.

property index

Optional. The index this service handler shall have when being reported in a capabilities document.

property request

The supported request method.

property service

The name of the supported service in uppercase letters. This can also be an iterable, if the handler shall support more than one service specifier. Some service specifications demand that the service parameter can be omitted for certain requests. In this case this property can alse be None or contain None.

property versions

An iterable of all supported versions as strings.

class eoxserver.services.ows.interfaces.VersionNegotiationInterface

Bases: ServiceHandlerInterface

Interface for handlers that contribute to version negotiation.

eoxserver.services.ows.version module

class eoxserver.services.ows.version.Version(major, minor, revision=None)

Bases: object

Abstraction for OWS versions. Must be in the form ‘x.y(.z)’, where all components must be positive integers or zero. The last component may be unspecified (None).

Versions can be compared with other versions. Strings and tuples of the correct layout are also compareable.

Versions are compared by the “major” and the “minor” number. Only if both versions provide a “revision” it is taken into account. So Versions “1.0” and “1.0.1” are considered equal!

property major
property minor
property revision
eoxserver.services.ows.version.parse_version_string(version_string)

Convenience function to parse a version from a string.

Module contents