Add OLS API concepts/properties resolution in Nanopublications Templates - #34
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a small block of code to resolve the EBI Ontology Lookup Service API in
Template.javaIt uses a
ifstatement to check for OLS API URL, and grab the response to populate the select. So we can easily refactor this code as we wish later, maybe a small list of hadoc functions to resolve different types of APIs):It can be implemented this way in a template:
Or only search in a specific ontology (e.g. the Relation Ontology
ro):See this template as example: http://localhost:37373/publish?1&template=http://purl.org/np/RA8AXz5jnk5caKG-RnOT39_RD_WmPG4chQc2cBoiIzQ_U
The response time of the API is quite good!