Rendering Engine

The Purpose

Inside the resource view (as well as in other parts of the UI in future releases of ST) it is necessary to compute a more human friendly representation of a resource than its URI or bnode identifier. That may be the case for bnodes that are heads of RDF Collections or represent anonymous classes. Another case is when the dataset uses opaque identifiers (e.g. alphanumeric local names), which are not comfortable for human users.

The Model

When the resource view is opened for a given subject resource, the rendering is based on the engine associated with the dataset defining that resource. In case the resource is available in one of the local projects currently open, than the rendering engine associated to that project is used. Otherwise, in case of a remote resource, it is considered an implementation based on RDFS labels.

Rendering Engine Configuration

During project creation

A specific Rendering Engine is associated to a project during its creation. In the panel "Optional settings", it is possible to choose a Rendering Engine, in place of the default one. Also, it is possible to configure the selected rendering engine, by choosing an alternative configuration than the default one. In some case, it may be necessary to manually configure the chosen configuration type, if it has at least one mandatory parameter with no default value.

The default rendering engine is determined based on the model type of the project being created. As explained below, there are currently three implementations of this extension point that covers respectively rdf:labels, skos:prefLabels and skosxl:prefLabels, respectively.

Low-level project metadata

It is not currently possible to change the Rendering engine after a project has been created. However, it is possible to change the Rendering Engine by altering the metadata of a closed project.

In the project file (project.info), there are two properties:

Then, in the project directory, the file rendering.config contains the serialization of the configuration object to use for instantiating the extension point.

Rendering Engine Implementations

RDFS Rendering Engine

The RDFS Rendering Engine (whose factory ID is it.uniroma2.art.semanticturkey.plugin.impls.rendering.RDFSRenderingEngineFactory) constructs a representation of a resource of the form label1 (lang1), label2 (lang2) ... based on its rdfs:labels in the configured languages.

This rendering engine has only one type of configuration (RDFSRenderingEngineConfiguration), whose parameter languages contains a comma-separated list of language tags, ${languages} to mean the current display languages, or the star * to mean any language.

SKOS Rendering Engine

The SKOS Rendering Engine (whose factory ID is it.uniroma2.art.semanticturkey.plugin.impls.rendering.SKOSRenderingEngineFactory) constructs a representation of a resource of the form label1 (lang1), label2 (lang2) ... based on its skos:prefLabels in the configured languages.

This rendering engine has only one type of configuration (SKOSRenderingEngineConfiguration), whose parameter languages contains a comma-separated list of language tags, ${languages} to mean the current display languages, or the star * to mean any language.

SKOSXL Rendering Engine

The SKOSXL Rendering Engine (whose factory ID is it.uniroma2.art.semanticturkey.plugin.impls.rendering.SKOSXLRenderingEngineFactory) constructs a representation of a resource of the form label1 (lang1), label2 (lang2) ... based on its skosxl:prefLabels in the configured languages.

This rendering engine has only one type of configuration (SKOSXLRenderingEngineConfiguration), whose parameter languages contains a comma-separated list of language tags, ${languages} to mean the current display languages, or the star * to mean any language.

OntoLex-Lemon Rendering Engine

The OntoLex-Lemon Rendering Engine (whose factory ID is it.uniroma2.art.semanticturkey.plugin.impls.rendering.OntoLexLemonRenderingEngineFactory) constructs a representation of a resource of the form label1 (lang1), label2 (lang2) ... based on OntoLex-Lemon lexicalizations in the configured languages. Additionally, it includes rdfs:labels as fallback.

This rendering engine has only one type of configuration (OntoLexLemonRenderingEngineConfiguration), whose parameter languages contains a comma-separated list of language tags, ${languages} to mean the current display languages, or the star * to mean any language.