-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
200 additions
and
0 deletions.
There are no files selected for viewing
200 changes: 200 additions & 0 deletions
200
data-model/annotations/0.1.0/schema/annotations_for_mas.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"type": "object", | ||
"description": "Schema specific to Machine Annotation Services providing information to DiSSCo.", | ||
"properties": { | ||
"ods:id": { | ||
"type": "string" | ||
}, | ||
"ods:jobId": { | ||
"type": "string", | ||
"description": "Handle of the job record, if the annotation was produced by a Machine Annotation Service", | ||
"pattern": "https:\/\/hdl.handle.net\/[^\/]+\/(.){3}-(.){3}-(.){3}" | ||
}, | ||
"rdf:type": { | ||
"const": "Annotation" | ||
}, | ||
"oa:motivation": { | ||
"enum": [ | ||
"ods:adding", | ||
"oa:assessing", | ||
"oa:editing", | ||
"oa:commenting" | ||
] | ||
}, | ||
"oa:motivatedBy": { | ||
"type": "string" | ||
}, | ||
"oa:creator": { | ||
"type": "object", | ||
"properties": { | ||
"ods:type": { | ||
"type": "string" | ||
}, | ||
"foaf:name": { | ||
"type": "string" | ||
}, | ||
"ods:id": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"ods:id", | ||
"ods:type" | ||
] | ||
}, | ||
"dcterms:created": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"oa:target": { | ||
"type": "object", | ||
"properties": { | ||
"ods:id": { | ||
"type": "string" | ||
}, | ||
"ods:type": { | ||
"type": "string" | ||
}, | ||
"oa:selector": { | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"ods:type": { | ||
"const": "FieldSelector" | ||
}, | ||
"ods:field": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"ods:type", | ||
"ods:field" | ||
] | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"ods:type": { | ||
"const": "ClassSelector" | ||
}, | ||
"oa:class": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"ods:type", | ||
"oa:class" | ||
] | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"ods:type": { | ||
"const": "FragmentSelector" | ||
}, | ||
"ac:hasRoi": { | ||
"type": "object", | ||
"properties": { | ||
"ac:xFrac": { | ||
"type": "number", | ||
"minimum": 0, | ||
"maximum": 1 | ||
}, | ||
"ac:yFrac": { | ||
"type": "number", | ||
"minimum": 0, | ||
"maximum": 1 | ||
}, | ||
"ac:widthFrac": { | ||
"type": "number", | ||
"minimum": 0, | ||
"maximum": 1 | ||
}, | ||
"ac:heightFrac": { | ||
"type": "number", | ||
"minimum": 0, | ||
"maximum": 1 | ||
} | ||
}, | ||
"required": [ | ||
"ac:xFrac", | ||
"ac:yFrac", | ||
"ac:widthFrac", | ||
"ac:heightFrac" | ||
] | ||
}, | ||
"dcterms:conformsTo": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"ods:type", | ||
"ac:hasRoi" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"ods:id", | ||
"ods:type" | ||
] | ||
}, | ||
"oa:body": { | ||
"type": "object", | ||
"properties": { | ||
"ods:type": { | ||
"type": "string" | ||
}, | ||
"oa:value": { | ||
"type": "array" | ||
}, | ||
"dcterms:reference": { | ||
"type": "string" | ||
}, | ||
"ods:score": { | ||
"type": "number", | ||
"minimum": 0, | ||
"maximum": 1 | ||
} | ||
}, | ||
"required": [ | ||
"ods:type", | ||
"oa:value" | ||
] | ||
}, | ||
"schema.org:aggregateRating": { | ||
"type": "object", | ||
"properties": { | ||
"ods:type": { | ||
"type": "string" | ||
}, | ||
"schema.org:ratingCount": { | ||
"type": "number" | ||
}, | ||
"schema.org:ratingValue": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"ods:type", | ||
"schema.org:ratingCount", | ||
"schema.org:ratingValue" | ||
] | ||
}, | ||
"placeInBatch": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"rdf:type", | ||
"oa:motivation", | ||
"oa:target", | ||
"oa:body", | ||
"oa:creator" | ||
], | ||
"additionalProperties": false | ||
} |