1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package eu.ehri.project.models;
21
22 import com.tinkerpop.blueprints.Direction;
23 import com.tinkerpop.frames.Adjacency;
24 import com.tinkerpop.frames.Property;
25 import eu.ehri.project.definitions.Ontology;
26 import eu.ehri.project.models.annotations.EntityType;
27 import eu.ehri.project.models.annotations.Fetch;
28 import eu.ehri.project.models.annotations.Mandatory;
29 import eu.ehri.project.models.base.Annotatable;
30 import eu.ehri.project.models.base.Promotable;
31
32
33
34
35 @EntityType(EntityClass.ANNOTATION)
36 public interface Annotation extends Promotable {
37
38
39
40
41
42
43 @Fetch(Ontology.ANNOTATION_ANNOTATES)
44 @Adjacency(label = Ontology.ANNOTATION_ANNOTATES, direction = Direction.IN)
45 Iterable<Annotation> getAnnotations();
46
47
48
49
50
51
52 @Fetch(value = Ontology.ANNOTATOR_HAS_ANNOTATION, numLevels = 0)
53 @Adjacency(label = Ontology.ANNOTATOR_HAS_ANNOTATION, direction = Direction.IN)
54 UserProfile getAnnotator();
55
56
57
58
59
60
61 @Adjacency(label = Ontology.ANNOTATOR_HAS_ANNOTATION, direction = Direction.IN)
62 void setAnnotator(UserProfile annotator);
63
64
65
66
67
68
69
70 @Fetch(value = Ontology.ANNOTATES_PART, numLevels = 1)
71 @Adjacency(label = Ontology.ANNOTATION_ANNOTATES_PART)
72 Iterable<Annotatable> getTargetParts();
73
74
75
76
77
78
79 @Fetch(value = Ontology.ANNOTATES, numLevels = 1)
80 @Adjacency(label = Ontology.ANNOTATION_ANNOTATES)
81 Iterable<Annotatable> getTargets();
82
83
84
85
86
87
88 @Mandatory
89 @Property(Ontology.ANNOTATION_NOTES_BODY)
90 String getBody();
91 }