While it is of course possible to use all JAX-RS methods to render pages the default way on the TX-Platform is as follows:
- The method of root-resource classes return an instance of GraphNode, by default, i.e. when no specific root resource class is present, the GraphNode for the request URI is returned from the Union-Content-Graph see Virtual Graph.
- If the preferred accept-type is an RDF serialization no templating is done but the context of the GraphNode is returned.
- Otherwise template to render the Graphnode as (x)html(+RDFa) is selected as follows:
- Starting at the longest subpath of the request URI, till a template is found
- If there is a list of TemplateDescriptorS for that subpath (probably in the content graph), for every element of the list, check if the template_key is matched and the types supported of the template matches any of the types of the GraphNode
- WIth the RDF type of the matching TemplaDescriptor, again starting at the longest subpath of the request URI and stopping when a replacement is found or the subpath has reached the level where the original TemplateDescriptor was found look for template-replacements
- Starting at the longest subpath of the request URI, till a template is found
- The template processor is now invoked with the following arguments:
- The template
- The GraphNode
- Another GraphNode that describes the current user
TemplateDescriptor
A template descriptor consist of a template (identified by its URI), an optional template_key and an RDF type
Labels
(None)