ActiveAnno

Web-based responsive document annotation tool

View the Project on GitHub MaxMello/ActiveAnno

activeannoservice / project / Project

Project

data class Project

Complete model of a project. This model represents the database structure / is stored in mongoDB

Constructors

Name Summary
<init> Complete model of a project. This model represents the database structure / is stored in mongoDBProject(id: ProjectID, name: String, description: String = "", creator: UserIdentifier, creationTimestamp: Long = System.currentTimeMillis(), updateTimestamp: Long = System.currentTimeMillis(), priority: Int, active: Boolean, userRoles: UserRoles, inputMapping: InputMapping, filter: FilterCondition?, sort: Sort, selection: DocumentSelection = DocumentSelection(), annotationSchema: AnnotationSchema, layout: Layout, policy: Policy, export: Export, createProjectSpecificIndexes: Boolean = false)

Properties

Name Summary
active Flag indicating if the project is active or not - only active projects will be used for annotation / curation.var active: Boolean
annotationSchema val annotationSchema: AnnotationSchema
createProjectSpecificIndexes Should indexes be created for documents of this project. Should be set to true if you have lots of relevant documents (thousands+) for better performanceval createProjectSpecificIndexes: Boolean
creationTimestamp val creationTimestamp: Long
creator Initial creator of the projectval creator: UserIdentifier
description Longer description of the project, can be displayed in the UI and should be useful for annotators to read.var description: String
export val export: Export
filter If the filter is null, the Project is a one-off project and will use the project ID to filter documents with a matching restricted projectval filter: FilterCondition?
id DB id (auto-generated after storing / will be not-null when retrieved from DB)val id: ProjectID
inputMapping val inputMapping: InputMapping
layout val layout: Layout
name Short, descriptive name of projectvar name: String
policy val policy: Policy
priority An integer value indicating the priority of the project - will be used to sort project (higher = more important)var priority: Int
selection val selection: DocumentSelection
sort val sort: Sort
updateTimestamp val updateTimestamp: Long
userRoles val userRoles: UserRoles

Extension Functions

Name Summary
generateMissingAnnotationsForAllDocumentsBulk Given a Project, generate missing annotations for all documents for the project and update the documents. This method does it multiple chunks, given a size parametersuspend fun Project.generateMissingAnnotationsForAllDocumentsBulk(chuckSize: Int = 100, limit: Int = Int.MAX_VALUE): Unit
getFilterConditions Get the filterCondition to use for a Project. If the project is null, it is treated as a restricted project and the ID will be used to filter for restrictedProject from documents. Else, the method will make sure that no restricted document for another project will be accidentally included for this project.fun Project.getFilterConditions(): Array<FilterCondition>
toAnnotateProject Convert a Project to an AnnotateProject, doing some operations to enrich the project data to be able to use it for annotation. For example, if an OpenTagAnnotation is present, this method might aggregate the existing values from all documents of the project and add it to the AnnotateProject.suspend fun Project.toAnnotateProject(userIdentifier: UserIdentifier, userIsCurator: Boolean = false): AnnotateProject
toListProject Convert a Project to a ListProjectfun Project.toListProject(): ListProject
toManageListProject Convert a Project to a ManageListProjectfun Project.toManageListProject(): ManageListProject
toManageProject Convert a Project to a ManageProjectfun Project.toManageProject(): ManageProject