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: eoxserver.core.component.Component

exception_handlers

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

get_service_handlers

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

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.

service_handlers

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

version_negotiation(handlers, accepted_versions=None)
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: eoxserver.core.decoders.kvp.Decoder

acceptversions

Property getter function.

request

Property getter function.

service

Property getter function.

version

Property getter function.

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

Bases: eoxserver.core.decoders.xml.Decoder

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'}
request

Property getter function.

service

Property getter function.

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.

request

The supported request method.

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.

versions

An iterable of all supported versions as strings.

class eoxserver.services.ows.interfaces.GetServiceHandlerInterface

Bases: eoxserver.services.ows.interfaces.ServiceHandlerInterface

Interface for service handlers that support HTTP GET requests.

class eoxserver.services.ows.interfaces.PostServiceHandlerInterface

Bases: eoxserver.services.ows.interfaces.ServiceHandlerInterface

Interface for service handlers that support HTTP POST requests.

class eoxserver.services.ows.interfaces.ServiceHandlerInterface

Bases: object

Interface for OWS Service handlers.

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.

index

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

request

The supported request method.

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.

versions

An iterable of all supported versions as strings.

class eoxserver.services.ows.interfaces.VersionNegotiationInterface

Bases: eoxserver.services.ows.interfaces.ServiceHandlerInterface

Interface for handlers that contribute to version negotiation.

eoxserver.services.ows.version module

eoxserver.services.ows.version.parse_version_string(version_string)

Convenience function to parse a version from a string.

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!

major
minor
revision

Module contents