Closed CyberDaedalus00 closed 3 years ago
I'm not able to test it out right now, but according to the R2RML spec at https://www.w3.org/TR/r2rml/#term-map:
A term map MUST be exactly one of the following:
a constant-valued term map,
a column-valued term map,
a template-valued term map.
Have you tried with multiple rr:objectMap
s, one for each object you would want to generate?
this is a constant-valued term map with only one value.
rr:predicateObjectMap [ rr:predicate rdf:type ; rr:objectMap [ rml:reference "extensions.archive-ext" ; rr:constant archiveExt:ArchiveFile ; ]
The constant that I'm expecting to be used as the value of the object in the triple is the IRI of the class archiveExt:ArchiveFile.
Instead, what gets written out as the value of the object in the triple is the value of @.extensions.archive-ext property, thus ignoring the constant specified.
Upon reading the "From A Reference" section of the RML specification, it appears the use of rml:reference DOES return the data value of that column/element/object in a given logical iteration. Thus, it appears to override the rr:constant statement after it.
I'm trying to come up with a way to dynamically add additional rdf:type values for a subject based on the discovery of the existance of property in the JSON source. I've defined the following mapping:
` rr:predicateObjectMap [ rr:predicate rdf:type ; rr:objectMap [ rml:reference "extensions.archive-ext" ;
rr:constant archiveExt:ArchiveFile ;
` Unfortunately, when mapper runs, instead of getting the value of the rr:constant being written out, I get the value of the JSON property referenced by the rml:reference.
Is this a bug or am I doing something wrong?