ActiveAnno

Web-based responsive document annotation tool

View the Project on GitHub MaxMello/ActiveAnno

activeannoservice / annotationdefinition / HierarchicalTagSetAnnotationDefinition

HierarchicalTagSetAnnotationDefinition

class HierarchicalTagSetAnnotationDefinition : AnnotationDefinition

Annotation definition which requests the annotator to chose from a set of predefined TagSetOptions

Types

Name Summary
HierarchicalTagSetOption Option for a hierarchical tag set.data class HierarchicalTagSetOption

Constructors

Name Summary
<init> Annotation definition which requests the annotator to chose from a set of predefined TagSetOptionsHierarchicalTagSetAnnotationDefinition(id: AnnotationID, name: String, shortName: String?, createdTimestamp: Long = System.currentTimeMillis(), minNumberOfTags: Int = 1, maxNumberOfTags: Int? = null, requireDeepestLevel: Boolean = false, options: List<HierarchicalTagSetOption>)

Properties

Name Summary
maxNumberOfTags var maxNumberOfTags: Int?
minNumberOfTags var minNumberOfTags: Int
options val options: List<HierarchicalTagSetOption>
requireDeepestLevel Prevents chosing higher level options when those options have any childrenval requireDeepestLevel: Boolean

Functions

Name Summary
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.fun updateModel(newAnnotationDefinition: AnnotationDefinition): Unit
validateAnnotation Validate an annotation based on the defined constraints, needs to be implemented by every subclass.fun validateAnnotation(annotations: AnnotationMap, target: Target, locale: Locale?): ValidationError?

Extension Functions

Name Summary
getAllOptions fun HierarchicalTagSetAnnotationDefinition.getAllOptions(): List<HierarchicalTagSetOption>
getOptionsDeepestLevel fun HierarchicalTagSetAnnotationDefinition.getOptionsDeepestLevel(): List<HierarchicalTagSetOption>