This section gives an overview of how the BASE annotation system works.
An item must implement the AnnotatableData
AnnotationSetData
Primary annotations are annotations that
explicitely belong to the item. An annotation set can contain
only one primary annotation of each annotation type. The primary
annotation are linked with the annotations
property. This property is a map with an
AnnotationTypeData
Inherited annotations are annotations that belong to a parent item, but that we want to use on another item as well. Inherited annotations are saved as references to either a single annotation or to another annotation set. Thus, it is possible for an item to inherit multiple annotations of the same annotation type.
The AnnotationData
ParameterValueData
Instances of the AnnotationTypeData
ParameterValueData
IntegerParameterValueData
StringParameterValueData
The itemTypes collection holds the codes for the types of items the annotation type can be used on. This is checked when new annotations are created but already existing annotations are not affected if the collection is modified.
Annotation types with the protocolParameter flag set are treated a bit differently. They will not show up as annotations to items with a type found in the itemTypes collection. A protocol parameter should be attached to a protocol. Then, when an item is using that protocol it becomes possible to add annotation values for the annotation types specified as protocol parameters. It doesn't matter if the item's type is found in the itemTypes collection or not.
The options collection is used to store additional options required by some of the value types, for example a max string length for string annotations or the max and min allowed value for integer annotations.
The enumeration property is a boolean flag indicating if the allowed values are predefined as an enumeration. In that case those values are found in the enumerationValues property. The actual subclass is determined by the valueType property.
Most of the other properties are hints to client applications how to render the input field for the annotation.
The AnnotationTypeCategoryData