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:label
s, skos:prefLabel
s and skosxl:prefLabel
s, respectively.
Low-level project metadata
It is not currently possible to change the Rendering engine after a project has been created. Whilst there might be appropriate reasons to do that, this alteration of a populated project could result in identifiers conforming to different schemes, thus defying the purpose of the URI Generator in the first place. Provided that the user understands its implications, 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:
plugins.mandatory.rendering.factoryID
: the ID of the factory to useplugins.mandatory.rendering.configType
: the type of configuration used
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:label
s 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, or the star *
to mean any language.
This rendering engine implementations utilizes a graph pattern to extract the labels, while it can fallback to the content of the bounded description of the subject resource, when SPARQL querying is not possible.
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:prefLabel
s 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, or the star *
to mean any language.
This rendering engine implementations utilizes a graph pattern to extract the labels, while it can fallback to the content of the bounded description of the subject resource, when SPARQL querying is not possible.
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:prefLabel
s 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, or the star *
to mean any language.
This rendering engine implementations utilizes a graph pattern to extract the labels, and it can not be used in cases SPARQL querying is not possible.