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.base;
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.MaintenanceEvent;
27 import eu.ehri.project.models.AccessPoint;
28 import eu.ehri.project.models.UnknownProperty;
29 import eu.ehri.project.models.annotations.Dependent;
30 import eu.ehri.project.models.annotations.Fetch;
31 import eu.ehri.project.models.annotations.Indexed;
32 import eu.ehri.project.models.annotations.Mandatory;
33
34
35
36
37
38 public interface Description extends Named, Accessible {
39
40
41
42
43
44 enum CreationProcess {
45 MANUAL, IMPORT
46 }
47
48 @Mandatory
49 @Adjacency(label = Ontology.DESCRIPTION_FOR_ENTITY)
50 Described getEntity();
51
52 @Mandatory
53 @Property(Ontology.LANGUAGE_OF_DESCRIPTION)
54 String getLanguageOfDescription();
55
56 @Indexed
57 @Property(Ontology.IDENTIFIER_KEY)
58 String getDescriptionCode();
59
60 @Indexed
61 @Property(Ontology.CREATION_PROCESS)
62 CreationProcess getCreationProcess();
63
64
65
66
67
68
69 @Fetch(value = Ontology.DESCRIPTION_FOR_ENTITY, ifLevel =0)
70 @Adjacency(label = Ontology.DESCRIPTION_FOR_ENTITY)
71 Described getDescribedEntity();
72
73 @Dependent
74 @Fetch(value = Ontology.HAS_MAINTENANCE_EVENT, whenNotLite = true)
75 @Adjacency(label = Ontology.HAS_MAINTENANCE_EVENT, direction=Direction.IN)
76 Iterable<MaintenanceEvent> getMaintenanceEvents();
77
78 @Adjacency(label = Ontology.HAS_MAINTENANCE_EVENT, direction=Direction.IN)
79 void setMaintenanceEvents(Iterable<MaintenanceEvent> maintenanceEvents);
80
81 @Adjacency(label = Ontology.HAS_MAINTENANCE_EVENT, direction=Direction.IN)
82 void addMaintenanceEvent(MaintenanceEvent maintenanceEvent);
83
84 @Dependent
85 @Fetch(value = Ontology.HAS_ACCESS_POINT, whenNotLite = true)
86 @Adjacency(label = Ontology.HAS_ACCESS_POINT)
87 Iterable<AccessPoint> getAccessPoints();
88
89 @Adjacency(label = Ontology.HAS_ACCESS_POINT)
90 void addAccessPoint(AccessPoint accessPoint);
91
92 @Dependent
93 @Fetch(value = Ontology.HAS_UNKNOWN_PROPERTY, ifLevel = 1, whenNotLite = true)
94 @Adjacency(label = Ontology.HAS_UNKNOWN_PROPERTY)
95 Iterable<UnknownProperty> getUnknownProperties();
96 }