oeg-upm / yatter

Translate YARRRML into easy-to-read [R2]RML mappings
https://doi.org/10.5281/zenodo.7024500
Apache License 2.0
22 stars 6 forks source link

Resolve prefixes in the generation of SubjectMap #68

Closed marioscrock closed 8 months ago

marioscrock commented 1 year ago

Describe the bug Considering a SubjectMap s: ex:person/$(firstname) and a prefix ex, the prefix is not resolved when generating the SubjectMap.

To Reproduce Use this mapping file

prefixes:
  ex: "http://example.com/"

mappings:
  person:
    sources:
      - ['persons.json~jsonpath', '$.persons[*]']
    s: ex:person/$(firstname)
    po:
      - [a, foaf:Person]

Expected behavior In the SubjectMap generated the ex: is resolved as http://example.com/.

rr:subjectMap [
        a rr:SubjectMap;
        rr:template "http://example.com/person/{firstname}";
    ];
dachafra commented 8 months ago

Sorry for the late fix, but now prefixes are substituted in any TermMap with reference and prefixes.