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
The mapping file has an extension .txt because I cannot upload .ttl files.
We can not rely on the order in which triples maps are declared in a mapping. We we can encounter situations in which the mapping yield a different result. The mapping.ttl and mapping-rev.ttl both contain the same triples maps, but they are switched around in the files. BURP relies on Apache Jena, and I presume they use hashes to store the nodes in memory. You can see that the execution of both mappings yields the same result, demonstrating we cannot rely on the order of the triples maps.
$ java -jar .\burp.jar -m mapping.ttl
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "2" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
<http://example.com/e/a> <http://example.com/ns#with> <http://example.com/c/a> .
System exiting with code: 0
$ java -jar .\burp.jar -m mapping-rev.ttl
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "2" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
<http://example.com/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
<http://example.com/e/a> <http://example.com/ns#with> <http://example.com/c/a> .
System exiting with code: 0
Change the IRI of one of the triples maps (e.g., <#TM1> into <#TMxxx>), and you get a different result ("1, 2, a, b").
There is no "increment function", but we can easily create one where you use functions to generate predicates p1, p2, p3, ... and end up with different outputs. I can look into creating one.
dachafra
changed the title
Order of execution of triplesmaps has implications on the RDF output
There is no notion of order in RDF mappings, and this has implications for the RDF output
Jul 3, 2024
raised by @chrdebru
eg when 2 triplesmaps write to the same collection, it might be needed to specify the order of execution
The text was updated successfully, but these errors were encountered: