Giter Site home page Giter Site logo

Comments (7)

chrdebru avatar chrdebru commented on August 21, 2024

Yes. That's because rr:object "literal" is shorthand for rr:objectMap [ rr:constant "literal" ; ]. So in this case, there is sufficient information to deduce that the constant is a literal.

In short: rr:object is a shorthand for constant-based term maps.

from r2rml.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on August 21, 2024

Yes but imagine tou have rr:object "URI". What happens in that case?

from r2rml.

chrdebru avatar chrdebru commented on August 21, 2024

You provide a literal. If you want to provide an IRI for a resource description, then you provide rr:object <http://example.org/foo> ;

  • "http://foo/bar" is a literal
  • "http://foo/bar"^^xsd:anyURI is a typed literal
  • <http://foo/bar> is a named resource

from r2rml.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on August 21, 2024

I see then the R2RML spec is missing one point:

  • It is a constant-based term map and the object is a literal.

from r2rml.

chrdebru avatar chrdebru commented on August 21, 2024

The paragraph of the spec you are referring to is concerned with column-based term maps. rr:object (and rr:graph and rr:predicate, for that matter) are all shorthand for constant-based term maps.

from r2rml.

chrdebru avatar chrdebru commented on August 21, 2024

The spec is clear in my opinion:

A constant-valued term map is a term map that ignores the logical table row and always generates the same RDF term. A constant-valued term map is represented by a resource that has exactly one rr:constant property.
The constant value of a constant-valued term map is the RDF term that is the value of its rr:constant property.
If the constant-valued term map is a subject map, predicate map or graph map, then its constant value must be an IRI.
If the constant-valued term map is an object map, then its constant value must be an IRI or literal.

When using rr:object, it is either an IRI or a literal, which is determined by "the syntax": <> vs. ""

from r2rml.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on August 21, 2024

Actually they have a note I did not see:

Constant-valued term maps are not considered as having a term type, and specifying rr:termType on these term maps has no effect. The type of the generated RDF term is determined directly by the value of rr:constant: If it is an IRI, then an IRI will be generated; if it is a literal, a literal will be generated.

Sorry, I think this can be closed :) thank you!

from r2rml.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.