44 "title" : " Annotation Schema" ,
55 "type" : " object" ,
66 "TODOS" : [
7- " Usually an annotation is a simple comment. In the future an annotation can be an image, for instance a probability mask."
7+ " Usually an annotation is a simple comment. In the future an annotation can be an image, for instance a probability mask. This can be the answer to the question, what is the probability for every voxel to be part of the corpus callosum. "
88 ],
99 "definitions" : {
1010
1111 "annotationBasic" :{
1212 "$id" : " #annotationBasic" ,
1313 "description" : " Basic description of an annotation" ,
1414 "properties" :{
15- "typeAnnotationForm " :{
16- "$ref" : " annotationForm .schema.json#/definitions/typeAnnotationForm "
15+ "typeQuestion " :{
16+ "$ref" : " question .schema.json#/definitions/typeQuestion "
1717 },
1818 "typeAnnotation" : {
19- "description" : " " ,
20- "type" : " string" ,
21- "enum" : [" TEXT" ," IMAGE" ," NUMBER" ," BOOLEAN" ]
19+ "$ref" : " question.schema.json#/definitions/typeAnnotationOptions"
2220 },
2321 "status" : {
2422 "description" : " Status of the annotation: saved or submitted" ,
2523 "type" : " string" ,
2624 "enum" : [" SAVED" ," SUBMITTED" ]
2725 },
2826 "reference" : {
29- "roiId" : {
30- "description" : " Id of the ROI annotated by this annotation" ,
31- "type" : " string"
27+ "description" : " References to main documents" ,
28+ "type" : " object" ,
29+ "properties" : {
30+ "roiId" : {
31+ "description" : " Id of the ROI annotated by this annotation" ,
32+ "type" : " string"
33+ },
34+ "taskId" : {
35+ "description" : " Id of the task used to produce this annotation" ,
36+ "type" : " string"
37+ },
38+ "workflowId" : {
39+ "description" : " Id of the workflow used to produce this annotation" ,
40+ "type" : " string"
41+ },
42+ "materializedTaskId" : {
43+ "description" : " Id of the materialized task used to created the ROI. If not set then the materialized task has not been submitted." ,
44+ "type" : " string"
45+ },
46+ "questionId" :{
47+ "description" : " Id of the question related to this annotation. An annotation is an answer to a question." ,
48+ "type" : " string"
49+ }
3250 },
33- "materializedTaskId" :{
34- "description" : " Id of the materialized task used to created the ROI. If not set then the materialized task has not been submitted." ,
35- "type" : " string"
36- }
51+ "required" : [" roiId" , " materializedTaskId" , " questionId" ],
52+ "additionalProperties" : false
3753 },
3854 "properties" : {
3955 "description" : " Properties of the annotation. The list of properties depends in the type of annotation." ,
4056 "type" : " object" ,
41- "properties" : {
42- "isOntologyBased" :{
43- "description" : " True if the annotation and its options are based on an ontology" ,
44- "type" : " boolean"
57+ "oneOf" :[
58+ {
59+ "properties" : {
60+ "isOntologyBased" : {
61+ "description" : " True if the annotation and its options are based on an ontology" ,
62+ "type" : " boolean" ,
63+ "enum" : [true ]
64+ },
65+ "ontologyId" : {
66+ "description" : " Id of the ontology where the value of the annotation is retrieved." ,
67+ "type" : " string"
68+ }
69+ },
70+ "required" : [" isOntologyBased" , " ontologyId" ]
4571 },
46- "ontologyId" : {
47- "description" : " Id of the ontology where the value of the annotation is retrieved." ,
48- "type" : " string"
72+ {
73+ "properties" : {
74+ "isOntologyBased" : {
75+ "description" : " True if the annotation and its options are based on an ontology" ,
76+ "type" : " boolean" ,
77+ "enum" : [false ]
78+ }
79+ },
80+ "required" : [" isOntologyBased" ]
4981 }
50- }
82+ ]
5183 }
5284 },
53- "required" : [" typeAnnotationForm " , " typeAnnotation" , " status" , " reference" , " properties" ]
85+ "required" : [" typeQuestion " , " typeAnnotation" , " status" , " reference" , " properties" ]
5486 },
5587
5688 "annotationMultipleChoiceMultipleAnswer" :{
6092 { "$ref" : " #/definitions/annotationBasic" },
6193 {
6294 "properties" :{
63- "typeAnnotationForm " : {
95+ "typeQuestion " : {
6496 "enum" : [" MULTIPLE_CHOICE_MULTIPLE_ANSWER" ]
6597 },
6698 "properties" :{
84116 { "$ref" : " #/definitions/annotationBasic" },
85117 {
86118 "properties" :{
87- "typeAnnotationForm " : {
119+ "typeQuestion " : {
88120 "enum" : [" MULTIPLE_CHOICE_SINGLE_ANSWER" ]
89121 },
90122 "properties" :{
109141 { "$ref" : " #/definitions/annotationBasic" },
110142 {
111143 "properties" :{
112- "typeAnnotationForm " : {
144+ "typeQuestion " : {
113145 "enum" : [" OPEN_ENDED" ]
114146 },
115147 "properties" :{
132164 { "$ref" : " #/definitions/annotationMultipleChoiceMultipleAnswer" },
133165 { "$ref" : " #/definitions/annotationMultipleChoiceSingleAnswer" },
134166 { "$ref" : " #/definitions/annotationOpenEnded" }
135-
136167 ]
137- }
168+ }
0 commit comments