RMLio / yarrrml-parser

A YARRRML parser library and CLI in Javascript
MIT License
42 stars 17 forks source link

RML Function should be an IRI ? #199

Open Yalz opened 1 year ago

Yalz commented 1 year ago

Issue type: :bug: Bug

Description

I have the following "toWkt" function I'm trying to call in my Java code.

mappings:
  loc:
    sources: locations-source
    s: https://www.wegenenverkeer.be/id/verkeersmetingen/meetpunt/$(./@unieke_id)/geo
    po:
      - p: geo:asWKT
        o:
        - function: ex:toWkt
          parameters:
            - [ex:coordinates, $(breedtegraad_EPSG_4326)]
          datatype: xsd:integer

However when I translate this using YARRRML (via Matey), the tripples linked to the function are as follows:

map:omexec_000 rr:constant "http://example.com/toWkt" ;
    rr:termType rr:IRI .

When using this in combination with CARML, this can not be parsed because it expects the function as an IRI instead of a String.

Is this a bug in the YARRRML or rather a limitation on the CARML implementation ?

Environment

yarrrml-parser v1.3.3 carml-engine 0.4.7

bjdmeest commented 1 year ago

it's not a bug in se (map:omexec_000 rr:constant "http://example.com/toWkt" ; rr:termType rr:IRI . should be equivalent to map:omexec_000 rr:constant <http://example.com/toWkt>), but I agree that the default translation should be adapted to make the RML shape more intuitive