I am in the process of converting a graph to relational database. The schema of the RDB I am converting to requires each person to have a unique ID in the form of an integer. I have unique ID's for all my persons in the form of a URI.
is it possible to convert from URI -> Integer in a consistent manner to produce unique integer identifiers?
I have tried:
bind(xsd:integer(?person_id) as ?person_id_int)
bind(xsd:integer(str(?person_id)) as ?person_id_int)
I am using Ontotext GraphDB, the documentation states that
xsd:integer(rdfTerm value) - Casts value to xsd:integer
But I get no result when I try to bind the result of that to a variable.
example of a URI I'm trying to convert:
https://biomedit.ch/rdf/sphn-resource/CHE-229_707_417-sphn-SubjectPseudoIdentifier-cdaea016-0449-46e5-9fbb-e44c0ecf0bed
Thanks in advance!
xsd:integeris a constructor function analogous to XPath: w3.org/TR/sparql11-query/#FunctionMapping - indeed it doesn't work for any string that can't be parsed as a valid integer number. My question would be, what would you expect as an outcome of xsd:integer("biomedit.ch/rdf/sphn-resource/…)`?ent:id()in GraphDB (PREFIX ent: <http://www.ontotext.com/owlim/entity#>).