ISSUE-33 (rr:template type in ObjectMapClass): How can rr:template be used in an ObjectMapClass to produce IRI's or Strings [R2RML]

ISSUE-33 (rr:template type in ObjectMapClass): How can rr:template be used in an ObjectMapClass to produce IRI's or Strings [R2RML]

http://www.w3.org/2001/sw/rdb2rdf/track/issues/33

Raised by: David McNeil
On product: R2RML

>From section A.2.2.2 of the R2RML spec http://www.w3.org/2001/sw/rdb2rdf/r2rml/#sec-emptable-mapping-table 

 rr:predicateObjectMap 
    [ 
      rr:predicateMap [ rr:predicate emp:jobtype ]; 
      rr:objectMap    [ rr:template "http://example.com/emp/job/{job}" ]
    ];

This leads to the question: in an ObjectMapClass what is to be the datatype of the value produced by an rr:template expression? Choices I can think of are:

1) IRI - this leads to the question of how to use a template to produce a string? One would expect to use rr:termtype for this, but section 3.6.1.3 makes it clear that rr:termtype & rr:datatype are "relevant in an ObjectMap only if rr:column property is present as well". Another possibility is to require the user to create a SQLQuery that implements the desired template behavior in a projected column. Then the rr:termtype & rr:datatype properties can be used. But this seems like it is requiring the user to jump through unnecessary hoops.

2) String - then how to use a template to produce an IRI?

My recommendation is to clarify in the spec, in the context of an ObjectMapClass whether rr:template produces an IRI or a string and to allow rr:termtype and rr:datatype to be used in conjunction with rr:template.

Received on Thursday, 10 March 2011 21:49:59 UTC