Skip to content

Project DTO

tudorgroza edited this page May 4, 2021 · 13 revisions

The general form of the DTO is listed below.

On creation:

  • name is mandatory NOT EMPTY
  • datasources, ontologies and preferredMappingOntologies fields will enable context-level preferences for mappings and will populate the default context of the project. Additional contexts can be added using similar fields via the ContextDTO and the Project contexts endpoints

Below is the semantics associated with these fields:

  • `datasources' - a list of ZOOMA datasources used for querying
  • ontologies - list of all acceptable ontologies - the terms which can be either be used directly or imported into target ontologies. This will is used as input for ZOOMA queries
  • preferredMappingOntologies - list of target ontologies - the ones the terms from which can be used directly
{
  "name": "Project name",                     // MANDATORY
  "description": "Some description",
  "numberOfReviewsRequired": 3,
  "datasources": [
     "atlas",
     "uniprot",
     "gwas",
     ...
  ],
  "ontologies": [
     "efo",
     "mondo",
     "hp",
     "ordo"
  ],
  "preferredMappingOntologies": [ "efo" ],
}

In responses:

  • id is NOT EMPTY
  • contexts is a list of ContextDTO objects
  • created follows a standard structure across all DTOs / objects
    • timestamp - always using the format: YYYY-MM-DDThh:mm:ss.ms+TZ
    • user - always containing name and email
{
  "id": "602392ee1d09a55d6e0384d4",
  "name": "Project name",
  "description": "Some description",
  "numberOfReviewsRequired": 3,
  "contexts": [
    {
      "name": "NAME",
      "description": "Some description",
      "datasources": [
          "atlas",
          "uniprot",
          "gwas",
           ...
      ],
      "ontologies": [
          "efo",
          "mondo",
          "hp",
          "ordo",
          ...
      ],
      "preferredMappingOntologies": [ "efo" ],
      "graphRestriction" : {
         "classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"]   // MANDATORY - curies
         "relations: [ "rdfs:subClassOf" ],                         // MANDATORY
         "direct": true | false,
         "include_self": true | false
       }
    },
    ...
  ],
  "created": {
    "timestamp": "2021-02-10T16:01:50.131+08:00",
    "user": {
      "name": "User name",
      "email": "User email"
    }
  }
}