Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add SKOSMOS integration #5

Merged
merged 11 commits into from
Jul 23, 2024
Merged

Feature: Add SKOSMOS integration #5

merged 11 commits into from
Jul 23, 2024

Conversation

fillies
Copy link
Contributor

@fillies fillies commented Jun 27, 2024

This PR implements the integration of the SLOSMOS search API to our API-Gateway.

Changes

1- Federated Search over ols,skosmos and ontoportal

Now by default, the search will be federated over ols (ebi), ontoportal(biodivportal) and skosmos(agrovoc) , for example this request http://localhost:8080/api-gateway/federatedSearch?query=milk*&targetDbSchema=ols will return
For OLS:

  {
    "iri": "http://purl.obolibrary.org/obo/CMO_0002537",
    "backend_type": "ols",
    "short_form": "CMO_0002537",
    "description": [
      "A calculated measurement in which amount of the alpha fraction of the casein phosphoprotein in a specified sample of milk is divided by corresponding amount of the beta fraction of the casein phosphoprotein, and the result presented as a ratio, fraction, quotient or percentage."
    ],
    "label": "milk alpha-casein content to beta-casein content ratio",
    "source": "https://ebi.ac.uk/ols4/api",
    "type": "class",
    "ontology": "cmo"
  },

For OntoPortal

  {
    "iri": "http://purl.obolibrary.org/obo/UBERON_0001913",
    "backend_type": "ontoportal",
    "short_form": "uberon_0001913",
    "label": "milk",
    "source": "https://data.biodivportal.gfbio.dev",
    "type": "class",
    "ontology": "oba"
  }

And now also SKOSMOS

 {
    "iri": "http://aims.fao.org/aos/agrovoc/c_25682",
    "backend_type": "skosmos",
    "short_form": "c_25682",
    "description": [
      "Used for transportation of milk"
    ],
    "label": "milk containers",
    "source": "https://agrovoc.fao.org/browse/rest/v1",
    "type": "individual",
    "ontology": "agrovoc"
  }

2- Output results to SKOSMOS format

Doing http://localhost:8080/api-gateway/federatedSearch?query=milk*&targetDbSchema=skosmos, will output all the results in the skosmos format
Bellow an example of results:
image

Format mappings

OLS SKOSMOS ONTOPORTAL
iri iri uri @id
label label prefLabel prefLabel
synonym synonym altLabel synonym
short_form short_form deducted from uri deducted from uri
description description scopeNote definition
ontology ontology_name vocab links->ontology
type class,property,individual,ontology individual class
source ebi url agrovoc url biodiv url
backend_type ols skosmos ontoportal

@rombaum

This comment was marked as resolved.

@rombaum

This comment was marked as resolved.

@fillies

This comment was marked as resolved.

@syphax-bouazzouni syphax-bouazzouni mentioned this pull request Jul 17, 2024
5 tasks
@rombaum
Copy link
Contributor

rombaum commented Jul 18, 2024

@fillies

scopeNote is added as a description, please give me more input on what you want matched, especially for short form

type issue

there are two more changes for the prototype. The type in the Skosmos api response has to converted to individual for the ols api. This is a workaround and could be solved in the future on a better way.

type with not supported skos:concept
type with skos:concept

type with supported individual + short_form
grafik

short_form issue

For the short_form you could use the Jena library and use the local name to put it to the response. similar to this:

https://github.com/ts4nfdi/api-gateway/blob/50055f78d104b93ba853179425bdc9bbb978a530/src/main/java/org/semantics/apigateway/api/OlsTransformer.java#L21C1-L27C14

@syphax-bouazzouni syphax-bouazzouni changed the title Included agrovoc, type matching needs to be checked again with expert Feature: Add SKOSMOS integration Jul 22, 2024
@syphax-bouazzouni syphax-bouazzouni self-requested a review July 22, 2024 14:34
@syphax-bouazzouni
Copy link
Collaborator

@rombaum fixed the type and short_form issues, you can see the screenshot in the description.

Copy link
Contributor

@rombaum rombaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. There is just this small request if we could directly use the information from the API instead of a static value.

@rombaum rombaum merged commit cdb0ad6 into main Jul 23, 2024
@rombaum rombaum deleted the skosmos_agrovoc branch July 23, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants