Open gaurav opened 3 years ago
I'm wondering how hard it would be to extract these through a SPARQL query. The RDF shouldn't be terribly big, and I think for example Jena can act as an in-memory triple store and supports SPARQL?
Ideally, I think we'd like to do all the processing in JavaScript, but there are in-memory triplestores for JavaScript available (e.g. node-quadstore). If that doesn't work, we could add an extra method to JPhyloRef's webserver mode for extracting lists of specifiers from a given ontology using Jena.
Since we have decided that RDF files (in n-Quads) would be the standard ontology format for Phyx files, we should support them in Open Tree Resolver. This will require identifying the internal and external specifiers from the logical expressions in the phyloreferences.
Note that for the purposes of Open Tree Resolver, we don't actually need to know whether specifiers are internal or external -- if we can identify all the taxon name specifiers referenced in the ontology, we can use that information to download the induced subtree we need to reason over. If we can further identify the taxon name specifiers for each logical expression, we can list those as specifiers for each phyloref, although we'd need to examine the structure of the logical expression to determine if each specifier is internal or external. We should also look into the possibility of using OWL property chains to identify these.