DYNAMIC TARGETS

Unofficial Draft

More details about this document
Latest published version:
https://rml.io/specs/target/dynamictarget
Editors:
(Ghent University – imec – IDLab)
(Ghent University – imec – IDLab)
Authors:
(Ghent University – imec – IDLab)
(Ghent University – imec – IDLab)
This Version
https://rml.io/specs/target/dynamictarget/20241212/
Website
https://rml.io/

Abstract

In RDF Mapping Language [RML], you can use a logical target to specify how and to which target generated RDF should be exported. Logical targets are statically described, i.e. they are constant values throughout a mapping process. There is no scalable solution in RML to dynamically define a logical target based on source data.

One use case for dynamic targets is enabling fine-grained access control in Solid [Solid]. Solid is a specification that lets people and organizations store their data securely as resources on decentralized data stores called Pods. Each resource is identified by a Uniform Resource Identifier [URI]. The access to the data in a Pod is controlled on resource level, i.e. per URI. To allow for fine-grained access control, it might be needed to define URI patterns that are based on the source data.

1. Overview

This section is non-normative.

1.1 Document conventions

We assume readers have basic familiarity with [RDF] and [RML] concepts.

In this document, examples assume the following namespace prefix bindings unless otherwise stated:

Prefix Namespace
rml: http://w3id.org/rml/
rmle: https://rml.io/ns/extensions#
htv: http://www.w3.org/2011/http#
ex: http://example.org/
foaf: http://xmlns.com/foaf/0.1/

The examples are contained in color-coded boxes. We use the Turtle syntax [Turtle] to write RDF.

1.2 Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

2. Dynamic targets

Logical targets are a set of RDF triples. Consequently, it is possible to define RML mapping rules to generate logical targets based on source data.

The generated logical targets are to be used during the same mapping process by which they are generated. For this purpose a self-referencing logical target (rmle:ThisMapping) is introduced. This logical target indicates that the RDF triples, generated during the current mapping process and exported to rmle:ThisMapping, have to be added to the RML mapping rules that are part of the current mapping process, as additional RML rules.

In RML, logical targets are identified with a constant blank node or named node, connected to a term map with the rml:logicalTarget property. To refer to a generated logical target, a logical target map (rmle:LogicalTargetMap) is introduced, connected to a term map the rmle:logicalTargetMap property. A logical target map is a subclass of an expression map, which is evaluated on the logical iteration of the triples maps in which it is declared, to generate identifiers of logical targets during the mapping process. It is the responsibility of the author of the mapping file to ensure that the identifiers generated by a logical target map refer to valid logical target descriptions.

Note

With the addition of a self-referencing logical target (rmle:ThisMapping) and a logical target map (rmle:LogicalTargetMap), RML can export RDF triples to dynamically generated logical targets based on the source data.

3. Example

In this example RDF triples are exported using dynamic logical targets: one resource per person described in the source data. More persons in the source data result in more (dynamically generated) targets, using the same RML mapping. We can use this dynamic logical target, for example, to store one resource per person in a Solid pod.

A. References

A.1 Normative references

[RDF]
RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/
[RML]
RDF Mapping Language. URL: https://kg-construct.github.io/rml-resources/portal/
[Turtle]
RDF 1.1 Turtle. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/turtle/

A.2 Informative references

[Solid]
Solid project. URL: https://solidproject.org/specification
[URI]
Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986