From f6d5b0fd67975f1d8bf47474af53e7de525da071 Mon Sep 17 00:00:00 2001
From: Dylan Van Assche
+ This is an early draft,
+ yet efforts are made to keep things stable.
+
+ This document is licensed under a
+ Creative Commons Attribution 4.0 International Public License
+ (CC-BY).
+ This document describes a formal representation to align the
+RDF Mapping Language [RML] with Target [paper]
+to describe in RML mapping rules how a generated Knowledge Graph
+should be directed and exported.
+The current document describes how Target is integrated
+with RML through definitions and examples. The version of this document is v1.0.0.
+ This document is a draft of a potential specification. It has no official
+ standing of any kind and does not represent the support or consensus of
+ any standards organization.
+ This is an early draft,
+yet efforts are made to keep things stable.Target in RML
+
+
+ Unofficial Draft
+
+
+
+
+
+
+
+
+
+ Abstract
Status of This Document
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.
+ The key word MAY in this document + is to be interpreted as described in + BCP 14 + [RFC2119] [RFC8174] + when, and only when, they appear in all capitals, as shown here. +
This section is non-normative.
This document describes the alignment of Target specification with RML +to define how a generated RDF knowledge graph must be exported +in the RML mapping rules. +Target and RML are self-standing specifications +which are aligned through this specification.
In this document, examples assume +the following namespace prefix bindings unless otherwise stated:
Prefix | +Namespace | +
---|---|
rml |
+http://semweb.mmlab.be/ns/rml# | +
rmlt |
+http://semweb.mmlab.be/ns/rml-target# | +
rr |
+http://www.w3.org/ns/r2rml# | +
formats |
+https://www.w3.org/ns/formats/ | +
comp |
+http://semweb.mmlab.be/ns/rml-compression# | +
csvw |
+http://www.w3.org/ns/csvw# | +
foaf |
+http://xmlns.com/foaf/0.1/ | +
fnml |
+http://semweb.mmlab.be/ns/fnml# | +
idlab-fn |
+http://example.com/idlab/function/ | +
RML does not specify where generated triples are exported to,
+each RML processor has its own way to describe this information
+through configuration files or command line parameters.
+To incorporate this information in the RML mapping rules,
+RML is aligned with the
+Target vocabulary
+which describes how the generated triples are exported.
+RML is aligned with the Target vocabulary
+by extending rr:TermMap
with the rml:logicalTarget
property
+to describe on Term Map [RML] level where each triple must be directed to.
+A Term Map is a function that generates an RDF term
+from a logical reference [RML].
+The result of that function is known as the term map's generated
+RDF term [RDF-Concepts]
+such as subjects, predicates, objects, named graphs and language tags.
A Term Map MAY also contain zero or more rml:logicalTarget
properties
+to export all triples containing the generated term to different targets.
+The same Term Map can have multiple targets by specifying
+multiple rml:logicalTarget
properties in the Term Map.
Multiple Targets MAY be combined by specifying multiple Targets +in the same Term Map or multiple Term Maps of the same RDF triple. +If multiple Targets are defined in the same Term Map, +all triples containing the generated Term are exported +to all the specified Targets. +In case multiple Term Maps of the same RDF triple contain more than one Target, +the generated triples are exported to all the specified Targets.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source [ a csvw:Table;
+ csvw:url "http://rml.io/data/csvw/Airport.csv";
+ csvw:dialect [ a csvw:Dialect;
+ csvw:delimiter ";”;
+ csvw:encoding "UTF-8";
+ csvw:header "1"^^xsd:boolean;
+ ];
+ ];
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.com/{id}";
+ rml:logicalTarget [ a rmlt:LogicalTarget;
+ rmlt:target [ a void:Dataset
+ void:dataDump <file:///data/dump1.nq>;
+ ];
+ rmlt:serialization formats:N-Quads;
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget [ a rmlt:LogicalTarget;
+ rmlt:target [ a void:Dataset
+ void:dataDump <file:///data/dump2.ttl>;
+ ];
+ rmlt:serialization formats:Turtle;
+ rmlt:compression comp:Zip;
+ ];
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+.
+
+ If the mapping document contains no Targets, +the processor falls back to the default target, +as it is specified through the processor's +specific configuration file or command line parameters. +If a mapping document contains at least one Target, +the processor will not export generated triples +which do not have a Target assigned.
Property | +Domain | +Range | +
---|---|---|
rml:logicalTarget |
+rr:TermMap |
+rmlt:LogicalTarget |
+
All triples containing the generated subject are exported +to the specified targets in the Subject Map [RML].
The following example exports all triples containing
+the generated subject http://example.org/{id}
+to an RDF dump with N-Quads as serialization format and GZip compression:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt.gz>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Quads ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the generated predicate are exported +to the specified targets in the Predicate Map [RML].
The following example exports all triples containing
+the generated predicate foaf:name
to an RDF dump
+with Turtle as serialization format and Zip compression:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [ rr:template "http://example.org/{id}"; ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rr:constant foaf:name;
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:objectMap [ rml:reference "name" ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the generated object are exported +to the specified targets in the Object Map [RML].
The following example exports all triples containing +the generated object name to an RDF dump +with N-Triples as serialization format:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [ rr:template "http://example.org/{id}"; ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples within a named graph are exported to the specified targets +in the Graph Map [RML]. +The named graph doesn't influence where the named graph's triples +are exported to by the Target. +If a named graph is spread over multiple targets, +all targets must be combined to access the complete named graph.
The following example exports all triples in the named graph ex:MyGraph
+to an SPARQL [SPARQL] endpoint using SPARQL UPDATE
:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ rr:graphMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rr:template "http://www.example.org/{type}"
+ ];
+ ];
+ ];
+.
+
+ All triples with a language tag are exported to the specified targets +in the Language Map [RML].
The following examples export all triples with a language tag +to a RDF dump with JSON-LD as serialization format:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rml:reference "language";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age"; ];
+ ];
+.
+
+ Multiple Targets MAY be specified for the same triple +in the same or multiple Term Maps. +Each triple is exported to all the Targets +specified in the triple's Term Maps.
All triples containing the subject http://example.org/{id}
+are exported to LogicalTarget1
+and all triples containing the predicate foaf:name
+are exported to LogicalTarget2
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rml:logicalTarget <#LogicalTarget2>;
+ rr:constant foaf:name
+ ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the subject http://example.org/{id}
are exported
+to LogicalTarget1
, all triples containing the predicate foaf:name
+are exported to LogicalTarget2
and all triples containing the object "age"
+are exported to LogicalTarget3
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Quads ;
+.
+
+<#SPARQLUPDATE_target> a sd:Service ;
+ sd:endpoint <http://example.org/sparql-update> ;
+ sd:supportedLanguage sd:SPARQL11Update ;
+.
+
+<#LogicalTarget3> a rml:logicalTarget;
+ rmlt:target <#SPARQLEndpoint>;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rml:logicalTarget <#LogicalTarget2>;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:logicalTarget <#LogicalTarget3>;
+ rml:reference "age";
+ ];
+ ];
+.
+
+ All triples containing the language tag language
+are exported to LogicalTarget1
+and all triples containing the object "age"
+are exported to LogicalTarget2
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rml:reference "language";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ rml:logicalTarget <#LogicalTarget2>;
+ ];
+ ];
+.
+
+ In some cases exporting all triples to a target is not desired, +therefore Targets can be overridden when needed +by either using a separate Triples Map which isolates certain triples or +by using FnO functions [FnO] as conditions.
Triples can be exported to a specific Target while not to other Targets +by isolating these triples in a separate Triples Map.
In this example, all triples containing the subject http://example.org/{id}
+are exported to LogicalTarget1
+and all triples containing the subject http://newtarget.org/{id}
+are exported to LogicalTarget2.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap1> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ ];
+ ];
+.
+
+<#TriplesMap2> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://newtarget.org/{id}";
+ rml:logicalTarget <#LogicalTarget2>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:interest ];
+ rr:objectMap [ rml:reference "interest"; ];
+ ];
+.
+
+ FnO functions MAY be leveraged to export triples +only under certain conditions. +Conditions are already integrated in RML+FnO processors, +thus conditions apply on Targets as well. +Triples are generated and exported based on the FnO condition's evaluation. +Only if the condition is true, the triples are generated and exported.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ fnml:functionValue [
+ rr:predicateObjectMap [
+ rr:predicate fno:executes ;
+ rr:objectMap [ rr:constant idlab-fn:trueCondition ]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:strBoolean ;
+ rr:objectMap [ rr:constant "true"]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:str ;
+ rr:objectMap [
+ rml:reference "age";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ ];
+ ];
+ ];
+ ];
+.
+
+ + This document is licensed under a + Creative Commons Attribution 4.0 International Public License + (CC-BY). +
+This document describes a formal representation to align the +RDF Mapping Language [RML] with Target [paper] +to describe in RML mapping rules how a generated Knowledge Graph +should be directed and exported. +The current document describes how Target is integrated +with RML through definitions and examples.
The version of this document is v1.0.0.
+ This document is a draft of a potential specification. It has no official + standing of any kind and does not represent the support or consensus of + any standards organization. +
+This is an early draft, +yet efforts are made to keep things stable.
+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.
+ The key word MAY in this document + is to be interpreted as described in + BCP 14 + [RFC2119] [RFC8174] + when, and only when, they appear in all capitals, as shown here. +
This section is non-normative.
This document describes the alignment of Target specification with RML +to define how a generated RDF knowledge graph must be exported +in the RML mapping rules. +Target and RML are self-standing specifications +which are aligned through this specification.
In this document, examples assume +the following namespace prefix bindings unless otherwise stated:
Prefix | +Namespace | +
---|---|
rml |
+http://semweb.mmlab.be/ns/rml# | +
rmlt |
+http://semweb.mmlab.be/ns/rml-target# | +
rr |
+http://www.w3.org/ns/r2rml# | +
formats |
+https://www.w3.org/ns/formats/ | +
comp |
+http://semweb.mmlab.be/ns/rml-compression# | +
csvw |
+http://www.w3.org/ns/csvw# | +
foaf |
+http://xmlns.com/foaf/0.1/ | +
fnml |
+http://semweb.mmlab.be/ns/fnml# | +
idlab-fn |
+http://example.com/idlab/function/ | +
RML does not specify where generated triples are exported to,
+each RML processor has its own way to describe this information
+through configuration files or command line parameters.
+To incorporate this information in the RML mapping rules,
+RML is aligned with the
+Target vocabulary
+which describes how the generated triples are exported.
+RML is aligned with the Target vocabulary
+by extending rr:TermMap
with the rml:logicalTarget
property
+to describe on Term Map [RML] level where each triple must be directed to.
+A Term Map is a function that generates an RDF term
+from a logical reference [RML].
+The result of that function is known as the term map's generated
+RDF term [RDF-Concepts]
+such as subjects, predicates, objects, named graphs and language tags.
A Term Map MAY also contain zero or more rml:logicalTarget
properties
+to export all triples containing the generated term to different targets.
+The same Term Map can have multiple targets by specifying
+multiple rml:logicalTarget
properties in the Term Map.
Multiple Targets MAY be combined by specifying multiple Targets +in the same Term Map or multiple Term Maps of the same RDF triple. +If multiple Targets are defined in the same Term Map, +all triples containing the generated Term are exported +to all the specified Targets. +In case multiple Term Maps of the same RDF triple contain more than one Target, +the generated triples are exported to all the specified Targets.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source [ a csvw:Table;
+ csvw:url "http://rml.io/data/csvw/Airport.csv";
+ csvw:dialect [ a csvw:Dialect;
+ csvw:delimiter ";”;
+ csvw:encoding "UTF-8";
+ csvw:header "1"^^xsd:boolean;
+ ];
+ ];
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.com/{id}";
+ rml:logicalTarget [ a rmlt:LogicalTarget;
+ rmlt:target [ a void:Dataset
+ void:dataDump <file:///data/dump1.nq>;
+ ];
+ rmlt:serialization formats:N-Quads;
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget [ a rmlt:LogicalTarget;
+ rmlt:target [ a void:Dataset
+ void:dataDump <file:///data/dump2.ttl>;
+ ];
+ rmlt:serialization formats:Turtle;
+ rmlt:compression comp:Zip;
+ ];
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+.
+
+ If the mapping document contains no Targets, +the processor falls back to the default target, +as it is specified through the processor's +specific configuration file or command line parameters. +If a mapping document contains at least one Target, +the processor will not export generated triples +which do not have a Target assigned.
Property | +Domain | +Range | +
---|---|---|
rml:logicalTarget |
+rr:TermMap |
+rmlt:LogicalTarget |
+
All triples containing the generated subject are exported +to the specified targets in the Subject Map [RML].
The following example exports all triples containing
+the generated subject http://example.org/{id}
+to an RDF dump with N-Quads as serialization format and GZip compression:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt.gz>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Quads ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the generated predicate are exported +to the specified targets in the Predicate Map [RML].
The following example exports all triples containing
+the generated predicate foaf:name
to an RDF dump
+with Turtle as serialization format and Zip compression:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [ rr:template "http://example.org/{id}"; ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rr:constant foaf:name;
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:objectMap [ rml:reference "name" ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the generated object are exported +to the specified targets in the Object Map [RML].
The following example exports all triples containing +the generated object name to an RDF dump +with N-Triples as serialization format:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [ rr:template "http://example.org/{id}"; ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples within a named graph are exported to the specified targets +in the Graph Map [RML]. +The named graph doesn't influence where the named graph's triples +are exported to by the Target. +If a named graph is spread over multiple targets, +all targets must be combined to access the complete named graph.
The following example exports all triples in the named graph ex:MyGraph
+to an SPARQL [SPARQL] endpoint using SPARQL UPDATE
:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ rr:graphMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rr:template "http://www.example.org/{type}"
+ ];
+ ];
+ ];
+.
+
+ All triples with a language tag are exported to the specified targets +in the Language Map [RML].
The following examples export all triples with a language tag +to a RDF dump with JSON-LD as serialization format:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rml:reference "language";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age"; ];
+ ];
+.
+
+ Multiple Targets MAY be specified for the same triple +in the same or multiple Term Maps. +Each triple is exported to all the Targets +specified in the triple's Term Maps.
All triples containing the subject http://example.org/{id}
+are exported to LogicalTarget1
+and all triples containing the predicate foaf:name
+are exported to LogicalTarget2
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rml:logicalTarget <#LogicalTarget2>;
+ rr:constant foaf:name
+ ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the subject http://example.org/{id}
are exported
+to LogicalTarget1
, all triples containing the predicate foaf:name
+are exported to LogicalTarget2
and all triples containing the object "age"
+are exported to LogicalTarget3
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Quads ;
+.
+
+<#SPARQLUPDATE_target> a sd:Service ;
+ sd:endpoint <http://example.org/sparql-update> ;
+ sd:supportedLanguage sd:SPARQL11Update ;
+.
+
+<#LogicalTarget3> a rml:logicalTarget;
+ rmlt:target <#SPARQLEndpoint>;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rml:logicalTarget <#LogicalTarget2>;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:logicalTarget <#LogicalTarget3>;
+ rml:reference "age";
+ ];
+ ];
+.
+
+ All triples containing the language tag language
+are exported to LogicalTarget1
+and all triples containing the object "age"
+are exported to LogicalTarget2
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rml:reference "language";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ rml:logicalTarget <#LogicalTarget2>;
+ ];
+ ];
+.
+
+ In some cases exporting all triples to a target is not desired, +therefore Targets can be overridden when needed +by either using a separate Triples Map which isolates certain triples or +by using FnO functions [FnO] as conditions.
Triples can be exported to a specific Target while not to other Targets +by isolating these triples in a separate Triples Map.
In this example, all triples containing the subject http://example.org/{id}
+are exported to LogicalTarget1
+and all triples containing the subject http://newtarget.org/{id}
+are exported to LogicalTarget2.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap1> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ ];
+ ];
+.
+
+<#TriplesMap2> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://newtarget.org/{id}";
+ rml:logicalTarget <#LogicalTarget2>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:interest ];
+ rr:objectMap [ rml:reference "interest"; ];
+ ];
+.
+
+ FnO functions MAY be leveraged to export triples +only under certain conditions. +Conditions are already integrated in RML+FnO processors, +thus conditions apply on Targets as well. +Triples are generated and exported based on the FnO condition's evaluation. +Only if the condition is true, the triples are generated and exported.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ fnml:functionValue [
+ rr:predicateObjectMap [
+ rr:predicate fno:executes ;
+ rr:objectMap [ rr:constant idlab-fn:trueCondition ]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:strBoolean ;
+ rr:objectMap [ rr:constant "true"]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:str ;
+ rr:objectMap [
+ rml:reference "age";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ ];
+ ];
+ ];
+ ];
+.
+
+ + This document is licensed under a + Creative Commons Attribution 4.0 International Public License + (CC-BY). +
+This document describes a formal representation to align the +RDF Mapping Language [RML] with Target [paper] +to describe in RML mapping rules how a generated Knowledge Graph +should be directed and exported. +The current document describes how Target is integrated +with RML through definitions and examples.
The version of this document is v1.0.0.
+ This document is a draft of a potential specification. It has no official + standing of any kind and does not represent the support or consensus of + any standards organization. +
+This is an early draft, +yet efforts are made to keep things stable.
+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.
+ The key word MAY in this document + is to be interpreted as described in + BCP 14 + [RFC2119] [RFC8174] + when, and only when, they appear in all capitals, as shown here. +
This section is non-normative.
This document describes the alignment of Target specification with RML +to define how a generated RDF knowledge graph must be exported +in the RML mapping rules. +Target and RML are self-standing specifications +which are aligned through this specification.
In this document, examples assume +the following namespace prefix bindings unless otherwise stated:
Prefix | +Namespace | +
---|---|
rml |
+http://semweb.mmlab.be/ns/rml# | +
rmlt |
+http://semweb.mmlab.be/ns/rml-target# | +
rr |
+http://www.w3.org/ns/r2rml# | +
formats |
+https://www.w3.org/ns/formats/ | +
comp |
+http://semweb.mmlab.be/ns/rml-compression# | +
csvw |
+http://www.w3.org/ns/csvw# | +
foaf |
+http://xmlns.com/foaf/0.1/ | +
fnml |
+http://semweb.mmlab.be/ns/fnml# | +
idlab-fn |
+http://example.com/idlab/function/ | +
RML does not specify where generated triples are exported to,
+each RML processor has its own way to describe this information
+through configuration files or command line parameters.
+To incorporate this information in the RML mapping rules,
+RML is aligned with the
+Target vocabulary
+which describes how the generated triples are exported.
+RML is aligned with the Target vocabulary
+by extending rr:TermMap
with the rml:logicalTarget
property
+to describe on Term Map [RML] level where each triple must be directed to.
+A Term Map is a function that generates an RDF term
+from a logical reference [RML].
+The result of that function is known as the term map's generated
+RDF term [RDF-Concepts]
+such as subjects, predicates, objects, named graphs and language tags.
A Term Map MAY also contain zero or more rml:logicalTarget
properties
+to export all triples containing the generated term to different targets.
+The same Term Map can have multiple targets by specifying
+multiple rml:logicalTarget
properties in the Term Map.
Multiple Targets MAY be combined by specifying multiple Targets +in the same Term Map or multiple Term Maps of the same RDF triple. +If multiple Targets are defined in the same Term Map, +all triples containing the generated Term are exported +to all the specified Targets. +In case multiple Term Maps of the same RDF triple contain more than one Target, +the generated triples are exported to all the specified Targets.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source [ a csvw:Table;
+ csvw:url "http://rml.io/data/csvw/Airport.csv";
+ csvw:dialect [ a csvw:Dialect;
+ csvw:delimiter ";”;
+ csvw:encoding "UTF-8";
+ csvw:header "1"^^xsd:boolean;
+ ];
+ ];
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.com/{id}";
+ rml:logicalTarget [ a rmlt:LogicalTarget;
+ rmlt:target [ a void:Dataset
+ void:dataDump <file:///data/dump1.nq>;
+ ];
+ rmlt:serialization formats:N-Quads;
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget [ a rmlt:LogicalTarget;
+ rmlt:target [ a void:Dataset
+ void:dataDump <file:///data/dump2.ttl>;
+ ];
+ rmlt:serialization formats:Turtle;
+ rmlt:compression comp:Zip;
+ ];
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+.
+
+ If the mapping document contains no Targets, +the processor falls back to the default target, +as it is specified through the processor's +specific configuration file or command line parameters. +If a mapping document contains at least one Target, +the processor will not export generated triples +which do not have a Target assigned.
Property | +Domain | +Range | +
---|---|---|
rml:logicalTarget |
+rr:TermMap |
+rmlt:LogicalTarget |
+
All triples containing the generated subject are exported +to the specified targets in the Subject Map [RML].
The following example exports all triples containing
+the generated subject http://example.org/{id}
+to an RDF dump with N-Quads as serialization format and GZip compression:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt.gz>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Quads ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the generated predicate are exported +to the specified targets in the Predicate Map [RML].
The following example exports all triples containing
+the generated predicate foaf:name
to an RDF dump
+with Turtle as serialization format and Zip compression:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [ rr:template "http://example.org/{id}"; ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rr:constant foaf:name;
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:objectMap [ rml:reference "name" ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the generated object are exported +to the specified targets in the Object Map [RML].
The following example exports all triples containing +the generated object name to an RDF dump +with N-Triples as serialization format:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [ rr:template "http://example.org/{id}"; ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples within a named graph are exported to the specified targets +in the Graph Map [RML]. +The named graph doesn't influence where the named graph's triples +are exported to by the Target. +If a named graph is spread over multiple targets, +all targets must be combined to access the complete named graph.
The following example exports all triples in the named graph ex:MyGraph
+to an SPARQL [SPARQL] endpoint using SPARQL UPDATE
:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ rr:graphMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rr:template "http://www.example.org/{type}"
+ ];
+ ];
+ ];
+.
+
+ All triples with a language tag are exported to the specified targets +in the Language Map [RML].
The following examples export all triples with a language tag +to a RDF dump with JSON-LD as serialization format:
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump> a void:Dataset ;
+ void:dataDump <file:///data/file.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rml:reference "language";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age"; ];
+ ];
+.
+
+ Multiple Targets MAY be specified for the same triple +in the same or multiple Term Maps. +Each triple is exported to all the Targets +specified in the triple's Term Maps.
All triples containing the subject http://example.org/{id}
+are exported to LogicalTarget1
+and all triples containing the predicate foaf:name
+are exported to LogicalTarget2
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rml:logicalTarget <#LogicalTarget2>;
+ rr:constant foaf:name
+ ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [ rml:reference "age" ];
+ ];
+.
+
+ All triples containing the subject http://example.org/{id}
are exported
+to LogicalTarget1
, all triples containing the predicate foaf:name
+are exported to LogicalTarget2
and all triples containing the object "age"
+are exported to LogicalTarget3
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Quads ;
+.
+
+<#SPARQLUPDATE_target> a sd:Service ;
+ sd:endpoint <http://example.org/sparql-update> ;
+ sd:supportedLanguage sd:SPARQL11Update ;
+.
+
+<#LogicalTarget3> a rml:logicalTarget;
+ rmlt:target <#SPARQLEndpoint>;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [
+ rml:logicalTarget <#LogicalTarget2>;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:logicalTarget <#LogicalTarget3>;
+ rml:reference "age";
+ ];
+ ];
+.
+
+ All triples containing the language tag language
+are exported to LogicalTarget1
+and all triples containing the object "age"
+are exported to LogicalTarget2
.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#LogicalTarget1>;
+ rml:reference "language";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ rml:logicalTarget <#LogicalTarget2>;
+ ];
+ ];
+.
+
+ In some cases exporting all triples to a target is not desired, +therefore Targets can be overridden when needed +by either using a separate Triples Map which isolates certain triples or +by using FnO functions [FnO] as conditions.
Triples can be exported to a specific Target while not to other Targets +by isolating these triples in a separate Triples Map.
In this example, all triples containing the subject http://example.org/{id}
+are exported to LogicalTarget1
+and all triples containing the subject http://newtarget.org/{id}
+are exported to LogicalTarget2.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/file2.nt>;
+.
+
+<#LogicalTarget2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap1> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ rml:reference "age";
+ ];
+ ];
+.
+
+<#TriplesMap2> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://newtarget.org/{id}";
+ rml:logicalTarget <#LogicalTarget2>;
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:interest ];
+ rr:objectMap [ rml:reference "interest"; ];
+ ];
+.
+
+ FnO functions MAY be leveraged to export triples +only under certain conditions. +Conditions are already integrated in RML+FnO processors, +thus conditions apply on Targets as well. +Triples are generated and exported based on the FnO condition's evaluation. +Only if the condition is true, the triples are generated and exported.
<LogicalSource1> a rml:LogicalSource;
+ rml:source "/data/people.json";
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+.
+
+<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/file1.nt>;
+.
+
+<#LogicalTarget1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples ;
+ rmlt:compression comp:GZip;
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource <#LogicalSource1>;
+ rr:subjectMap [
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [ rml:reference "name"; ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:age ];
+ rr:objectMap [
+ fnml:functionValue [
+ rr:predicateObjectMap [
+ rr:predicate fno:executes ;
+ rr:objectMap [ rr:constant idlab-fn:trueCondition ]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:strBoolean ;
+ rr:objectMap [ rr:constant "true"]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:str ;
+ rr:objectMap [
+ rml:reference "age";
+ rml:logicalTarget <#LogicalTarget1>;
+ ];
+ ];
+ ];
+ ];
+ ];
+.
+
+ MJdv)X9tkRfd uycmkCtK5oE02$%1k**{5?^g`f8Wq%s;!WO>^*-4E*sfYgf6-XpP^8
zK`Gs$z5h@ZhO=M#??K*SKuf~v2Cv@bS(&E#SHqq`WOkrqQYsg6iX-$U*0O=6c}Goa
z+`V7?{FL)BKzmX;qDlE&I>N?)>Pm`#Z8YG! \s*<\/p>/gm,"").replace(/\n\s*"= 2.0.0-beta.1",7:">= 4.0.0"};t.REVISION_CHANGES=h;var m="[object Object]";r.prototype={constructor:r,logger:p.default,log:p.default.log,registerHelper:function(e,t){if(a.toString.call(e)===m){if(t)throw new o.default("Arg not supported with multiple helpers");a.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(a.toString.call(e)===m)a.extend(this.partials,e);else{if("undefined"==typeof t)throw new o.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(a.toString.call(e)===m){if(t)throw new o.default("Arg not supported with multiple decorators");a.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]}};var g=p.default.log;t.log=g,t.createFrame=a.createFrame,t.logger=p.default},function(e,t){"use strict";function n(e){return u[e]}function r(e){for(var t=1;t =0?t:parseInt(e,10)}return e},log:function(e){if(e=i.lookupLevel(e),"undefined"!=typeof console&&i.lookupLevel(i.level)<=e){var t=i.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a \n {{#if logos}}\n {{showLogos logos}}\n {{else}}\n {{#if prependW3C}}\n \n Please check the errata for any errors or issues\n reported since publication.\n \n {{#if multipleAlternates}}\n This document is also available in these non-normative formats:\n {{else}}\n This document is also available in this non-normative format:\n {{/if}}\n {{{alternatesHTML}}}\n \n The English version of this specification is the only normative version. Non-normative\n translations may also be available.\n {{{additionalCopyrightHolders}}} \n This document is licensed under a\n Creative Commons\n Attribution 3.0 License.\n \n Copyright ©\n {{#if copyrightStart}}{{copyrightStart}}-{{/if}}{{publishYear}}\n {{#if additionalCopyrightHolders}} {{{additionalCopyrightHolders}}} &{{/if}}\n W3C®\n (MIT,\n ERCIM,\n Keio, Beihang).\n {{#if isCCBY}}\n Some Rights Reserved: this document is dual-licensed,\n CC-BY and\n W3C Document License.\n {{/if}}\n W3C liability,\n trademark and\n {{#if isCCBY}}\n document use\n {{else}}\n {{#if isW3CSoftAndDocLicense}}\n permissive document license\n {{else}}\n document use\n {{/if}}\n {{/if}}\n rules apply.\n \n This document is merely a public working draft of a potential specification. It has\n no official standing of any kind and does not represent the support or consensus of any\n standards organisation.\n \n This document is merely a W3C-internal {{#if isMO}}member-confidential{{/if}} document. It\n has no official standing of any kind and does not represent consensus of the W3C\n Membership.\n \n {{{l10n.status_at_publication}}}\n By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions. If you wish to make comments regarding this document, please send them to\n {{wgPublicList}}@w3.org\n (subscribe,\n archives){{#if subjectPrefix}}\n with Please consult the complete list of Team Submissions. \n This document was published by {{{wgHTML}}} as {{anOrA}} {{longStatus}}.\n {{#if notYetRec}}\n This document is intended to become a W3C Recommendation.\n {{/if}}\n {{#unless isPR}}\n If you wish to make comments regarding this document, please send them to\n {{wgPublicList}}@w3.org\n (subscribe,\n archives){{#if subjectPrefix}}\n with \n Please see the Working Group's implementation\n report.\n \n Publication as {{anOrA}} {{textStatus}} does not imply endorsement by the W3C\n Membership. This is a draft document and may be updated, replaced or obsoleted by other\n documents at any time. It is inappropriate to cite this document as other than work in\n progress.\n \n This document has been reviewed by W3C Members, by software developers, and by other W3C\n groups and interested parties, and is endorsed by the Director as a W3C Recommendation.\n It is a stable document and may be used as reference material or cited from another\n document. W3C's role in making the Recommendation is to draw attention to the\n specification and to promote its widespread deployment. This enhances the functionality\n and interoperability of the Web.\n \n This is a Last Call Working Draft and thus the Working Group has determined that this\n document has satisfied the relevant technical requirements and is sufficiently stable to\n advance through the Technical Recommendation process.\n \n {{#unless isIGNote}}\n This document was produced by\n {{#if multipleWGs}}\n groups\n {{else}}\n a group\n {{/if}} operating under the\n 5 February 2004 W3C Patent\n Policy.\n {{/unless}}\n {{#if recNotExpected}}\n The group does not expect this document to become a W3C Recommendation.\n {{/if}}\n {{#unless isIGNote}}\n {{#if multipleWGs}}\n W3C maintains {{{wgPatentHTML}}}\n {{else}}\n W3C maintains a public list of any patent\n disclosures\n {{/if}}\n made in connection with the deliverables of\n {{#if multipleWGs}}\n each group; these pages also include\n {{else}}\n the group; that page also includes\n {{/if}}\n instructions for disclosing a patent. An individual who has actual knowledge of a patent\n which the individual believes contains\n Essential\n Claim(s) must disclose the information in accordance with\n section\n 6 of the W3C Patent Policy.\n {{/unless}}\n {{#if isIGNote}}\n The disclosure obligations of the Participants of this group are described in the\n charter.\n {{/if}}\n This document is governed by the 1 September 2015 W3C Process Document.\n \n This document is governed by the 14 October 2005 W3C Process Document.\n {{{addPatentNote}}} \n {{#if multipleAlternates}}\n This document is also available in these non-normative formats: \n {{else}}\n This document is also available in this non-normative format: \n {{/if}}\n {{{alternatesHTML}}}\n \n Copyright ©\n {{#if copyrightStart}}{{copyrightStart}}-{{/if}}{{publishYear}}\n the Contributors to the {{title}} Specification, published by the\n {{wg}} under the\n {{#if isCGFinal}}\n W3C Community Final Specification Agreement (FSA). \n A human-readable summary is available.\n {{else}}\n W3C Community Contributor License Agreement (CLA).\n A human-readable summary is available.\n {{/if}}\n \n This specification was published by the {{wg}}.\n It is not a W3C Standard nor is it on the W3C Standards Track.\n {{#if isCGFinal}}\n Please note that under the \n W3C Community Final Specification Agreement (FSA) \n other conditions apply.\n {{else}}\n Please note that under the \n W3C Community Contributor License Agreement (CLA)\n there is a limited opt-out and other conditions apply.\n {{/if}}\n Learn more about \n W3C Community and Business Groups.\n If you wish to make comments regarding this document, please send them to \n {{wgPublicList}}@w3.org \n (subscribe,\n archives){{#if subjectPrefix}}\n with ",r=0,i=t.length;r"),a.id&&(n+=""),a.src?(n+=" \n As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,\n and notes in this specification are non-normative. Everything else in this specification is\n normative.\n \n to be interpreted as described in [[!RFC2119]].\n This section is non-normative. ReSpec is a document production toolchain, with a notable focus on W3C specifications. You can find more information in the documentation. Found a bug in ReSpec? File it!.-1)i&&i.push(a);else if(c=de.contains(a.ownerDocument,a),s=g(p.appendChild(a),"script"),c&&b(s),n)for(u=0;a=s[u++];)We.test(a.type||"")&&n.push(a);return p}function y(){return!0}function w(){return!1}function x(){try{return J.activeElement}catch(e){}}function _(e,t,n,r,i,a){var s,o;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(o in t)_(e,o,n,r,t[o],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=w;else if(!i)return e;return 1===a&&(s=i,i=function(e){return de().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=de.guid++)),e.each(function(){de.event.add(this,t,i,r,n)})}function k(e,t){return de.nodeName(e,"table")&&de.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function E(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function T(e){var t=tt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function S(e,t){var n,r,i,a,s,o,l,c;if(1===t.nodeType){if(Pe.hasData(e)&&(a=Pe.access(e),s=Pe.set(t,a),c=a.events)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;n=s&&(r!==l&&(c=void 0,u=[e]),n.rejectWith(c,u))}};t?d():(de.Deferred.getStackHook&&(d.stackTrace=de.Deferred.getStackHook()),e.setTimeout(d))}}var s=0;return de.Deferred(function(e){n[0][3].add(a(0,e,de.isFunction(i)?i:o,e.notifyWith)),n[1][3].add(a(0,e,de.isFunction(t)?t:o)),n[2][3].add(a(0,e,de.isFunction(r)?r:l))}).promise()},promise:function(e){return null!=e?de.extend(e,i):i}},a={};return de.each(n,function(e,t){var s=t[2],o=t[5];i[t[1]]=s.add,o&&s.add(function(){r=o},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=s.fireWith}),i.promise(a),t&&t.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=te.call(arguments),a=de.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?te.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(c(e,a.done(s(n)).resolve,a.reject),"pending"===a.state()||de.isFunction(i[n]&&i[n].then)))return a.then();for(;n--;)c(i[n],s(n),a.reject);return a.promise()}});var Re=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;de.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Re.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},de.readyException=function(t){e.setTimeout(function(){throw t})};var Ae=de.Deferred();de.fn.ready=function(e){return Ae.then(e).catch(function(e){de.readyException(e)}),this},de.extend({isReady:!1,readyWait:1,holdReady:function(e){e?de.readyWait++:de.ready(!0)},ready:function(e){(e===!0?--de.readyWait:de.isReady)||(de.isReady=!0,e!==!0&&--de.readyWait>0||Ae.resolveWith(J,[de]))}}),de.ready.then=Ae.then,"complete"===J.readyState||"loading"!==J.readyState&&!J.documentElement.doScroll?e.setTimeout(de.ready):(J.addEventListener("DOMContentLoaded",u),e.addEventListener("load",u));var De=function(e,t,n,r,i,a,s){var o=0,l=e.length,c=null==n;if("object"===de.type(n)){i=!0;for(o in n)De(e,t,o,n[o],!0,a,s)}else if(void 0!==r&&(i=!0,de.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(de(e),n)})),t))for(;o","
"],col:[2,"
"],tr:[2,"","
"],td:[3,"
"],_default:[0,"",""]};ze.optgroup=ze.option,ze.tbody=ze.tfoot=ze.colgroup=ze.caption=ze.thead,ze.th=ze.td;var Ve=/<|?\w+;/;!function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div")),n=J.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ue.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ue.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ge=J.documentElement,Xe=/^key/,Ye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qe=/^([^.]*)(?:\.(.+)|)/;de.event={global:{},add:function(e,t,n,r,i){var a,s,o,l,c,u,p,d,f,h,m,g=Pe.get(e);if(g)for(n.handler&&(a=n,n=a.handler,i=a.selector),i&&de.find.matchesSelector(Ge,i),n.guid||(n.guid=de.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(t){return"undefined"!=typeof de&&de.event.triggered!==t.type?de.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ne)||[""],c=t.length;c--;)o=Qe.exec(t[c])||[],f=m=o[1],h=(o[2]||"").split(".").sort(),f&&(p=de.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,p=de.event.special[f]||{},u=de.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&de.expr.match.needsContext.test(i),namespace:h.join(".")},a),(d=l[f])||(d=l[f]=[],d.delegateCount=0,p.setup&&p.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(f,s)),p.add&&(p.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),de.event.global[f]=!0)},remove:function(e,t,n,r,i){var a,s,o,l,c,u,p,d,f,h,m,g=Pe.hasData(e)&&Pe.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Ne)||[""],c=t.length;c--;)if(o=Qe.exec(t[c])||[],f=m=o[1],h=(o[2]||"").split(".").sort(),f){for(p=de.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,d=l[f]||[],o=o[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=a=d.length;a--;)u=d[a],!i&&m!==u.origType||n&&n.guid!==u.guid||o&&!o.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(a,1),u.selector&&d.delegateCount--,p.remove&&p.remove.call(e,u));s&&!d.length&&(p.teardown&&p.teardown.call(e,h,g.handle)!==!1||de.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)de.event.remove(e,f+t[c],n,r,!0);de.isEmptyObject(l)&&Pe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,a,s,o=de.event.fix(e),l=new Array(arguments.length),c=(Pe.get(this,"events")||{})[o.type]||[],u=de.event.special[o.type]||{};for(l[0]=o,t=1;t"," 0&&(t+=", "+n.join(", "));var r=0;for(var i in this.aliases){var a=this.aliases[i];this.aliases.hasOwnProperty(i)&&a.children&&a.referenceCount>1&&(t+=", alias"+ ++r+"="+i,a.children[0]="alias"+r)}var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var o=this.mergeSource(t);return e?(s.push(o),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n ",o,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,i=void 0,a=void 0,s=void 0;return this.source.each(function(e){e.appendToBuffer?(a?e.prepend(" + "):a=e,s=e):(a&&(i?a.prepend("buffer += "):r=!0,s.add(";"),a=s=void 0),i=!0,t||(n=!1))}),n?a?(a.prepend("return "),s.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(r?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(r?"":";\n")),this.source.merge()},blockValue:function(e){var t=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("helpers.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[" != null ? ",e,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var i=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[i++])),this.resolvePath("context",e,i,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,r,i){var s=this;if(this.options.strict||this.options.assumeObjects)return void this.push(a(this.options.strict&&i,this,t,e));for(var o=t.length;n\n {{#if isMemberSubmission}}\n
\n {{/if}}\n {{#if isTeamSubmission}}\n
\n {{/if}}\n {{/if}}\n {{/if}}\n
{{title}}
\n {{#if subtitle}}\n {{subtitle}}
\n {{/if}}\n {{#if prependW3C}}W3C {{/if}}{{textStatus}}
\n \n {{#unless isNoTrack}}\n
\n {{#if errata}}\n
\n\n")}),define("tmpl!w3c/templates/sotd.html",["deps/handlebars"],function(e){return e.compile("{{l10n.sotd}}
\n {{#if isUnofficial}}\n {{subjectPrefix}}
at the start of your email's subject{{/if}}.{{subjectPrefix}}
at the start of your email's subject{{/if}}.\n {{/unless}}\n {{#if isLC}}The Last Call period ends {{humanLCEnd}}.{{/if}}\n {{#if isCR}}\n W3C publishes a Candidate Recommendation to indicate that the document is believed to be\n stable and to encourage implementation by the developer community. This Candidate\n Recommendation is expected to advance to Proposed Recommendation no earlier than\n {{humanCREnd}}.\n {{/if}}\n {{#if isPER}}\n W3C Advisory Committee Members are invited to\n send formal review comments on this Proposed\n Edited Recommendation to the W3C Team until\n {{humanPEREnd}}.\n Members of the Advisory Committee will find the\n appropriate review form for this document by\n consulting their list of current\n WBS questionnaires.\n {{/if}}\n {{#if isPR}}\n The W3C Membership and other interested parties are invited to review the document and\n send comments to\n {{wgPublicList}}@w3.org\n (subscribe,\n archives)\n through {{humanPREnd}}. Advisory Committee Representatives should consult their\n WBS questionnaires.\n Note that substantive technical comments were expected during the Last Call review\n period that ended {{humanLCEnd}}.\n {{else}}\n {{#unless isPER}}\n All comments are welcome.\n {{/unless}}\n {{/if}}\n {{title}}
\n {{#if subtitle}}\n {{subtitle}}
\n {{/if}}\n {{longStatus}}
\n \n {{#if thisVersion}}\n
\n {{#if alternateFormats}}\n
\n{{l10n.sotd}}
\n {{subjectPrefix}}
at the start of your\n email's subject{{/if}}."):a.alt&&(n+=a.alt),a.url&&(n+="
element with ID=sotd."),l()}}}),define("w3c/abstract",["core/pubsubhub"],function(e){return{run:function(t,n,r){var i=$("#abstract");if(i.length){if(0===i.find("p").length&&i.contents().wrapAll($("")),i.prepend("
"+t.l10n.abstract+"
"),i.addClass("introductory"),t.doRDFa){var a="dc:abstract",s=i.attr("property");s&&(a=s+" "+a),i.attr({property:a})}}else e.pub("error","Document must have one element with ID 'abstract'");r()}}}),define("tmpl!w3c/templates/conformance.html",["deps/handlebars"],function(e){return e.compile("Conformance
\nIssue Summary
Best Practices Summary
Table of Figures
")),o.append($(""));for(var l=o.find("ul");a.length;)l.append(a.shift())}r()}}}),define("core/biblio",["core/pubsubhub","core/utils"],function(e,t){var n=new URL("https://specref.herokuapp.com/bibrefs?refs="),r=function(e){var t=e.informativeReferences,n=e.normativeReferences,r=[],i=function(e){var t=[];for(var n in e)t.push(n);return t};for(var a in t)n[a]&&r.push(a);for(var s=0;s
References
").appendTo(f);t.doRDFa&&h.attr("resource","");for(var m=0;m
"),o}}var Z={ws:!0,"ws-pea":!0,"ws-tpea":!0,"line-comment":!0,"multiline-comment":!0},J=["any","attribute","boolean","byte","ByteString","callback","const","creator","Date","deleter","dictionary","DOMString","double","enum","false","float","getter","implements","Infinity","inherit","interface","iterable","legacycaller","legacyiterable","long","maplike","NaN","null","object","octet","optional","or","partial","readonly","RegExp","required","sequence","serializer","setlike","setter","short","static","stringifier","true","typedef","unrestricted","unsigned","USVString","void"],ee=["attribute","callback","const","creator","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","legacyiterable","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","unrestricted"],te=["required"],ne={},re={};return{run:function(t,n,i){var a=function(){e.pub("end","core/webidl-contiguous"),i()},s=$("pre.idl",n);return s.length?(E(),$(".idl",n).not("pre").length||$(n).find("head link").first().before($("").text(r)),s.each(function(){var n;try{n=window.WebIDL2.parse($(this).text(),{ws:!0})}catch(t){return void e.pub("error","Failed to parse
"+s.text()+"
as IDL: "+(t.stack||t))}Y(n,t.definitionMap,"");var r=O(t,n);r.attr({id:this.id}),r.find(".idlAttribute,.idlCallback,.idlConst,.idlDictionary,.idlEnum,.idlException,.idlField,.idlInterface,.idlMember,.idlMethod,.idlSerializer,.idlMaplike,.idlIterable,.idlTypedef").each(function(){var e=$(this),n=e.attr("data-title").toLowerCase(),r=e.parent().closest(".idlDictionary,.idlEnum,.idlException,.idlInterface");r.length&&e.attr("data-dfn-for",r.attr("data-title").toLowerCase()),t.definitionMap[n]||(t.definitionMap[n]=[]),t.definitionMap[n].push(e)}),$(this).replaceWith(r)}),n.normalize(),void a()):a()}}}),define("tmpl!core/templates/webidl/module.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true }}{{idn indent}}module {{obj.id}} {\n{{#each obj.children}}{{asWebIDL proc this indent}}{{/each}}\n{{idn indent}}};\n")}),define("tmpl!core/templates/webidl/typedef.html",["deps/handlebars"],function(e){return e.compile("typedef {{extAttr obj 0 false\n}}{{datatype obj.datatype\n}}{{arr}}{{nullable}} {{obj.id}};\n")}),define("tmpl!core/templates/webidl/implements.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true}}{{idn indent}}{{obj.id}} implements {{obj.datatype}};\n")}),define("tmpl!core/templates/webidl/dict-member.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}{{declaration}} {{datatype obj.datatype}}{{arr}}{{nullable}} {{pads pad\n}}{{obj.id}}{{#if obj.defaultValue\n}} = {{obj.defaultValue}}{{/if}};\n")}),define("tmpl!core/templates/webidl/dictionary.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}{{partial}}dictionary {{obj.id}}{{superclasses obj}} {\n{{{children}}}};\n")}),define("tmpl!core/templates/webidl/enum-item.html",["deps/handlebars"],function(e){return e.compile('{{idn indent}}"{{obj.id}}"')}),define("tmpl!core/templates/webidl/enum.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}enum {{obj.id}} {\n{{{children}}}{{idn indent}}\n};")}),define("tmpl!core/templates/webidl/const.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}const {{obj.datatype}}{{nullable}} {{pads pad\n}}{{obj.id\n}} = {{obj.value}};\n")}),define("tmpl!core/templates/webidl/param.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj 0 false\n}}{{optional}}{{datatype obj.datatype}}{{arr}}{{nullable}}{{variadic\n}} {{obj.id}}{{#if obj.defaultValue\n}} = {{obj.defaultValue}}{{/if}}")}),define("tmpl!core/templates/webidl/callback.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}callback {{obj.id\n}} = {{datatype obj.datatype}}{{arr}}{{nullable}} ({{{children}}});\n")}),define("tmpl!core/templates/webidl/method.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}{{static}}{{datatype obj.datatype}}{{arr}}{{nullable}} {{pads pad\n}}{{obj.id}} ({{{children}}});\n")}),define("tmpl!core/templates/webidl/constructor.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}} {{keyword}}{{name}}{{param obj children}}")}),define("tmpl!core/templates/webidl/attribute.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}{{declaration}} attribute {{datatype obj.datatype}}{{arr}}{{nullable}} {{pads\npad}}{{obj.id}};\n")}),define("tmpl!core/templates/webidl/serializer.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}serializer{{#if values}} = {{values}}{{/if}};\n")}),define("tmpl!core/templates/webidl/iterable.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}iterable<{{datatype obj.key}}{{#if obj.value}},{{datatype obj.value}}{{/if}}>;\n")}),define("tmpl!core/templates/webidl/maplike.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}{{readonly}}maplike<{{datatype obj.key}}, {{datatype obj.value}}>;\n")}),define("tmpl!core/templates/webidl/comment.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}// {{comment}}\n")}),define("tmpl!core/templates/webidl/field.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}{{datatype obj.datatype}}{{arr}}{{nullable}} {{pads\npad}}{{obj.id}};\n")}),define("tmpl!core/templates/webidl/exception.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true\n}}{{idn indent}}exception {{obj.id}}{{superclasses obj}} {\n{{{children}}}{{idn indent}}};\n")}),define("tmpl!core/templates/webidl/interface.html",["deps/handlebars"],function(e){return e.compile("{{extAttr obj indent true ctor\n}}{{idn indent}}{{partial}}{{callback}}interface {{obj.id}}{{superclasses obj}} {\n{{{children}}}{{idn indent}}};")});var sn;define("core/webidl-oldschool",["core/pubsubhub","deps/handlebars","tmpl!core/css/webidl-oldschool.css","tmpl!core/templates/webidl/module.html","tmpl!core/templates/webidl/typedef.html","tmpl!core/templates/webidl/implements.html","tmpl!core/templates/webidl/dict-member.html","tmpl!core/templates/webidl/dictionary.html","tmpl!core/templates/webidl/enum-item.html","tmpl!core/templates/webidl/enum.html","tmpl!core/templates/webidl/const.html","tmpl!core/templates/webidl/param.html","tmpl!core/templates/webidl/callback.html","tmpl!core/templates/webidl/method.html","tmpl!core/templates/webidl/constructor.html","tmpl!core/templates/webidl/attribute.html","tmpl!core/templates/webidl/serializer.html","tmpl!core/templates/webidl/iterable.html","tmpl!core/templates/webidl/maplike.html","tmpl!core/templates/webidl/comment.html","tmpl!core/templates/webidl/field.html","tmpl!core/templates/webidl/exception.html","tmpl!core/templates/webidl/interface.html"],function(e,t,n,r,i,a,s,o,l,c,u,p,d,f,h,m,g,b,v,y,w,x,_){var k=function(e){this.parent={type:"module",id:"outermost",children:[]},e||(e={});for(var n in e)e.hasOwnProperty(n)&&(this[n]=e[n]);t.registerHelper("extAttr",function(e,n,r,i){var a="";return e.extendedAttributes?a+=E(n)+"["+e.extendedAttributes+""+("string"==typeof i&&i.length?",\n"+i:"")+"]"+(r?"\n":" "):"string"==typeof i&&i.length&&(a+=E(n)+"["+i+"]"+(r?"\n":" ")),new t.SafeString(a)}),t.registerHelper("param",function(e,n){var r="";return n&&(r+=" ("+n+")"),new t.SafeString(r)}),t.registerHelper("idn",function(e){return new t.SafeString(E(e))}),t.registerHelper("asWebIDL",function(e,n,r){return new t.SafeString(e.writeAsWebIDL(n,r))}),t.registerHelper("datatype",function(e){return new t.SafeString(C(e))}),t.registerHelper("pads",function(e){return new t.SafeString(N(e))}),t.registerHelper("superclasses",function(e){if(!e.superclasses||!e.superclasses.length)return"";var n=" : "+e.superclasses.map(function(e){return""+e+""}).join(", ");return new t.SafeString(n)})},E=function(e){for(var t="",n=0;n"+t+"
")}}),r()}}}),window.simpleNode=function(e){this.doc=e?e:document},window.simpleNode.prototype={element:function(e,t,n,r){var i=$(this.doc.createElement(e));if(i.attr(t||{}),n&&$(n).append(i),r)if(r instanceof jQuery)i.append(r);else if(r instanceof Array)for(var a=0;a"),!0}return!1});if(!r){if(!t.parents(".idl, dl.methods, dl.attributes, dl.constants, dl.constructors, dl.fields, dl.dictionary-members, span.idlMemberType, span.idlTypedefType, div.idlImplementsDesc").length){var i=n[0].for_,s=n[0].title;e.pub("warn","Found linkless element "+(i?"for '"+i+"' ":"")+"with text '"+s+"' but no matching .")}t.replaceWith(t.contents())}}});var s=n.querySelectorAll("*[for]");Array.prototype.forEach.call(s,i("for"));var o=n.querySelectorAll("*[dfn-for]");Array.prototype.forEach.call(o,i("dfn-for"));var l=n.querySelectorAll("*[link-for]");Array.prototype.forEach.call(l,i("link-for")),e.pub("end","core/link-to-dfn"),r()}}}),define("deps/text!core/css/github.css",[],function(){return"/*\n\ngithub.com style (c) Vasily Polovnyov
"),d=0;d
"+n.l10n.toc+"
",o.appendChild(s[0]);var l=$("#toc",r),c=!1;l.length&&(c=!0),l.length||(l=$("#sotd",r)),l.length||(l=$("#abstract",r)),c?l.replaceWith(o):l.after(o);var u=$(" ");$("body").append(u)}$("a[href^='#']:not(.tocxref)",r).each(function(){var e=$(this);if(""===e.html()){var n=e.attr("href").slice(1);t[n]&&(e.addClass("sec-ref"),e.html((e.hasClass("sectionRef")?"section ":"")+t[n]))}}),i()}}}),define("w3c/informative",[],function(){return{run:function(e,t,n){$("section.informative").find("> h2:first, > h3:first, > h4:first, > h5:first, > h6:first").after("");Object.keys(t.definitionMap).sort().forEach(function(r){t.definitionMap[r].forEach(function(t){var i=$(""+r+"").attr("href","#"+t.attr("id")).click(function(){e.closeModal()});$("").append(i).appendTo(n)})}),e.freshModal("List of Definitions",n)}}}),define("ui/save-html",["deps/beautify-html","core/beautify-options","core/pubsubhub","core/utils"],function(e,t,n,r){function i(e){return e.replace(/\n\s*\(-1,i=this,o=$(""),l={background:"#eee",border:"1px solid #000",borderRadius:"5px",padding:"5px",margin:"5px",display:"block",width:"100%",color:"#000",textDecoration:"none",textAlign:"center",fontSize:"inherit"},c=function(t){r?$("").appendTo(o).text(t.title).css(l).attr({id:t.id,href:t.url,download:t.fileName,type:t.type||""}).click(function(){e.closeModal()}):$("").appendTo(o).text(t.title).css(l).click(function(){t.popupContent(),e.closeModal()})};c({id:"respec-save-as-html",title:"Save as HTML",url:this.htmlToDataURL(this.toString()),popupContent:function(){i.toHTMLSource()},fileName:"index.html"}),c({id:"respec-save-as-xhtml5",fileName:"index.xhtml",popupContent:function(){i.toXHTMLSource(5)},title:"Save as XHTML5",url:this.htmlToDataURL(this.toXML(5))}),c({id:"respec-save-as-xhtml",fileName:"index.xhtml",popupContent:function(){i.toXHTMLSource(1)},title:"Save as XHTML 1.0",url:this.htmlToDataURL(this.toXML(1))}),c({id:"respec-save-as-epub",fileName:"spec.epub",popupContent:function(){window.open(i.makeEPubHref(),"_blank")},title:"Save as EPUB 3",type:"application/epub+zip",url:this.makeEPubHref()}),s.diffTool&&(s.previousDiffURI||s.previousURI)&&$("").appendTo(o).css(l).click(function(){i.toDiffHTML(),e.closeModal()}),e.freshModal("Save Snapshot",o)},htmlToDataURL:function(e){return e=encodeURIComponent(e),"data:text/html;charset=utf-8,"+e},makeEPubHref:function(){var e="https://labs.w3.org/epub-generator/cgi-bin/epub-generator.py",t=e+"?type=respec&";return t+="url="+encodeURIComponent(a.location.href)},toString:function(){n.pub("save","toString");var s="\n\n";var d=a.documentElement.cloneNode(!0);o(d),s+=d.innerHTML,s+="";var f=i(s),h=e.html_beautify(f,t);return h},toXML:function(l){n.pub("save","toXML"+l);var c=a.documentElement.cloneNode(!0);o(c),5!==l&&($.each("section figcaption figure aside".split(" "),function(e,t){$(t,c).renameElement("div").addClass(t)}),$("time",c).renameElement("span").addClass("time").removeAttr("datetime"),$("[role]",c).removeAttr("role"),$("[aria-level]",c).removeAttr("aria-level"),$("style:not([type])",c).attr("type","text/css"),$("script:not([type])",c).attr("type","text/javascript"));var u="\n\n";var g={};"br img input area base basefont col isindex link meta param hr".split(" ").forEach(function(e){g[e]=!0});var b=[!1],v=function(e){var t="";if(9===e.nodeType||1===e.nodeType&&"html"==e.nodeName.toLowerCase())for(var i=0;i
"+r.xmlEscape(this.toString())+"
"),e.document.close()},toXHTMLSource:function(e){var t=window.open();t.document.write(""+r.xmlEscape(this.toXML(e))+"
"),t.document.close()}}}),define("ui/search-specref",["core/biblio"],function(e){function t(e,t,n){return e+" "+(1==e?t:n)}function n(t){var n="",r=0;for(var i in t){var a=t[i];a.aliasOf||(r++,n+="
Sorry. :'("}function i(e,t){var n=new RegExp("(<[^>]+>)|("+t+")","gi");return(e||"").replace(n,function(e,t,n){return t?t:""+n+""})}return{show:function(e){var t=$("
+ This document is licensed under a + Creative Commons Attribution 4.0 International Public License + (CC-BY). +
+This document describes a formal representation to align the +RDF Mapping Language [RML] with Target [DataIO] +to describe in RML mapping rules how a generated Knowledge Graph +should be directed and exported. +The current document describes how Target is integrated +with RML through definitions and examples.
The version of this document is v1.0.0.
+ This document is a draft of a potential specification. It has no official + standing of any kind and does not represent the support or consensus of + any standards organization. +
+This is an early draft, +yet efforts are made to keep things stable.
+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.
+ The key word MAY in this document + is to be interpreted as described in + BCP 14 + [RFC2119] [RFC8174] + when, and only when, they appear in all capitals, as shown here. +
This section is non-normative.
This document describes the alignment of Target specification with RML +to define how a generated RDF knowledge graph must be exported +in the RML mapping rules. +Target and RML are self-standing specifications +which are aligned through this specification.
In this document, examples assume +the following namespace prefix bindings unless otherwise stated:
Prefix | +Namespace | +
---|---|
rml |
+http://semweb.mmlab.be/ns/rml# | +
rmlt |
+http://semweb.mmlab.be/ns/rml-target# | +
rr |
+http://www.w3.org/ns/r2rml# | +
formats |
+https://www.w3.org/ns/formats/ | +
comp |
+http://semweb.mmlab.be/ns/rml-compression# | +
csvw |
+http://www.w3.org/ns/csvw# | +
foaf |
+http://xmlns.com/foaf/0.1/ | +
fnml |
+http://semweb.mmlab.be/ns/fnml# | +
idlab-fn |
+http://example.com/idlab/function/ | +
void |
+http://rdfs.org/ns/void# | +
ex |
+http://example.org/ns# | +
schema |
+http://schema.org/ | +
Examples are divided in several boxes, each box has its own color. +Blue boxes contain the input RDF data of the example:
# This box contains the example's input RDF data.
The Target description is contained in a pink box:
# This box contains the example's Target description.
The data access description is contained in a grey box:
# This box contains the data access description of the example.
The RML mapping is contained in a yellow box:
# This box contains the example's RML mapping.
The generated output RDF is contained in a green box:
# This box contains the example's generated output RDF.
RML does not specify where generated triples are exported to,
+each RML processor has its own way to describe this information
+through configuration files or command line parameters.
+To incorporate this information in the RML mapping rules,
+RML is aligned with the
+Target vocabulary
+which describes how the generated triples are exported.
+RML is aligned with the Target vocabulary
+by extending rr:TermMap
with the rml:logicalTarget
property
+to describe on Term Map [RML] level where each triple must be directed to.
+A Term Map is a function that generates an RDF term
+from a logical reference [RML].
+The result of that function is known as the term map's generated
+RDF term [RDF-Concepts]
+such as subjects, predicates, objects, named graphs and language tags.
A Term Map MAY also contain zero or more rml:logicalTarget
properties
+to export all triples containing the generated term to different targets.
+The same Term Map can have multiple targets by specifying
+multiple rml:logicalTarget
properties in the Term Map.
Multiple Targets MAY be combined by specifying multiple Targets +in the same Term Map or multiple Term Maps of the same RDF triple +(Section § 5. Combining multiple Targets). +Targets MAY be overriden by using a separate Triples Map +or conditions [FnO] (Section § 6. Overriding Targets).
If the mapping document contains no Targets, +the processor falls back to the default target, +as it is specified through the processor's +specific configuration file or command line parameters. +If a mapping document contains at least one Target, +the processor will export the triples to these Targets, +triples which do not have one or more Target(s) assigned, +are exported to the default target of the processor.
Property | +Domain | +Range | +
---|---|---|
rml:logicalTarget |
+rr:TermMap |
+rmlt:LogicalTarget |
+
In the example below, a CSV file is transformed into a knowledge graph. +The CSV file is accessed using the [CSVW] vocabulary, +transformed into a knowledge graph using [RML] mappings, +and exported to two Targets, which are accessed through the [VoID] vocabulary. +The knowledge graph is exported as N-Quads to the first Target, +and as Turtle to the second Target. +The Turtle file of the second Target is also compressed using the Zip +compression algorithm.
id;name;nickname
+0;Nathan Ford;Mastermind
+1;Sophie Devereaux;Grifter
+2;Eliot Spender;Hitter
+3;Parker;Thief
+4;Alec Hardison;Hacker
<#CSVSourceAccess> a csvw:Table;
+ csvw:url "https://rml.io/specs/rml-target/Leverage.csv";
+ csvw:dialect [ a csvw:Dialect;
+ csvw:delimiter ";";
+ csvw:encoding "UTF-8";
+ csvw:header "1"^^xsd:boolean;
+ ];
+.
@base <http://example.com/ns#> .
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#CSVSourceAccess>;
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.com/{id}";
+ rml:logicalTarget <#TargetDump1>;
+ rr:class foaf:Person;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:Turtle;
+ rmlt:compression comp:Zip;
+.
<#VoIDDump1> a void:Dataset;
+ void:dataDump <file:///data/dump1.nt>;
+.
+
+<#VoIDDump2> a void:Dataset;
+ void:dataDump <file:///data/dump2.ttl.zip>;
+.
# file:///data/dump1.nq
+<http://example.org/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> _b0 .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Nathan Ford" _b0 .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Mastermind" _b0 .
+<http://example.org/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Sophie Devereaux" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Grifter" _b0 .
+<http://example.org/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Eliot Spencer" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Hitter" _b0 .
+<http://example.org/3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Parker" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Thief" _b0 .
+<http://example.org/4> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> _b0 .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Alec Hardison" _b0 .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/nickname> "Hacker" _b0 .
+
+# file:///data/dump2.ttl.zip
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+<http://example.org/0>
+ foaf:name "Nathan Ford";
+.
+<http://example.org/1>
+ foaf:name "Sophie Devereaux";
+.
+<http://example.org/2>
+ foaf:name "Eliot Spencer";
+.
+<http://example.org/3>
+ foaf:name "Parker";
+.
+<http://example.org/4>
+ foaf:name "Alec Hardison";
+.
In the following examples, the RDF triples are exported to a single Target. +In some examples, not all RDF triples have a dedicated Target assigned, +therefore, they will be exported to the default Target of the processor.
All triples containing the generated subject are exported +to the specified targets in the Subject Map [RML].
The following example exports all triples containing
+the generated subject http://example.org/{id}
+to an RDF dump with N-Quads as serialization format and GZip compression:
[
+ {
+ "id": 0,
+ "name": "Monica Geller",
+ "age": 33
+ },
+ {
+ "id": 1,
+ "name": "Rachel Green",
+ "age": 34
+ },
+ {
+ "id": 2,
+ "name": "Joey Tribbiani",
+ "age": 35
+ },
+ {
+ "id": 3,
+ "name": "Chandler Bing",
+ "age": 36
+ },
+ {
+ "id": 4,
+ "name": "Ross Geller",
+ "age": 37
+ }
+]
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Friends.json";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{id}";
+ rml:logicalTarget <#TargetDump1;>
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:age;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "age";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Quads;
+ rmlt:compression comp:GZip;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nq.gz>;
+.
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" _b0 .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" _b0 .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" _b0 .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" _b0 .
All triples containing the generated predicate are exported +to the specified targets in the Predicate Map [RML].
The following example exports all triples containing
+the generated predicate foaf:name
to an RDF dump
+with Turtle as serialization format and Zip compression:
[
+ {
+ "id": 0,
+ "name": "Monica Geller",
+ "age": 33
+ },
+ {
+ "id": 1,
+ "name": "Rachel Green",
+ "age": 34
+ },
+ {
+ "id": 2,
+ "name": "Joey Tribbiani",
+ "age": 35
+ },
+ {
+ "id": 3,
+ "name": "Chandler Bing",
+ "age": 36
+ },
+ {
+ "id": 4,
+ "name": "Ross Geller",
+ "age": 37
+ }
+]
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Friends.json";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget <#TargetDump1;>
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:age;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "age";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:Turtle;
+ rmlt:compression comp:Zip;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nq.gz>;
+.
# file:///data/dump1.nq.gz
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/ns#> .
+
+<http://example.org/0>
+ foaf:name "Monica Geller";
+.
+<http://example.org/1>
+ foaf:name "Rachel Green";
+.
+<http://example.org/2>
+ foaf:name "Joey Tribbiani";
+.
+<http://example.org/3>
+ foaf:name "Chandler Bing";
+.
+<http://example.org/4>
+ foaf:name "Ross Geller";
+.
+
+# default target of the processor
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" _b0 .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" _b0 .
All triples containing the generated object are exported +to the specified targets in the Object Map [RML].
The following example exports all triples containing
+the generated object from the reference name
to an RDF dump
+with N-Triples as serialization format:
[
+ {
+ "id": 0,
+ "name": "Monica Geller",
+ "age": 33
+ },
+ {
+ "id": 1,
+ "name": "Rachel Green",
+ "age": 34
+ },
+ {
+ "id": 2,
+ "name": "Joey Tribbiani",
+ "age": 35
+ },
+ {
+ "id": 3,
+ "name": "Chandler Bing",
+ "age": 36
+ },
+ {
+ "id": 4,
+ "name": "Ross Geller",
+ "age": 37
+ }
+]
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Friends.json";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ rml:logicalTarget <#TargetDump1;>
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:age;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "age";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+# default target of the processor
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
All triples within a named graph are exported to the specified targets +in the Graph Map [RML]. +The named graph influences to where the named graph's triples +may be exported to as the Target's serialization format must +support named graphs such as N-Quads, JSON-LD or TriG. +When a Target contains a serialization format +which does not support named graphs and a Graph Map is used, +the mapping is considered invalid. +If a named graph is spread over multiple targets, +all targets must be combined to access the complete named graph. +In case RDF triples are not within a specific named graph, +they are added to the default graph as specified +by the [R2RML] specification.
The following example exports all triples in the named graph ex:Friends
+to an RDF dump with N-Quads as serialization format:
[
+ {
+ "id": 0,
+ "name": "Monica Geller",
+ "age": 33
+ },
+ {
+ "id": 1,
+ "name": "Rachel Green",
+ "age": 34
+ },
+ {
+ "id": 2,
+ "name": "Joey Tribbiani",
+ "age": 35
+ },
+ {
+ "id": 3,
+ "name": "Chandler Bing",
+ "age": 36
+ },
+ {
+ "id": 4,
+ "name": "Ross Geller",
+ "age": 37
+ }
+]
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Friends.json";
+ ];
+.
<#Target> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{id}";
+ rr:graphMap [
+ rml:logicalTarget <#TargetDump1>;
+ rr:constant ex:Friends;
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:age;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "age";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nq>;
+.
# file:///data/dump1.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/Friends> .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/Friends> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/Friends> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/Friends> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/Friends> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/Friends> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/Friends> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/Friends> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/Friends> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/Friends> .
All triples with a language tag are exported to the specified targets +in the Language Map [RML].
The following examples export all triples with a language tag +to a RDF dump with N-Triples as serialization format:
[
+ {
+ "id": 0,
+ "name": "Monica Geller",
+ "age": 33
+ },
+ {
+ "id": 1,
+ "name": "Rachel Green",
+ "age": 34
+ },
+ {
+ "id": 2,
+ "name": "Joey Tribbiani",
+ "age": 35
+ },
+ {
+ "id": 3,
+ "name": "Chandler Bing",
+ "age": 36
+ },
+ {
+ "id": 4,
+ "name": "Ross Geller",
+ "age": 37
+ }
+]
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Friends.json";
+ ];
+.
<#Target> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:compression comp:GZip;
+.
+
+<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ rml:languageMap [
+ rml:logicalTarget <#TargetDump1;>
+ rr:constant "en";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:age;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "age";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+# default target of the processor
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" _b0 .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" _b0 .
Multiple Targets MAY be specified for the same triple +in the same or multiple Term Maps. +If multiple Targets are defined in the same Term Map, +all triples containing the generated Term are exported +to all the specified Targets. +In case multiple Term Maps of the same RDF triple contain more than one Target, +the generated triples are exported to all the specified Targets. +If multiple Term Maps of an RDF triple refer multiple times to the same Target, +the RDF triple is written only once to the target to avoid duplicates.
All triples are exported to all Targets, if the Term Map contains multiple
+Targets. In the example a Subject Map has three specified Targets,
+all triples with the subject http://example.org/{@id}
are exported
+to the three specified Targets:
/data/dump.nt.zip
, N-Triples serialization, Zip compression/data/dump.jsonld.tar.xz
, JSON-LD serialization, TarXz compression/data/dump.rdf.tar.gzip
, RDF/XML serialization, TarGZip compression<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ rml:logicalTarget <#TargetDump1>;
+ rml:logicalTarget <#TargetDump2>;
+ rml:logicalTarget <#TargetDump3>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+ rmlt:compression comp:Zip;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:JSON-LD;
+ rmlt:compression comp:TarXz;
+.
+<#TargetDump3> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:RDF_XML;
+ rmlt:compression comp:TarGZip;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt.zip>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.jsonld.tar.xz>;
+.
+<#VoIDDump3> a void:Dataset ;
+ void:dataDump <file:///data/dump3.rdf.tar.gz>;
+.
# file:///data/dump1.nt.zip
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+
+# file:///data/dump2.jsonld.tar.xz
+[
+ {
+ "@id": "http://example.org/0",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Kara Danvers"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/1",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Alex Danvers"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/2",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "J'onn J'onzz"
+ }
+ ]
+ },
+ {
+ "@id": "http://example.org/3",
+ "http://xmlns.com/foaf/0.1/name": [
+ {
+ "@value": "Nia Nal"
+ }
+ ]
+ }
+]
+
+# file:///data/dump3.rdf.tar.gz
+<?xml version="1.0" encoding="utf-8" ?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/">
+ <rdf:Description rdf:about="http://example.org/0">
+ <foaf:name>Kara Danvers</foaf:name>
+ </rdf:Description>
+ <rdf:Description rdf:about="http://example.org/1">
+ <foaf:name>Alex Danvers</foaf:name>
+ </rdf:Description>
+ <rdf:Description rdf:about="http://example.org/2">
+ <foaf:name>J'onn J'onzz</foaf:name>
+ </rdf:Description>
+ <rdf:Description rdf:about="http://example.org/3">
+ <foaf:name>Nia Nal</foaf:name>
+ </rdf:Description>
+</rdf:RDF>
All triples containing the subject http://example.org/{id}
+are exported to TargetDump1
+and all triples containing the predicate foaf:name
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
All triples containing the subject http://example.org/{id}
+are exported to TargetDump1
+and all triples containing the object reference name/text()
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
All triples containing the predicate foaf:name
+are exported to TargetDump1
+and all triples containing the object reference nickname/text()
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
All triples containing the subject http://example.org/{@id}
+are exported to TargetDump1
+and all triples containing the object reference nickname/text()
or
+predicate foaf:nickname
are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
All triples containing the subject http://example.org/{@id}
+are exported to TargetDump1
+and all triples within the named graph ex:Characters
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:graphMap [ a rr:GraphMap;
+ rml:logicalTarget <#TargetDump2>;
+ rr:constant ex:Characters;
+ ];
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nq>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nq>;
+.
# file:///data/dump1.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" <http://example.org/Characters> .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" <http://example.org/Characters> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" <http://example.org/Characters> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" <http://example.org/Characters> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" _b0 .
+
+# file:///data/dump2.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" <http://example.org/Characters> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" <http://example.org/Characters> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" <http://example.org/Characters> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" <http://example.org/Characters> .
All triples containing the predicate foaf:nickname
+are exported to TargetDump1
+and all triples within the named graph ex:Characters
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:graphMap [ a rr:GraphMap;
+ rml:logicalTarget <#TargetDump2>;
+ rr:constant ex:Characters;
+ ];
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nq>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nq>;
+.
# file:///data/dump1.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" _b0 .
+
+# file:///data/dump2.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" <http://example.org/Characters> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" <http://example.org/Characters> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" <http://example.org/Characters> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" <http://example.org/Characters> .
All triples containing the language tag en
+are exported to TargetDump1
+and all triples within the named graph ex:Characters
+are exported to TargetDump2
.
+The other triples are exported to the default target of the processor
+as there is no dedicated Target assigned to triples containing
+foaf:nickname
as predicate.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:graphMap [ a rr:GraphMap;
+ rml:logicalTarget <#TargetDump2>;
+ rr:constant ex:Characters;
+ ];
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ rml:languageMap [
+ rml:logicalTarget <#TargetDump1>;
+ rr:constant "en";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers"@en <http://example.org/Characters> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers"@en <http://example.org/Characters> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz"@en <http://example.org/Characters> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal"@en <http://example.org/Characters> .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers"@en <http://example.org/Characters> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers"@en <http://example.org/Characters> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz"@en <http://example.org/Characters> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal"@en <http://example.org/Characters> .
+
+# default target of processor
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" _b0 .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" _b0 .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" _b0 .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" _b0 .
All triples containing the language tag en
+are exported to TargetDump1
+and all triples containing the object reference nickname/text()
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ rml:languageMap [
+ rml:logicalTarget <#TargetDump1>;
+ rr:constant "en";
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal"@en .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" .
All triples containing the predicate foaf:name
+are exported to TargetDump1
+and all triples containing the predicate foaf:nickname
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" .
All triples containing the object reference name/text()
+are exported to TargetDump1
+and all triples containing the object reference nickname/text()
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" .
+
+# file:///data/dump2.nt
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" .
All triples within the named graph ex:Characters
+are exported to TargetDump1
+and all triples within the named graph ex:NickNames
+are exported to TargetDump2
.
<Supergirl>
+ <Character id="0">
+ <name>Kara Danvers</name>
+ <nickname>Supergirl</nickname>
+ </Character>
+ <Character id="1">
+ <name>Alex Danvers</name>
+ <nickname>Sentinel</nickname>
+ </Character>
+ <Character id="2">
+ <name>J'onn J'onzz</name>
+ <nickname>Martian Manhunter</nickname>
+ </Character>
+ <Character id="3">
+ <name>Nia Nal</name>
+ <nickname>Dreamer</nickname>
+ </Character>
+</Supergirl>
<#DCATSourceAccess> a dcat:Dataset;
+ dcat:distribution [ a dcat:Distribution;
+ dcat:downloadURL "https://rml.io/specs/rml-target/Supergirl.xml";
+ ];
+.
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#DCATSourceAccess>;
+ rml:referenceFormulation ql:JSONPath;
+ rml:iterator "$.[*]";
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rr:template "http://example.org/{@id}";
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:graphMap [ a rr:GraphMap;
+ rml:logicalTarget <#TargetDump1>;
+ rr:constant ex:Characters;
+ ];
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name/text()";
+ ];
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:graphMap [ a rr:GraphMap;
+ rml:logicalTarget <#TargetDump2>;
+ rr:constant ex:NickNames;
+ ];
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:nickname;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "nickname/text()";
+ ];
+ ];
+.
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nq>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nq>;
+.
# file:///data/dump1.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Kara Danvers" <http://example.org/Characters> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Alex Danvers" <http://example.org/Characters> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "J'onn J'onzz" <http://example.org/Characters> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Nia Nal" <http://example.org/Characters> .
+
+# file:///data/dump2.nq
+<http://example.org/0> <http://xmlns.com/foaf/0.1/nickname> "Supergirl" <http://example.org/Nicknames> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/nickname> "Sentinel" <http://example.org/Nicknames> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/nickname> "Martian Manhunter" <http://example.org/Nicknames> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/nickname> "Dreamer" <http://example.org/Nicknames> .
In some cases exporting all triples to a target is not desired, +therefore Targets can be overridden when needed +by either using a separate Triples Map which isolates certain triples or +by using FnO functions [FnO] as conditions.
Triples can be exported to a specific Target while not to other Targets +by isolating these triples in a separate Triples Map.
In this example, the same subject and object are used in both Triples Maps,
+but with a diffent predicate. The triples with the first predicate foaf:name
+are exported to the first Target and the triples with the second predicate
+schema:name
to the second Target.
# Results of DBPedia SPARQL query
+actor,name,nickname
+http://dbpedia.org/resource/Kevin_Sussman,Kevin Sussman
+http://dbpedia.org/resource/Jim_Parsons,Jim Parsons
+http://dbpedia.org/resource/Kaley_Cuoco,Kaley Cuoco
+http://dbpedia.org/resource/Sara_Gilbert,Sara Gilbert
+http://dbpedia.org/resource/Kunal_Nayyar,Kunal Nayyar
+http://dbpedia.org/resource/Laura_Spencer_(actress),Laura Spencer
+http://dbpedia.org/resource/Simon_Helberg,Simon Helberg
+http://dbpedia.org/resource/Johnny_Galecki,Johnny Galecki
+http://dbpedia.org/resource/Mayim_Bialik,Mayim Bialik
+http://dbpedia.org/resource/Melissa_Rauch,Melissa Rauch
<#SDSourceAccess> a sd:Service;
+ sd:endpoint ;
+ sd:supportedLanguage sd:SPARQL11Query;
+ sd:resultFormat formats:SPARQL_Results_CSV;
+.
+
<#TriplesMap1> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#SDSourceAccess>;
+ rml:query """
+ PREFIX dbo:
+ PREFIX rdf:
+ PREFIX rdfs:
+ SELECT DISTINCT ?actor ?name WHERE {
+ ?tvshow rdf:type dbo:TelevisionShow .
+ ?tvshow rdfs:label "The Big Bang Theory"@en .
+ ?tvshow dbo:starring ?actor .
+ ?actor foaf:name ?name .
+ }
+ """;
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rml:reference "actor";
+ rr:termType rr:IRI;
+ rmlt:logicalTarget <TargetDump1>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+
+<#TriplesMap2> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#SDSourceAccess>;
+ rml:query """
+ PREFIX dbo:
+ PREFIX rdf:
+ PREFIX rdfs:
+ SELECT DISTINCT ?actor ?name WHERE {
+ ?tvshow rdf:type dbo:TelevisionShow .
+ ?tvshow rdfs:label "The Big Bang Theory"@en .
+ ?tvshow dbo:starring ?actor .
+ ?actor foaf:name ?name .
+ }
+ """;
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rml:reference "actor";
+ rr:termType rr:IRI;
+ rmlt:logicalTarget <TargetDump2>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant schema:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+.
+
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nq>;
+.
# file:///data/dump1.nt
+<http://dbpedia.org/resource/Kevin_Sussman> <http://xmlns.com/foaf/0.1/name> "Kevin Sussman" .
+<http://dbpedia.org/resource/Jim_Parsons> <http://xmlns.com/foaf/0.1/name> "Jim Parsons" .
+<http://dbpedia.org/resource/Kaley_Cuoco> <http://xmlns.com/foaf/0.1/name> "Kaley Cuoco" .
+<http://dbpedia.org/resource/Sara_Gilbert> <http://xmlns.com/foaf/0.1/name> "Sara Gilbert" .
+<http://dbpedia.org/resource/Kunal_Nayyar> <http://xmlns.com/foaf/0.1/name> "Kunal Nayyar" .
+<http://dbpedia.org/resource/Laura_Spencer> <http://xmlns.com/foaf/0.1/name> "Laura Spencer" .
+<http://dbpedia.org/resource/Simon_Helberg> <http://xmlns.com/foaf/0.1/name> "Simon Helberg" .
+<http://dbpedia.org/resource/Johnny_Galecki> <http://xmlns.com/foaf/0.1/name> "Johnny Galecki" .
+<http://dbpedia.org/resource/Mayim_Bialik> <http://xmlns.com/foaf/0.1/name> "Mayim Bialik" .
+<http://dbpedia.org/resource/Melissa_Rauch> <http://xmlns.com/foaf/0.1/name> "Melissa Rauch" .
+
+# file:///data/dump2.nt
+<http://dbpedia.org/resource/Kevin_Sussman> <http://schema.org/name> "Kevin Sussman" .
+<http://dbpedia.org/resource/Jim_Parsons> <http://schema.org/name> "Jim Parsons" .
+<http://dbpedia.org/resource/Kaley_Cuoco> <http://schema.org/name> "Kaley Cuoco" .
+<http://dbpedia.org/resource/Sara_Gilbert> <http://schema.org/name> "Sara Gilbert" .
+<http://dbpedia.org/resource/Kunal_Nayyar> <http://schema.org/name> "Kunal Nayyar" .
+<http://dbpedia.org/resource/Laura_Spencer> <http://schema.org/name> "Laura Spencer" .
+<http://dbpedia.org/resource/Simon_Helberg> <http://schema.org/name> "Simon Helberg" .
+<http://dbpedia.org/resource/Johnny_Galecki> <http://schema.org/name> "Johnny Galecki" .
+<http://dbpedia.org/resource/Mayim_Bialik> <http://schema.org/name> "Mayim Bialik" .
+<http://dbpedia.org/resource/Melissa_Rauch> <http://schema.org/name> "Melissa Rauch" .
FnO functions MAY be leveraged to export triples +only under certain conditions. +Conditions are already integrated in RML+FnO processors, +thus conditions apply on Targets as well. +Triples are generated and exported based on the FnO condition's evaluation. +Only if the condition is true, the triples are generated and exported.
In the example, the triples with Jim Parsons
as object are exported
+to the first Target, triples with Kaley Cuoco
as object are exported
+to the second Target.
# Results of DBPedia SPARQL query
+actor,name,nickname
+http://dbpedia.org/resource/Kevin_Sussman,Kevin Sussman
+http://dbpedia.org/resource/Jim_Parsons,Jim Parsons
+http://dbpedia.org/resource/Kaley_Cuoco,Kaley Cuoco
+http://dbpedia.org/resource/Sara_Gilbert,Sara Gilbert
+http://dbpedia.org/resource/Kunal_Nayyar,Kunal Nayyar
+http://dbpedia.org/resource/Laura_Spencer_(actress),Laura Spencer
+http://dbpedia.org/resource/Simon_Helberg,Simon Helberg
+http://dbpedia.org/resource/Johnny_Galecki,Johnny Galecki
+http://dbpedia.org/resource/Mayim_Bialik,Mayim Bialik
+http://dbpedia.org/resource/Melissa_Rauch,Melissa Rauch
<#SDSourceAccess> a sd:Service;
+ sd:endpoint ;
+ sd:supportedLanguage sd:SPARQL11Query;
+ sd:resultFormat formats:SPARQL_Results_CSV;
+.
+
<#TriplesMap> a rr:TriplesMap;
+ rml:logicalSource [ a rml:LogicalSource;
+ rml:source <#SDSourceAccess>;
+ rml:query """
+ PREFIX dbo:
+ PREFIX rdf:
+ PREFIX rdfs:
+ SELECT DISTINCT ?actor ?name WHERE {
+ ?tvshow rdf:type dbo:TelevisionShow .
+ ?tvshow rdfs:label "The Big Bang Theory"@en .
+ ?tvshow dbo:starring ?actor .
+ ?actor foaf:name ?name .
+ }
+ """;
+ ];
+ rr:subjectMap [ a rr:SubjectMap;
+ rml:reference "actor";
+ rr:termType rr:IRI;
+ rmlt:logicalTarget <TargetDump1>;
+ ];
+ rr:predicateObjectMap [ a rr:PredicateObjectMap;
+ rr:predicateMap [ a rr:PredicateMap;
+ rr:constant foaf:name;
+ ];
+ rr:objectMap [ a rr:ObjectMap;
+ rml:reference "name";
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ fnml:functionValue [
+ rr:predicateObjectMap [
+ rr:predicate fno:executes ;
+ rr:objectMap [ rr:constant idlab-fn:decide ]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:expectedStr ;
+ rr:objectMap [ rr:constant "Jim Parsons"]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:str ;
+ rr:objectMap [
+ rml:reference "name";
+ rml:logicalTarget <#TargetDump1>;
+ ];
+ ];
+ ];
+ ];
+ ];
+ rr:predicateObjectMap [
+ rr:predicateMap [ rr:constant foaf:name ];
+ rr:objectMap [
+ fnml:functionValue [
+ rr:predicateObjectMap [
+ rr:predicate fno:executes ;
+ rr:objectMap [ rr:constant idlab-fn:decide ]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:expectedStr ;
+ rr:objectMap [ rr:constant "Kaley Cuoco"]
+ ];
+ rr:predicateObjectMap [
+ rr:predicate idlab-fn:str ;
+ rr:objectMap [
+ rml:reference "name";
+ rml:logicalTarget <#TargetDump2>;
+ ];
+ ];
+ ];
+ ];
+ ];
+
<#TargetDump1> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump1>;
+ rmlt:serialization formats:N-Triples;
+.
+<#TargetDump2> a rmlt:LogicalTarget;
+ rmlt:target <#VoIDDump2>;
+ rmlt:serialization formats:N-Triples;
+.
<#VoIDDump1> a void:Dataset ;
+ void:dataDump <file:///data/dump1.nt>;
+.
+<#VoIDDump2> a void:Dataset ;
+ void:dataDump <file:///data/dump2.nt>;
+.
# file:///data/dump1.nt
+<http://dbpedia.org/resource/Jim_Parsons> <http://xmlns.com/foaf/0.1/name> "Jim Parsons" .
+
+# file:///data/dump2.nt
+<http://dbpedia.org/resource/Kaley_Cuoco> <http://xmlns.com/foaf/0.1/name> "Kaley Cuoco" .