Proposal Annotation Types
Proposed Annotation Type API
JSON Schema Resources
- Example schemas: http://json-schema.org/
- Draft JSON Schema Spec: http://tools.ietf.org/html/draft-zyp-json-schema-03
- Schema to Java POJO code generator: http://code.google.com/p/jsonschema2pojo/
- Java POJO to Schema generator: http://wiki.fasterxml.com/JacksonJsonSchemaGeneration
- Google is using JSON schema to describe its APIs
Positive Integer Annotation
POST /repo/v1/annotationtype { "name":"numberOfSamples", "displayName":"Number of Samples", "schema":{ "description":"The number of samples in a dataset layer.", "type":"integer", "minimum":1 } }
Enumerated Type Annotation
POST /repo/v1/annotationtype { "name":"status", "displayName":"Status", "schema":{ "description":"The status of a dataset.", "type":"string", "enum":[ "unknown", "pending", "curated", "QCed" ], "default":"unknown" } }
Very Long String Annotation
POST /repo/v1/annotationtype { "name":"curationNotes", "displayName":"Curation Notes", "schema":{ "description":"The free text notes on curation that did not have a proper home in the ISA-Tab representation of the dataset metadata.", "type":"string", "maxLength":4096 } }
Ontology Annotation
POST /repo/v1/annotationtype { "name":"tissueType", "displayName":"Tissue Type", "schema":{ "description":"The type of tissue in a dataset layer.", "type":"string", "format":"TODO URL to the ontology we are using for this" } }
Array of Values Annotation
POST /repo/v1/annotationtype { "name":"tissueTypes", "displayName":"Tissue Types", "schema":{ "description":"The types of tissue in a dataset.", "type":"array", "items":{ "type":"string", "format":"TODO URL to the ontology we are using for this" } } }