Labeling RDF triples #1474
Unanswered
matthieu-perso
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can create a class Triple, that has an annotation as follows: [{ "@type": "Class",
"@id": "Example",
"name": "xsd:string"},
{ "@type" : "Class",
"@id" : "Triple",
"subject" : "xsd:anyURI",
"predicate" : "xsd:anyURI",
"object" : "xsd:string",
"annotation" : "xsd:string" }] Queries would then look something like: let [s,p,o,ss,sp,so,a,l] = vars('s', 'p', 'o', 'ss', 'sp', 'so', 'a','l')
and(triple(s, "rdf:type", "@schema:Example"),
triple(s, p, o),
typecast(s,'xsd:string', ss),
typecast(p,'xsd:string', sp),
typecast(o,'xsd:string', so),
triple(a, 'subject', ss),
triple(a, 'predicate', sp),
triple(a, 'object', so),
triple(a, 'annotation', l)) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey terminusdb team,
How could I add a label to a triple in terminus db ? My goal would be to store a url parameter to a triple (eg [url] S -> O -> P) and to be able to search based on this label.
Beta Was this translation helpful? Give feedback.
All reactions