Predicate nie:description can't be added because subject is reported as if it weren't of a given type, but it is
The issue
I've noticed that nie:description
can be added to objects of type nie:InformationElement
. In my database, I have a file that is of type nie:InformationElement
(see proof below)
$ cat ~/e/main.sparql
SELECT ?predicate ?object {
urn:fileid:7dad5dc4-961c-46b8-9116-30dcc0f64c58:30017109 ?predicate ?object.
}
$ tracker3 sparql -d "$HOME/.cache/tracker3/files" -f ~/e/main.sparql
Results:
http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2000/01/rdf-schema#Resource
http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://tracker.api.gnome.org/ontology/v3/nie#InformationElement
http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://tracker.api.gnome.org/ontology/v3/nfo#Document
http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://tracker.api.gnome.org/ontology/v3/nfo#TextDocument
http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://tracker.api.gnome.org/ontology/v3/nfo#PlainTextDocument
http://tracker.api.gnome.org/ontology/v3/nrl#modified, 237
http://tracker.api.gnome.org/ontology/v3/nrl#added, 2023-01-24T16:41:10Z
http://tracker.api.gnome.org/ontology/v3/nie#plainTextContent, 1
2
3
4
5
6
7
8
9
10
http://tracker.api.gnome.org/ontology/v3/nie#mimeType, text/plain
http://tracker.api.gnome.org/ontology/v3/nie#isStoredAs, file:///home/myusername/e/numbers-from-1-to-10.txt
However, if I try to add nie:description
, I get the following error (see below). To me, this is a bug, because the subject is clearly a nie:InformationElement
as can be seen in the output of the command above, but it is reported as if it weren't.
$ cat ~/e/main.sparql
INSERT {
urn:fileid:7dad5dc4-961c-46b8-9116-30dcc0f64c58:30017109 nie:description "a".
}
$ tracker3 sparql -u -d "$HOME/.cache/tracker3/files" -f ~/e/main.sparql
Could not run update, Subject urn:fileid:7dad5dc4-961c-46b8-9116-30dcc0f64c58:30017109 is not is not a nie:InformationElement, cannot have property `nie:description'
Additional information
I'm a Newbie Tracker3 user, so I might have omitted something obvious. I contribute to Wikidata and I'm interested in adding "subject" statements (similar to the "main subject" property in Wikidata] to my files. I'm currently experimenting with Tracker to make myself more familiar with it and to make it work the way I want.
Edited by Ghost User