On 24/10/2019 04:25, Mike Bendorf wrote:
Hi Holger,

My final intention is to get data in the shape of a tree. Based on your example I managed to explore a taxonomy many levels down just by adding the following:

|
{
  conceptSchemes(uri:"http://resource.geosciml.org/classifierscheme/cgi/2016.01/earth-resource-expression";){
    label
    hasTopConcept {
      label
      narrower {
        label
        narrower {
            label
            narrower {
                 label
}
}
}
}
}
}
|

This is fine since I know how many levels deep I have to go.
Ok good.

Can I do the same with an Ontology, and can you help we with a base querie as well please? I noticed GRAPQL for ontologies requires a Shape/Class, but the list available doesn't reflect the structure of my ontology. I'm not sure what's the right step here

Up until 6.2 there is no way to query Ontologies with GraphQL. In 6.3 we have added that ability using the so-called metashapes schema.

To query a subclass hierarchy in 6.2 or earlier, you'll need to use SPARQL. However, you cannot use SPARQL to produce a JSON tree structure. To produce arbitrary JSON we do have a technology called SWP with its SWON library. If you tell me what kind of input you have (a superclass or all classes?) and what output you need, I can send you an SWP script to produce such query web services.

Holger



Much appreciated,

Mike

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8a770baf-5f0a-48c4-8385-7ad925c626e8%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/8a770baf-5f0a-48c4-8385-7ad925c626e8%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/d6f070d5-f98e-d267-b027-b2a1a4541e4b%40topquadrant.com.

Reply via email to