ncbo / ontologies_api

Hypermedia API for NCBO's ontology-related projects
http://data.bioontology.org
Other
25 stars 10 forks source link

Feature: add mapping bulk load endpoint "/mappings/load" #101

Open syphax-bouazzouni opened 1 year ago

syphax-bouazzouni commented 1 year ago

Prerequisite

What

This PR adds an endpoint for uploading a file containing a set of mappings, bellow is an example of the structure of the file


[ 
{
      "classes": ["http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Image_Algorithm"
                    ,"http://purl.org/incf/ontology/Computational_Neurosciences/cno_alpha.owl#cno_0000202"],

      "name": 'This is the mappings produced to test the bulk load',
      "source": 'https://w3id.org/semapv/LexicalMatching',
      "comment": 'mock data',
      "relation": [
          'http://www.w3.org/2002/07/owl#subClassOf'
       ],
      "subject_source_id": 'http://bioontology.org/ontologies/BiomedicalResources.owl',
      "object_source_id": 'http://purl.org/incf/ontology/Computational_Neurosciences/cno_alpha.owl',
      "source_name": 'https://w3id.org/sssom/mapping/tests/data/basic.tsv',
      "source_contact_info": 'orcid:1234,orcid:5678',
       "date": '2020-05-30' 
    }
]

Why

Changes