Closed eroux closed 6 years ago
You have a typo in the definition of children - subclass vs subClass. Try:
{
"@id" : "bdr:O9TAXTBRC201605",
"@context" : {
"children": { "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf" },
"taxSubclassOf" : {
"@id" : "http://purl.bdrc.io/ontology/core/taxSubclassOf",
"@type" : "@id"
},
"@vocab" : "http://purl.bdrc.io/ontology/core/",
"bdr" : "http://purl.bdrc.io/resource/"
},
"children": {
"children": {"children": {}}
}
}
It also seems that you need to be explicit about how deep you want your children to go....
chz p
Thanks for the correction! But my graph is pretty deep and I can't know in advance how deep it is... so I guess that's the main problem
Propose close, working as expected (modulo not having typos :) ) @eroux?
well, should I open a new ticket for not having to specify the number of levels of recursion?
Sure :) That seems an orthogonal issue to @reverse
. Thanks!
well, not really : in the normal mode, infinite recursion is possible, in reverse mode, it has to be specified
I would like to use a
@reverse
property to build a tree structure in JSON-LD but it doesn't seem to work on the dev-playground nor on the distiller. My initial file is:my frame is:
I would expect the result to be:
but instead I'm getting:
(I removed the
@context
for the sake of clarity). Is it possible to get the result I want?