ActiveAnno

Web-based responsive document annotation tool

View the Project on GitHub MaxMello/ActiveAnno

activeannoservice / annotationdefinition / AnnotationDefinition

AnnotationDefinition

abstract class AnnotationDefinition

Base class for all AnnotationDefinitions. An AnnotationDefinition defines how an annotation is required to be created, e.g. on which target it is defined, is it optional, maximum length etc.

Constructors

Name Summary
<init> Base class for all AnnotationDefinitions. An AnnotationDefinition defines how an annotation is required to be created, e.g. on which target it is defined, is it optional, maximum length etc.AnnotationDefinition(id: AnnotationID, name: String, shortName: String?, createdTimestamp: Long)

Properties

Name Summary
createdTimestamp val createdTimestamp: Long
id Explicit ID identifying an annotation definition.val id: AnnotationID
name The primary, human readable name of the annotation. Should be clear, but not too long. Additional explanations might be given via Layout elements, but in the best case, that would not be necessary. For example “Sentiment score” for sentiment, or “Contains personal data” for a boolean annotation.var name: String
shortName Shorter version of name, optional. If present, will be used for UI elements with limited space, i.e. for inline span labelsvar shortName: String?

Functions

Name Summary
equals open fun equals(other: Any?): Boolean
hashCode open fun hashCode(): Int
toString open fun toString(): String
transformGeneratedAnnotation Can transform a generated annotation into a annotation result annotation. For example, apply minimum probabilities or max. number of answers given the annotationDefinitionopen fun transformGeneratedAnnotation(annotation: Annotation<*>): Annotation<*>
updateModel Update the database model of an instance from a new instance. This should be used to control which fields are updatable through the API and which are not.open fun updateModel(newAnnotationDefinition: AnnotationDefinition): Unit
validateAnnotation Validate an annotation based on the defined constraints, needs to be implemented by every subclass.abstract fun validateAnnotation(annotations: AnnotationMap, target: Target, locale: Locale? = null): ValidationError?

Inheritors

Name Summary
BooleanAnnotationDefinition Annotation for a boolean input.class BooleanAnnotationDefinition : AnnotationDefinition
ClosedNumberAnnotationDefinition Annotation for a closed number with a min, max and required step. Necessary if you want to display annotation as a slider.class ClosedNumberAnnotationDefinition : AnnotationDefinition
HierarchicalTagSetAnnotationDefinition Annotation definition which requests the annotator to chose from a set of predefined TagSetOptionsclass HierarchicalTagSetAnnotationDefinition : AnnotationDefinition
NumberRangeAnnotationDefinition A number range between min and max with step steps between. Results in two values, a lower and upper value.class NumberRangeAnnotationDefinition : AnnotationDefinition
OpenNumberAnnotationDefinition Annotation for an unrestricted number. Cannot be displayed as a slider, only number input.class OpenNumberAnnotationDefinition : AnnotationDefinition
OpenTagAnnotationDefinition Tags annotation with the ability to add new tags from the user. Here, the tag is just a string / the value is the actual stringclass OpenTagAnnotationDefinition : AnnotationDefinition
OpenTextAnnotationDefinition Annotation for some open text inputclass OpenTextAnnotationDefinition : AnnotationDefinition
TagSetAnnotationDefinition Annotation definition which requests the annotator to chose from a set of predefined TagSetOptionsclass TagSetAnnotationDefinition : AnnotationDefinition