TypeHandlerSpace provides a JAX-RS Root Resource Class that delegates requests in its URI space (i.e. URIs starting with the prefix the bundle is installed with) to a TypeHandler for the RDF-Type(s) of the resource named by the requested URI. TypeHandlerSpace works on the clerezza.org platform it interacts with Triaxrs and with SCB and expects content and system graph to be located as per the platform conventions.
Processing of requests
While JAX-RS allows to bind Root Resources Classes to a specific
URI-Path TypeHandlerSpace allows to bind such resources to an
Root Resources are POJO providing methods handling different types of
requests, with TypeHandlerSpace such POJOs can be bound to an RDF type
in this function the class is called
TypeHandler. When a
request is processed by TypeHandlerSpace the
the requested resource are determined from the content graph.
TypeHandlerSpace provides a root resource
which determines the type(s) of requested resource and calls a service
to get a
Typehandler, the request is the forwarded to this
The provided implementation of
returns the available
TypeHandler for the
with the highest priority. The Priority of
determined by an
<urn:x-localinstance:/typePriorityList> in the system graph. The
TypeHandlers are OSGi services exposing
as service interface and with the property
TypeHandlers are annotated with the
annotation defining the
rdf:types supported by the class.
The following defines a class that is both a regular JAX-RS Root
Resource Class as well as a
Sub Resource Methods
Sub-resource methods in
TypeHandlers are never invoked by TypeHandlerSpace, so they are only
useful if a typeHandler is also used as regular JAX-RS Root Resource.
Copyright (c) 2009 trialox.org (trialox AG, Switzerland)