Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] [BioPortal] Feedback from marwa811

Michael Dorf mdorf at
Mon Aug 31 14:39:02 PDT 2020

Hi Marwa,

Thank you for contacting us. I don’t have a working Java environment setup to test my recommendation (we are a Ruby/Rails shop), but since you are already have a working code that retrieves the ontologies, you only need to add a parameter “display=…” for the REST service to bring in the list of categories (domains) for each ontology. Your code should look like this:

// Follow the ontologies link by looking for the media type in the list of links
String link = resources.get("links").findValue("ontologies").asText();
link += "?display=acronym,name,summaryOnly,flat,ontologyType,hasDomain";

Then, as you iterate over the ontologies, you should be able to do something like this:

for (JsonNode ontology : ontologies) {
    ontNames.add(ontology.get("name").asText() + "\n" + ontology.get("@id").asText() + "\n\n");
    ArrayList<String> categories = (new ObjectMapper()).convertValue(ontology.get("hasDomain"), ArrayList.class);

I don’t know if this exact code works as written, but you should be able to tweak it to a working version.

Hope this helps.


On Aug 30, 2020, at 5:23 PM, support at<mailto:support at> wrote:

Name: marwa811

Email: marwa.abdelrehem at<mailto:marwa.abdelrehem at>



I am using your API for retrieving data about Bioportal ontologies.
This example is efficient and simple and outputs a list of the ontologies' names and ids. I also need to output the categories (Domains) for each ontology. Could you guide me (with code snippet) on how to make this?

bioontology-support mailing list
bioontology-support at<mailto:bioontology-support at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list