You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are fragment types and data types of annotations stored in layers (https://github.com/camomile-project/camomile-server/blob/master/models/Layer.js#L47).
But these types are currently purely informative and the format of the annotation is not validated against them.
It would be useful to store structured schema in these fields for several uses :
validating annotations
generating visual editors for annotations
There are several ways to represent json schemas in javascript:
mongoose schema : currently used in camomile server to represent the data stored in mongodb (layer, user, annotation,...). Defined in javascript, not easily serialize.
json schema : schema to describe json data, written in json. Easy to store in mongodb.
It makes more sense to use json schemas to represent the data type and fragment type of annotations.
open annotation defines annotations in a way similar to what camomile does : with a fragment (called target) and data (called body). Some schemas of openannotations might be used as default schemas in camomile. (related to #71)
So the plan is to represent these types using json schema, and taking into account what open annotation says about the kind of schemas that make sense for annotations.
It is possible to validate json schema efficiently using ajv and to generate editors using json-editor
The text was updated successfully, but these errors were encountered:
Discussed with @hbredin
There are fragment types and data types of annotations stored in layers (https://github.com/camomile-project/camomile-server/blob/master/models/Layer.js#L47).
But these types are currently purely informative and the format of the annotation is not validated against them.
It would be useful to store structured schema in these fields for several uses :
There are several ways to represent json schemas in javascript:
It makes more sense to use json schemas to represent the data type and fragment type of annotations.
open annotation defines annotations in a way similar to what camomile does : with a fragment (called target) and data (called body). Some schemas of openannotations might be used as default schemas in camomile. (related to #71)
So the plan is to represent these types using json schema, and taking into account what open annotation says about the kind of schemas that make sense for annotations.
It is possible to validate json schema efficiently using ajv and to generate editors using json-editor
The text was updated successfully, but these errors were encountered: