You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is assumed that a processor will concatenate the collections or containers while respecting the order of the iterations as provided by the logical source.
@@ -147,7 +147,7 @@ Now, when an `rml:template`, `rml:constant` or `rml:reference` is provided, to a
@@ -111,9 +111,9 @@ The following mapping will relate instances of authors to names. The names of au
111
111
In this example we generate, for each row in table `AUTHOR`, an blank node of type `rdf:Bag`. Each such bag "gathers" values from different term maps. The execution of this mapping will produce the following result:
While not shown in this example, different term maps allow to collect terms of different types: resources, literals, typed or language-tagged literals, etc. The fourth record in the table did not generate a bag, since each term map in the gather map did not yield a value.
@@ -127,7 +127,7 @@ Continuing with the [relational data example](#relationalexample), here we relat
127
127
<preclass="ex-mapping">
128
128
<#BookTM>
129
129
rml:logicalTable [ rml:tableName "BOOK" ; ] ;
130
-
rml:subjectMap [ rml:template "/book/{ID}" ; ] ;
130
+
rml:subjectMap [ rml:template "/book{ID}" ; ] ;
131
131
rml:predicateObjectMap [
132
132
rml:predicate ex:writtenBy ;
133
133
rml:objectMap [
@@ -147,8 +147,8 @@ Continuing with the [relational data example](#relationalexample), here we relat
147
147
Intuitively, we will join each record (or iteration) with data from the parent triples map. The join may yield one or more results, which are then gathered into a list. The execution of this mapping will produce the following RDF:
148
148
149
149
<preclass="ex-output">
150
-
:book/1 ex:writtenby ( :person/1 ) .
151
-
:book/2 ex:writtenby ( :person/2 :person/3 ) .
150
+
:book1 ex:writtenby ( :person1 ) .
151
+
:book2 ex:writtenby ( :person2 :person3 ) .
152
152
</pre>
153
153
154
154
In RML, it is assumed that each term map is multi-valued. That this, each term map may return one or more values. The default behavior is to append the values in the order of the term maps appearing in the gather map.
@@ -161,13 +161,16 @@ Here we exemplify the use of a term map in a subject map. Continuing with the JS
161
161
<preclass="ex-mapping">
162
162
<#TM> a rml:TriplesMap;
163
163
rml:logicalSource [
164
-
rml:source "data.json" ;
165
-
rml:referenceFormulation ql:JSONPath ;
164
+
rml:source [
165
+
a rml:RelativePathSource;
166
+
rml:root rml:MappingDirectory;
167
+
rml:path "data.json"
168
+
] ;
166
169
rml:iterator "$.*" ;
167
170
];
168
171
169
172
rml:subjectMap [
170
-
rml:template "seq/{id}" ;
173
+
rml:template "seq{id}" ;
171
174
rml:gather ( [ rml:reference "values.*" ; ] ) ;
172
175
rml:gatherAs rdf:Seq ;
173
176
] ;
@@ -181,12 +184,12 @@ Here we exemplify the use of a term map in a subject map. Continuing with the JS
This is similar to the previous example, yet in this case the head node of each produced collection is assigned an IRI `:list/a`, `:list/b` and `:list/c`.
113
+
This is similar to the previous example, yet in this case the head node of each produced collection is assigned an IRI `:lista`, `:listb` and `:listc`.
Copy file name to clipboardExpand all lines: spec/section/vocabulary.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,9 @@ Gather maps are term maps that use [`rml:gather`](#rml-gather) and [`rml:gatherA
12
12
* A `rml:GatherMap` MUST have exactly one [`rml:gatherAs`](#rml-gatheras) property.
13
13
* A `rml:GatherMap` MAY have zero or exactly one [`rml:strategy`](#rml-strategy) property.
14
14
15
+
#### `rml:Strategy` {#strategyclass}
16
+
17
+
A strategy is a plan or set of actions designed to achieve a specific goal or outcome. Instances of `rml:Strategy` represent ways to perform an action such as combining two collections and containers. See [**constants**](#constants) for examples.
15
18
16
19
### Properties
17
20
@@ -55,7 +58,7 @@ When false, the gather map will not generate a collection or container.
55
58
56
59
Property `rml:allowEmptyListAndContainer` is optional, it takes the value **false** by default.
0 commit comments