blob: 35ee11d91020f466f99c610a814c4191f7caa0f7 [file] [log] [blame]
margaretha543f2002017-07-14 00:27:15 +02001package de.ids_mannheim.korap.entity;
2
margaretha50179c82017-07-20 15:36:05 +02003import javax.persistence.Column;
margaretha543f2002017-07-14 00:27:15 +02004import javax.persistence.Entity;
5import javax.persistence.GeneratedValue;
6import javax.persistence.GenerationType;
7import javax.persistence.Id;
8import javax.persistence.Table;
9
10import lombok.Getter;
11import lombok.Setter;
12
margaretha51e5e3f2018-10-17 15:10:03 +020013/**
14 * Describes annotation tags available in the system / used in
15 * annotating corpus data.
margaretha08bdabe2017-10-17 14:38:49 +020016 *
margaretha51e5e3f2018-10-17 15:10:03 +020017 * @author margaretha
margaretha08bdabe2017-10-17 14:38:49 +020018 *
19 */
margaretha543f2002017-07-14 00:27:15 +020020@Setter
margarethae353dfa2017-07-18 19:23:29 +020021@Getter
margaretha543f2002017-07-14 00:27:15 +020022@Entity
23@Table(name = "annotation")
24public class Annotation {
margarethae353dfa2017-07-18 19:23:29 +020025
margaretha543f2002017-07-14 00:27:15 +020026 @Id
27 @GeneratedValue(strategy = GenerationType.IDENTITY)
28 private int id;
margarethaa14f1c22017-07-19 18:51:04 +020029 private String code;
margaretha543f2002017-07-14 00:27:15 +020030 private String type;
margaretha51e5e3f2018-10-17 15:10:03 +020031 private String text;
margaretha543f2002017-07-14 00:27:15 +020032 private String description;
margaretha50179c82017-07-20 15:36:05 +020033 @Column(name = "de_description")
34 private String germanDescription;
35
margaretha3da7cd32018-10-22 17:42:52 +020036 public Annotation () {}
37
38 public Annotation (String code, String type, String text,
39 String description) {
40 this.code = code;
41 this.type = type;
42 this.text = text;
43 this.description = description;
44 }
45
margarethae353dfa2017-07-18 19:23:29 +020046 @Override
47 public String toString () {
margarethaa14f1c22017-07-19 18:51:04 +020048 return "id=" + id + ", code= " + code + ", type= " + type
margaretha50179c82017-07-20 15:36:05 +020049 + ", description=" + description + ", germanDescription="
50 + germanDescription;
margarethae353dfa2017-07-18 19:23:29 +020051 }
margaretha543f2002017-07-14 00:27:15 +020052}