View Javadoc

1   /*
2    * Copyright 2015 Data Archiving and Networked Services (an institute of
3    * Koninklijke Nederlandse Akademie van Wetenschappen), King's College London,
4    * Georg-August-Universitaet Goettingen Stiftung Oeffentlichen Rechts
5    *
6    * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by
7    * the European Commission - subsequent versions of the EUPL (the "Licence");
8    * You may not use this work except in compliance with the Licence.
9    * You may obtain a copy of the Licence at:
10   *
11   * https://joinup.ec.europa.eu/software/page/eupl
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the Licence is distributed on an "AS IS" basis,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the Licence for the specific language governing
17   * permissions and limitations under the Licence.
18   */
19  
20  package eu.ehri.project.definitions;
21  
22  /**
23   * The Ontology contains String constants for properties of graph nodes,
24   * some of which will be stored inside nodes as properties and other
25   * properties that will be used as labels for links between nodes.
26   */
27  public class Ontology {
28      public static final String DOC_HELD_BY_REPOSITORY = "heldBy";
29      public static final String REPOSITORY_HAS_COUNTRY = "hasCountry";
30      public static final String DESCRIPTION_FOR_ENTITY = "describes";
31      public static final String HAS_MAINTENANCE_EVENT = "maintenance"; //links to MaintenanceEvent
32      public static final String HAS_ACCESS_POINT = "relatesTo"; //links to UndeterminedRelationship
33      public static final String HAS_UNKNOWN_PROPERTY = "hasUnknownProperty";
34  
35      // Address
36      public static final String ENTITY_HAS_ADDRESS = "hasAddress";
37  
38      // Properties
39      public static final String CREATION_PROCESS = "creationProcess";
40      public static final String LANGUAGE_OF_DESCRIPTION = "languageCode";
41      public static final String LANGUAGE = LANGUAGE_OF_DESCRIPTION; //"languageCode";
42  
43      public static final String ACCESS_POINT_TYPE = "type";
44  
45      // Links
46      public static final String LINK_HAS_BODY = "hasLinkBody";
47      public static final String LINK_HAS_TARGET = "hasLinkTarget";
48      public static final String LINK_HAS_LINKER = "hasLinker";
49      public static final String LINK_HAS_TYPE = "type";
50      public static final String LINK_HAS_FIELD = "field";
51      public static final String LINK_HAS_DESCRIPTION = "description";
52      public static final String LINK_HAS_CONTEXT = "inContextOf"; // points to a TL virtual unit
53  
54      public static final String HAS_PERMISSION_SCOPE = "hasPermissionScope";
55      public static final String IS_ACCESSIBLE_TO = "access";
56      public static final String IDENTIFIER_KEY = "identifier";
57      public static final String OTHER_IDENTIFIERS = "otherIdentifiers";
58      public static final String SOURCEFILE_KEY = "sourceFileId";
59      public static final String NAME_KEY = "name";
60      public static final String URI_KEY = "uri";
61      public static final String PREFLABEL = NAME_KEY; //"prefLabel";
62  
63      public static final String DOC_IS_CHILD_OF = "childOf";
64  
65      public static final String HISTORICAL_AGENT_CREATED = "created";
66  
67      // Permission grants
68      public static final String PERMISSION_GRANT_HAS_GRANTEE = "hasGrantee";
69      public static final String PERMISSION_GRANT_HAS_SUBJECT = "hasAccessor";
70      public static final String PERMISSION_GRANT_HAS_PERMISSION = "hasPermission";
71      public static final String PERMISSION_GRANT_HAS_SCOPE = "hasScope";
72      public static final String PERMISSION_GRANT_HAS_TARGET = "hasTarget";
73  
74      // Annotations
75      public static final String ANNOTATES = "annotates";
76      public static final String ANNOTATES_PART = "annotatesPart";
77      public static final String ANNOTATOR_HAS_ANNOTATION = "hasAnnotation";
78      public static final String ANNOTATION_ANNOTATES = "hasAnnotationTarget";
79      public static final String ANNOTATION_ANNOTATES_PART = "hasAnnotationTargetPart";
80      public static final String ANNOTATION_HAS_SOURCE = "hasAnnotationBody";
81      public static final String ANNOTATION_NOTES_BODY = "body";
82      public static final String ANNOTATION_FIELD = "field";
83      public static final String ANNOTATION_TYPE = "annotationType";
84  
85      // Annotation/Link promotion
86      public static final String IS_PROMOTABLE = "isPromotable";
87      public static final String PROMOTED_BY = "promotedBy";
88      public static final String DEMOTED_BY = "demotedBy";
89  
90      // Users/groups
91      public static final String ACCESSOR_BELONGS_TO_GROUP = "belongsTo";
92  
93      // Dates
94      public static final String ENTITY_HAS_DATE = "hasDate";
95      public static final String DATE_PERIOD_START_DATE = "startDate";
96      public static final String DATE_PERIOD_END_DATE = "endDate";
97      public static final String DATE_PERIOD_TYPE = "type";
98      public static final String DATE_HAS_DESCRIPTION = "description";
99  
100     public static final String ITEM_IN_AUTHORITATIVE_SET = "inAuthoritativeSet";
101 
102     // Concepts!
103     public static final String CONCEPT_HAS_BROADER = "broader";
104     public static final String CONCEPT_HAS_NARROWER = "narrower";
105     public static final String CONCEPT_HAS_RELATED = "related";
106 
107     // System events
108     public static final String ENTITY_HAS_EVENT = "hasEvent";
109     public static final String ACTION_HAS_EVENT = "actionHasEvent";
110     public static final String EVENT_HAS_ACTIONER = "hasActioner";
111     public static final String EVENT_HAS_SCOPE = "hasEventScope";
112     public static final String EVENT_TIMESTAMP = "timestamp";
113     public static final String EVENT_LOG_MESSAGE = "logMessage";
114     public static final String EVENT_TYPE = "eventType";
115     public static final String EVENT_HAS_FIRST_SUBJECT = "hasFirstSubject";
116     public static final String EVENT_PRIOR_VERSION = "priorVersion";
117     public static final String ACTIONER_HAS_LIFECYCLE_ACTION = "lifecycleAction";
118     public static final String ENTITY_HAS_LIFECYCLE_EVENT = "lifecycleEvent";
119 
120     // Versioning
121     public static final String ENTITY_HAS_PRIOR_VERSION = "hasPriorVersion";
122     public static final String VERSION_HAS_EVENT = "triggeredByEvent";
123     public static final String VERSION_ENTITY_CLASS = "entityType";
124     public static final String VERSION_ENTITY_ID = "entityId";
125     public static final String VERSION_ENTITY_DATA = "entityData";
126 
127     // Virtual collections
128     public static final String VC_IS_PART_OF = "isPartOf";
129     public static final String VC_HAS_AUTHOR = "hasAuthor";
130     public static final String VC_DESCRIBED_BY = "isDescribedBy";
131     public static final String VC_INCLUDES_UNIT = "includesUnit";
132     public static final String VC_IN_COLLECTION = "isInVirtualCollection";
133 
134     // User relationships
135     public static final String USER_FOLLOWS_USER = "isFollowing";
136     public static final String USER_BLOCKS_USER = "isBlocking";
137     public static final String USER_WATCHING_ITEM = "isWatching";
138 
139     // Maintenance events
140     public static final String MAINTENANCE_EVENT_TYPE = "eventType";
141     public static final String MAINTENANCE_EVENT_AGENT_TYPE = "agentType";
142 }