π - Error in the definition of "rml:reference"
jatoledo opened this issue Β· comments
Mapping: gtfs-csv-noselfjoin.yml
Result:
rr:objectMap [
a rr:ObjectMap;
rml:reference http://transport.linkeddata.es/resource/PickupType/"pickup_type"~iri
]
chek the specification: https://rml.io/specs/rml/#reference
I think now works as intended
In my example(CSV) this is the result:
rr:predicateObjectMap [
a rr:PredicateObjectMap;
rr:predicate a;
rr:objectMap [
a rr:ObjectMap;
rml:reference gtfs:Agency <----------------------- ERROR HERE
]
];
rml:reference is used to refer to:
- a column in case of databases,
- a record in case of CSV or TSV data source
If you need to refer http://vocab.gtfs.org/terms#Agency I think the best way is rr:rr:constant
rr:predicateObjectMap [
a rr:PredicateObjectMap;
rr:predicate rdf:type;
rr:objectMap [
a rr:ObjectMap;
rr:constant gtfs:Agency;
]
];
My yarrrml example:
prefixes:
rr: http://www.w3.org/ns/r2rml#
foaf: http://xmlns.com/foaf/0.1/
xsd: http://www.w3.org/2001/XMLSchema#
rdfs: http://www.w3.org/2000/01/rdf-schema#
dc: http://purl.org/dc/elements/1.1/
rev: http://purl.org/stuff/rev#
gtfs: http://vocab.gtfs.org/terms#
geo: http://www.w3.org/2003/01/geo/wgs84_pos#
schema: http://schema.org/
dct: http://purl.org/dc/terms/
rml: http://semweb.mmlab.be/ns/rml#
ql: http://semweb.mmlab.be/ns/ql#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
mappings:
agency:
sources:
- [/data/csv/1/AGENCY.csv~csv]
s: http://transport.linkeddata.es/madrid/agency/$(agency_id)
po:
- [a, gtfs:Agency]
- [foaf:page, $(agency_url)~iri]
- [foaf:name,$(agency_name)]
so, when the object is gtfs, should I use constant instead of reference?
reference is when you have
notice that reference, constant and template can be in subjectMap, predicateMap and objectMap
Fixed! now detects diferents termMaps