Closed MathiasVDA closed 9 months ago
Hi,
rr:dataType
is for indicating the type of data of an RDF Literal such as XSD integer, XSD date, etc.
You're looking for rr:termType
which indicates if the term is an IRI, Literal or Blanknode.
So, this should work:
rr:predicateObjectMap [
rr:predicate era:opType;
rr:objectMap [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes;
rr:objectMap [ rr:constant idlab-fn:lookup ]
];
rr:predicateObjectMap [
rr:predicate idlab-fn:str;
rr:objectMap [ rml:reference "class_en"]
];
rr:predicateObjectMap [
rr:predicate idlab-fn:inputFile;
rr:objectMap [ rr:constant "map-opType.csv"]
];
rr:predicateObjectMap [
rr:predicate idlab-fn:fromColumn;
rr:objectMap [ rr:constant 0; rr:datatype xsd:integer]
];
rr:predicateObjectMap [
rr:predicate idlab-fn:toColumn;
rr:objectMap [ rr:constant 1; rr:datatype xsd:integer]
]
]; rr:termType rr:IRI
]].
You are right...
I've spent far to much time looking for a workarround (writing a script to convert the string into URI) and far to less looking at my own mistakes... Feeling a bit stupid now
Thanks!
No worries :) Happy to help!
Hello,
I have this csv file: https://gitlab.com/mathias.vanden.auweele/infrabel-opendata-to-rdf/-/blob/main/src/operational-points/map-opType.csv?ref_type=heads
And this rml file: https://gitlab.com/mathias.vanden.auweele/infrabel-opendata-to-rdf/-/blob/main/src/operational-points/map.rml.ttl?ref_type=heads
Running with this json file: https://gitlab.com/mathias.vanden.auweele/infrabel-opendata-to-rdf/-/blob/main/src/operational-points/operationele-punten-van-het-netwerk.json?ref_type=heads
A partial result is :
I expected to see
era:opType <http://data.europa.eu/949/concepts/op-types/rinf/10>;
I tried multiple version where I don't define a datatype or put <...> in the csv file. But it all translates to string type.