Closed Maysk closed 1 year ago
yes, it is possible to do that in reactor.js ! The only caveat is that static reactor.js doesn't support cURIs which means instead of vocab1:p->vocab2:t you should use the complete URIs of intender properties.
I tried to do it and didn't have success. It worked only in facet.js. (I use the complete uri in both examples.)
I am using the version labeled as vv1.3.6
PS: LD-R is fantastic. I have a wonderful surprise the first time I used it, because it's really easy to install. Congrats!
thanks for your feedback. It would be great if you can share your configs at reactor.js so that I can regenerate the issue.
To regenerate the issue, you can try the following at the example of dbpedia.
File reactor.js
'http://dbpedia.org/sparql': { list: [ 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'http://dbpedia.org/ontology/country', 'http://dbpedia.org/property/established' ], config: { 'http://dbpedia.org/property/established': { label: ['Established Year'] }, 'http://dbpedia.org/ontology/country': { objectBrowser: ['TagListBrowser'] },
//Added Part
'http://dbpedia.org/ontology/location->http://xmlns.com/foaf/0.1/name':{
label: ['Location Name']
}
}
}
This seems to be your facets.js file. And as I see there you haven't added that new property to the list yet. If you change your list to
list: [
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'http://dbpedia.org/ontology/country', 'http://dbpedia.org/property/established, 'http://dbpedia.org/ontology/location->http://xmlns.com/foaf/0.1/name'
],
I guess it should work.
Actually, I sent the wrong part. I was from facet.js as you noticed. My appologies.
try to insert the following on reactor.js:
'http://dbpedia.org/ontology/location->http://xmlns.com/foaf/0.1/name':{
label: ['Location Name']
}
And try to acess "European Bank for Reconstruction and Development" in ldr.
Should it show the property "Location Name"?
I still need to regenerate it using some sample data.
You can recreate using the following: test.zip
Inside this zip file there are the config files needed to set up the test and the sparql used to insert the triples on the dataset. I am using virtuoso triplestore.
the config/reactor.js has this configuration:
However, the property 'http://example.org/ns#relatedTo->http://example.org/ns#name' is not shown here:
Thanks for the file. I checked it. LD-R doesn't support property chains for properties in reactor.js. I think I didn't have a use case for that but would be a good new feature request!
Is it possible to put a chain property at reactor.js?
Example: 'uri1->uri2':{ label: ['A'] },