1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.model.taxon;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
import java.util.List;
|
14
|
import java.util.Map;
|
15
|
import java.util.UUID;
|
16
|
|
17
|
import javax.persistence.Entity;
|
18
|
import javax.xml.bind.annotation.XmlAccessType;
|
19
|
import javax.xml.bind.annotation.XmlAccessorType;
|
20
|
import javax.xml.bind.annotation.XmlRootElement;
|
21
|
import javax.xml.bind.annotation.XmlType;
|
22
|
|
23
|
import org.apache.log4j.Logger;
|
24
|
import org.hibernate.envers.Audited;
|
25
|
|
26
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
27
|
import eu.etaxonomy.cdm.model.common.RelationshipTermBase;
|
28
|
import eu.etaxonomy.cdm.model.common.TermType;
|
29
|
import eu.etaxonomy.cdm.model.common.TermVocabulary;
|
30
|
|
31
|
|
32
|
/**
|
33
|
* The class representing categories of {@link TaxonRelationship taxon relationships}
|
34
|
* (like "is congruent to" or "is misapplied name for").
|
35
|
* <P>
|
36
|
* A standard (ordered) list of taxon relationship type instances will be
|
37
|
* automatically created as the project starts. But this class allows to extend
|
38
|
* this standard list by creating new instances of additional taxon
|
39
|
* relationship types if needed.
|
40
|
* <P>
|
41
|
* This class corresponds in part to: <ul>
|
42
|
* <li> TaxonRelationshipTerm according to the TDWG ontology
|
43
|
* <li> RelationshipType according to the TCS
|
44
|
* </ul>
|
45
|
*
|
46
|
* @author m.doering
|
47
|
* @created 08-Nov-2007 13:06:17
|
48
|
*/
|
49
|
@XmlAccessorType(XmlAccessType.FIELD)
|
50
|
@XmlType(name = "TaxonRelationshipType")
|
51
|
@XmlRootElement(name = "TaxonRelationshipType")
|
52
|
@Entity
|
53
|
//@Indexed disabled to reduce clutter in indexes, since this type is not used by any search
|
54
|
//@Indexed(index = "eu.etaxonomy.cdm.model.common.DefinedTermBase")
|
55
|
@Audited
|
56
|
public class TaxonRelationshipType extends RelationshipTermBase<TaxonRelationshipType> {
|
57
|
private static final long serialVersionUID = 6575652105931691670L;
|
58
|
@SuppressWarnings("unused")
|
59
|
private static final Logger logger = Logger.getLogger(TaxonRelationshipType.class);
|
60
|
|
61
|
protected static Map<UUID, TaxonRelationshipType> termMap = null;
|
62
|
|
63
|
@Deprecated //will be removed in future versions. Use Classification/TaxonNode instead
|
64
|
private static final UUID uuidTaxonomicallyIncludedIn = UUID.fromString("d13fecdf-eb44-4dd7-9244-26679c05df1c");
|
65
|
|
66
|
private static final UUID uuidMisappliedNameFor = UUID.fromString("1ed87175-59dd-437e-959e-0d71583d8417");
|
67
|
private static final UUID uuidInvalidDesignationFor = UUID.fromString("605b1d01-f2b1-4544-b2e0-6f08def3d6ed");
|
68
|
|
69
|
private static final UUID uuidContradiction = UUID.fromString("a8f03491-2ad6-4fae-a04c-2a4c117a2e9b");
|
70
|
private static final UUID uuidCongruentTo = UUID.fromString("60974c98-64ab-4574-bb5c-c110f6db634d");
|
71
|
private static final UUID uuidIncludes = UUID.fromString("0501c385-cab1-4fbe-b945-fc747419bb13");
|
72
|
private static final UUID uuidOverlaps = UUID.fromString("2046a0fd-4fd6-45a1-b707-2b91547f3ec7");
|
73
|
private static final UUID uuidExcludes = UUID.fromString("4535a63c-4a3f-4d69-9350-7bf02e2c23be");
|
74
|
private static final UUID uuidDoesNotExclude = UUID.fromString("0e5099bb-87c0-400e-abdc-bcfed5b5eece");
|
75
|
private static final UUID uuidDoesNotOverlap = UUID.fromString("ecd2382b-3d94-4169-9dd2-2c4ea1d24605");
|
76
|
private static final UUID uuidNotIncludedIn = UUID.fromString("89dffa4e-e004-4d42-b0d1-ae1827529e43");
|
77
|
private static final UUID uuidNotCongruentTo = UUID.fromString("6c16c33b-cfc5-4a00-92bd-a9f9e448f389");
|
78
|
|
79
|
|
80
|
private static final UUID uuidCongruentToOrIncludes = UUID.fromString("b55cb3a2-6e20-4ca3-95bc-12b59d3235b0");
|
81
|
private static final UUID uuidIncludedInOrIncludes = UUID.fromString("c3ed5089-6779-4051-bb24-f5ea0eca80d5");
|
82
|
private static final UUID uuidCongruentIncludedInOrIncludes = UUID.fromString("0170cd83-93ad-43c2-9ad1-7ac879300e2f");
|
83
|
private static final UUID uuidCongruentToOrOverlaps = UUID.fromString("78355cfa-5200-432f-8e00-82b97afad0ed");
|
84
|
private static final UUID uuidIncludesOrOverlaps = UUID.fromString("f1ec567b-3c73-436b-8625-b4fd53588abb");
|
85
|
|
86
|
private static final UUID uuidCongruentToOrIncludesOrOverlaps = UUID.fromString("2d923b1a-6c0f-414c-ac9b-bbc502e18078");
|
87
|
private static final UUID uuidIncludedInOrIncludesOrOverlaps = UUID.fromString("43466aa9-e431-4f37-8bca-febfd9f63716");
|
88
|
private static final UUID uuidCongruentToOrExcludes = UUID.fromString("758e6cf3-05a0-49ed-9496-d8c4a9fd02ae");
|
89
|
private static final UUID uuidIncludesOrExcludes = UUID.fromString("6ee440bc-fd3d-4da2-ad85-906d35a94731");
|
90
|
private static final UUID uuidCongruentToOrIncludesOrExcludes = UUID.fromString("d5c6953d-aa53-46f8-aafc-ebc6428ad5d0");
|
91
|
private static final UUID uuidIncludedInOrIncludesOrExcludes = UUID.fromString("43d8492c-8bd5-4f38-a633-f1ad910a34dd");
|
92
|
private static final UUID uuidOverlapsOrExcludes = UUID.fromString("623ecdeb-ff1f-471d-a8dc-0d75b2fe8d94");
|
93
|
private static final UUID uuidCongruentToOrOverlapsOrExcludes = UUID.fromString("6fabef72-5264-44f1-bfc0-8e2e141375f2");
|
94
|
private static final UUID uuidIncludesOrOverlapsOrExcludes = UUID.fromString("b7153c89-cc6c-4f8c-bf74-216f10feac46");
|
95
|
|
96
|
private static final UUID uuidAllRelationships = UUID.fromString("831fcd88-e5c9-49e0-b06e-bbb67d1c05c9");
|
97
|
|
98
|
private static final UUID uuidUnclear = UUID.fromString("4c48ba25-c1d0-4bdd-9260-c1fa2e42a5d3");
|
99
|
private static final UUID uuidNotYetWorkedOn = UUID.fromString("8d47e59a-790d-428f-8060-01d443519166");
|
100
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
public static TaxonRelationshipType NewInstance(String term, String label, String labelAbbrev, boolean symmetric, boolean transitive) {
|
106
|
return new TaxonRelationshipType(term, label, labelAbbrev, symmetric, transitive);
|
107
|
}
|
108
|
|
109
|
|
110
|
//********************************** CONSTRUCTOR *********************************/
|
111
|
|
112
|
//for hibernate use only
|
113
|
@Deprecated
|
114
|
protected TaxonRelationshipType() {
|
115
|
super(TermType.TaxonRelationshipType);
|
116
|
}
|
117
|
/**
|
118
|
* Class constructor: creates an additional taxon relationship type
|
119
|
* instance with a description (in the {@link eu.etaxonomy.cdm.model.common.Language#DEFAULT() default language}), a label,
|
120
|
* a label abbreviation and the flags indicating whether this new taxon
|
121
|
* relationship type is symmetric and/or transitive.
|
122
|
*
|
123
|
* @param term the string (in the default language) describing the
|
124
|
* new taxon relationship type to be created
|
125
|
* @param label the string identifying the new taxon relationship
|
126
|
* type to be created
|
127
|
* @param labelAbbrev the string identifying (in abbreviated form) the
|
128
|
* new taxon relationship type to be created
|
129
|
* @param symmetric the boolean indicating whether the new taxon
|
130
|
* relationship type to be created is symmetric
|
131
|
* @param transitive the boolean indicating whether the new taxon
|
132
|
* relationship type to be created is transitive
|
133
|
* @see #TaxonRelationshipType()
|
134
|
*/
|
135
|
private TaxonRelationshipType(String term, String label, String labelAbbrev, boolean symmetric, boolean transitive) {
|
136
|
super(TermType.TaxonRelationshipType, term, label, labelAbbrev, symmetric, transitive);
|
137
|
}
|
138
|
|
139
|
|
140
|
//************************** METHODS ********************************
|
141
|
|
142
|
/* (non-Javadoc)
|
143
|
* @see eu.etaxonomy.cdm.model.common.DefinedTermBase#resetTerms()
|
144
|
*/
|
145
|
@Override
|
146
|
public void resetTerms(){
|
147
|
termMap = null;
|
148
|
}
|
149
|
|
150
|
|
151
|
protected static TaxonRelationshipType getTermByUuid(UUID uuid){
|
152
|
if (termMap == null || termMap.isEmpty()){
|
153
|
return getTermByClassAndUUID(TaxonRelationshipType.class, uuid);
|
154
|
} else {
|
155
|
return termMap.get(uuid);
|
156
|
}
|
157
|
}
|
158
|
|
159
|
|
160
|
/**
|
161
|
* Returns true, if this relationship type is not a <i>misapplied name for<i>
|
162
|
* and also no <i>taxonomically included in</i> relationship.<BR>
|
163
|
* It assumes that all other relationships are concept relationships.
|
164
|
* @return
|
165
|
*/
|
166
|
public boolean isConceptRelationship(){
|
167
|
if (this.equals(MISAPPLIED_NAME_FOR())){
|
168
|
return false;
|
169
|
}else if (this.equals(INVALID_DESIGNATION_FOR())){
|
170
|
return false;
|
171
|
}else if (this.equals(TAXONOMICALLY_INCLUDED_IN())){
|
172
|
return false;
|
173
|
}
|
174
|
return true;
|
175
|
}
|
176
|
|
177
|
/**
|
178
|
* Returns the taxon relationship type "is taxonomically included in". This
|
179
|
* indicates that the {@link TaxonRelationship#getFromTaxon() source taxon}
|
180
|
* in such a {@link TaxonRelationship taxon relationship} has the target {@link Taxon taxon}
|
181
|
* as immediate next higher parent within the classification. Generally
|
182
|
* the {@link Taxon#getSec() concept reference} of both taxa are the same
|
183
|
* except if the concept reference follows the taxonomical opinion of
|
184
|
* another reference.<BR>
|
185
|
* This type is neither symmetric nor transitive.
|
186
|
* @deprecated will be removed in version 3.0
|
187
|
*/
|
188
|
@Deprecated
|
189
|
public static final TaxonRelationshipType TAXONOMICALLY_INCLUDED_IN(){
|
190
|
return getTermByUuid(uuidTaxonomicallyIncludedIn);
|
191
|
}
|
192
|
/**
|
193
|
* Returns the taxon relationship type "is misapplied name for". This
|
194
|
* indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the {@link TaxonRelationship#getFromTaxon() source taxon}
|
195
|
* in such a {@link TaxonRelationship taxon relationship} has been erroneously used by
|
196
|
* the {@link TaxonBase#getSec() concept reference} to denominate the same real taxon
|
197
|
* as the one meant by the target {@link Taxon taxon}.<BR>
|
198
|
* This type is neither symmetric nor transitive.
|
199
|
*/
|
200
|
public static final TaxonRelationshipType MISAPPLIED_NAME_FOR(){
|
201
|
return getTermByUuid(uuidMisappliedNameFor);
|
202
|
}
|
203
|
/**
|
204
|
* Returns the taxon relationship type "is invalid designation for". This
|
205
|
* indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the {@link TaxonRelationship#getFromTaxon() source taxon}
|
206
|
* in such a {@link TaxonRelationship taxon relationship} has
|
207
|
* {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatusType#isInvalidType() not been validly published} but was intended to denominate
|
208
|
* a real taxon which is the same as the one meant by the target {@link Taxon taxon}.<BR>
|
209
|
* According to the nomenclature codes a not validly published taxon name is
|
210
|
* not a taxon name at all.<BR>
|
211
|
* This type is neither symmetric nor transitive.
|
212
|
*/
|
213
|
public static final TaxonRelationshipType INVALID_DESIGNATION_FOR(){
|
214
|
return getTermByUuid(uuidInvalidDesignationFor);
|
215
|
}
|
216
|
/**
|
217
|
* Returns the (concept) taxon relationship type "is impossible"
|
218
|
* (contradiction). This is a concept relationship type which means that the
|
219
|
* circumscriptions (the set of organisms/specimens that belong to a {@link Taxon taxon}
|
220
|
* according to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
221
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
222
|
* beeing compared. In a concept relationship the concept references of the
|
223
|
* involved taxa must be distinct. <BR>
|
224
|
* The "is impossible" (contradiction) taxon relationship type arises
|
225
|
* logically if two or more incompatible (concept) taxon relationships
|
226
|
* between the two taxa already exist (for instance with the types
|
227
|
* "is congruent to" and "excludes").<BR>
|
228
|
* This type is symmetric but not transitive.
|
229
|
*/
|
230
|
public static final TaxonRelationshipType CONTRADICTION(){
|
231
|
return getTermByUuid(uuidContradiction);
|
232
|
}
|
233
|
/**
|
234
|
* Returns the (concept) taxon relationship type "is congruent to".
|
235
|
* This is a concept relationship type which means that the circumscriptions
|
236
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
237
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
238
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
239
|
* beeing compared. In a concept relationship the concept references of the
|
240
|
* involved taxa must be distinct. <BR>
|
241
|
* The "is congruent to" taxon relationship type indicates that the
|
242
|
* circumscriptions of both taxa involved in the taxon relationship are
|
243
|
* identical.<BR>
|
244
|
* This type is symmetric and transitive.
|
245
|
*/
|
246
|
public static final TaxonRelationshipType CONGRUENT_TO(){
|
247
|
return getTermByUuid(uuidCongruentTo);
|
248
|
}
|
249
|
/**
|
250
|
* Returns the (concept) taxon relationship type "includes".
|
251
|
* This is a concept relationship type which means that the circumscriptions
|
252
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
253
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
254
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
255
|
* beeing compared. In a concept relationship the concept references of the
|
256
|
* involved taxa must be distinct. <BR>
|
257
|
* The "includes" taxon relationship type indicates that each element
|
258
|
* belonging to the circumscription of the target taxon involved in the
|
259
|
* taxon relationship belongs to the circumscription of the source taxon,
|
260
|
* but that some elements belonging to the circumscription of the source
|
261
|
* taxon do not belong to the circumscription of the target taxon.<BR>
|
262
|
* This type is not symmetric but transitive.
|
263
|
*/
|
264
|
public static final TaxonRelationshipType INCLUDES(){
|
265
|
return getTermByUuid(uuidIncludes);
|
266
|
}
|
267
|
/**
|
268
|
* Returns the (concept) taxon relationship type "overlaps".
|
269
|
* This is a concept relationship type which means that the circumscriptions
|
270
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
271
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
272
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
273
|
* beeing compared. In a concept relationship the concept references of the
|
274
|
* involved taxa must be distinct. <BR>
|
275
|
* The "overlaps" taxon relationship type indicates that both
|
276
|
* circumscriptions have common elements but that some elements belonging
|
277
|
* to the circumscription of the source taxon do not belong to the
|
278
|
* circumscription of the target taxon and vice-versa.<BR>
|
279
|
* This type is symmetric but not transitive.
|
280
|
*/
|
281
|
public static final TaxonRelationshipType OVERLAPS(){
|
282
|
return getTermByUuid(uuidOverlaps);
|
283
|
}
|
284
|
/**
|
285
|
* Returns the (concept) taxon relationship type "excludes".
|
286
|
* This is a concept relationship type which means that the circumscriptions
|
287
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
288
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
289
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
290
|
* beeing compared. In a concept relationship the concept references of the
|
291
|
* involved taxa must be distinct. <BR>
|
292
|
* The "excludes" taxon relationship type indicates that both
|
293
|
* circumscriptions have no common elements.<BR>
|
294
|
* This type is symmetric but not transitive.
|
295
|
*/
|
296
|
public static final TaxonRelationshipType EXCLUDES(){
|
297
|
return getTermByUuid(uuidExcludes);
|
298
|
}
|
299
|
/**
|
300
|
* Returns the (concept) taxon relationship type "does not exclude".
|
301
|
* This is a concept relationship type which means that the circumscriptions
|
302
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
303
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
304
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
305
|
* beeing compared. In a concept relationship the concept references of the
|
306
|
* involved taxa must be distinct. <BR>
|
307
|
* The "does not exclude" taxon relationship type indicates that both
|
308
|
* circumscriptions have common elements. This type is a generalisation of
|
309
|
* {@link #CONGRUENT_TO() "is congruent to"}, {@link #INCLUDES() "includes"} and {@link #OVERLAPS() "overlaps"}.<BR>
|
310
|
* This type is symmetric but not transitive.
|
311
|
*
|
312
|
* @see #EXCLUDES()
|
313
|
*/
|
314
|
public static final TaxonRelationshipType DOES_NOT_EXCLUDE(){
|
315
|
return getTermByUuid(uuidDoesNotExclude);
|
316
|
}
|
317
|
/**
|
318
|
* Returns the (concept) taxon relationship type "does not overlap".
|
319
|
* This is a concept relationship type which means that the circumscriptions
|
320
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
321
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
322
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
323
|
* beeing compared. In a concept relationship the concept references of the
|
324
|
* involved taxa must be distinct. <BR>
|
325
|
* The "does not overlap" taxon relationship type is a generalisation of
|
326
|
* {@link #CONGRUENT_TO() "is congruent to"}, {@link #INCLUDES() "includes"} and {@link #EXCLUDES() "excludes"}.<BR>
|
327
|
* This type is symmetric but not transitive.
|
328
|
*
|
329
|
* @see #OVERLAPS()
|
330
|
*/
|
331
|
public static final TaxonRelationshipType DOES_NOT_OVERLAP(){
|
332
|
return getTermByUuid(uuidDoesNotOverlap);
|
333
|
}
|
334
|
/**
|
335
|
* Returns the (concept) taxon relationship type "is not included in".
|
336
|
* This is a concept relationship type which means that the circumscriptions
|
337
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
338
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
339
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
340
|
* beeing compared. In a concept relationship the concept references of the
|
341
|
* involved taxa must be distinct. <BR>
|
342
|
* The "is not included in" taxon relationship type indicates that at least
|
343
|
* one element belonging to the circumscription of the source taxon involved
|
344
|
* in the taxon relationship does not belong to the circumscription of the
|
345
|
* target taxon. <BR>
|
346
|
* This type is neither symmetric nor transitive.
|
347
|
*
|
348
|
* @see #INCLUDES()
|
349
|
*/
|
350
|
public static final TaxonRelationshipType NOT_INCLUDED_IN(){
|
351
|
return getTermByUuid(uuidNotIncludedIn);
|
352
|
}
|
353
|
/**
|
354
|
* Returns the (concept) taxon relationship type "is not congruent to".
|
355
|
* This is a concept relationship type which means that the circumscriptions
|
356
|
* (the set of organisms/specimens that belong to a {@link Taxon taxon} according
|
357
|
* to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
|
358
|
* of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
|
359
|
* beeing compared. In a concept relationship the concept references of the
|
360
|
* involved taxa must be distinct. <BR>
|
361
|
* The "is not congruent to" taxon relationship type indicates that at least
|
362
|
* one element belonging to one of both circumscriptions does not belong to
|
363
|
* the other circumscription. This type is a generalisation of
|
364
|
* {@link #INCLUDES() "includes"}, {@link #OVERLAPS() "overlaps"} and {@link #EXCLUDES() "excludes"}.<BR>
|
365
|
* This type is symmetric but not transitive.
|
366
|
*
|
367
|
* @see #CONGRUENT_TO()
|
368
|
*/
|
369
|
public static final TaxonRelationshipType NOT_CONGRUENT_TO(){
|
370
|
return getTermByUuid(uuidNotCongruentTo);
|
371
|
}
|
372
|
|
373
|
public static final TaxonRelationshipType CONGRUENT_OR_INCLUDES(){
|
374
|
return getTermByUuid(uuidCongruentToOrIncludes);
|
375
|
}
|
376
|
public static final TaxonRelationshipType INCLUDED_OR_INCLUDES(){
|
377
|
return getTermByUuid(uuidIncludedInOrIncludes);
|
378
|
}
|
379
|
public static final TaxonRelationshipType CONGRUENT_OR_INCLUDED_OR_INCLUDES(){
|
380
|
return getTermByUuid(uuidCongruentIncludedInOrIncludes);
|
381
|
}
|
382
|
public static final TaxonRelationshipType CONGRUENT_OR_OVERLAPS(){
|
383
|
return getTermByUuid(uuidCongruentToOrOverlaps);
|
384
|
}
|
385
|
|
386
|
public static final TaxonRelationshipType INCLUDES_OR_OVERLAPS(){
|
387
|
return getTermByUuid(uuidIncludesOrOverlaps);
|
388
|
}
|
389
|
|
390
|
public static final TaxonRelationshipType CONGRUENT_OR_INCLUDES_OR_EXCLUDES(){
|
391
|
return getTermByUuid(uuidCongruentToOrIncludesOrExcludes);
|
392
|
}
|
393
|
|
394
|
public static final TaxonRelationshipType INCLUDES_OR_EXCLUDES(){
|
395
|
return getTermByUuid(uuidIncludesOrExcludes);
|
396
|
}
|
397
|
|
398
|
public static final TaxonRelationshipType CONGRUENT_OR_EXCLUDES(){
|
399
|
return getTermByUuid(uuidCongruentToOrExcludes);
|
400
|
}
|
401
|
|
402
|
public static final TaxonRelationshipType INCLUDED_OR_INCLUDES_OR_OVERLAPS(){
|
403
|
return getTermByUuid(uuidIncludedInOrIncludesOrOverlaps);
|
404
|
}
|
405
|
|
406
|
public static final TaxonRelationshipType CONGRUENT_OR_INCLUDES_OR_OVERLAPS(){
|
407
|
return getTermByUuid(uuidCongruentToOrIncludesOrOverlaps);
|
408
|
}
|
409
|
|
410
|
public static final TaxonRelationshipType INCLUDES_OR_OVERLAPS_OR_EXCLUDES(){
|
411
|
return getTermByUuid(uuidIncludesOrOverlapsOrExcludes);
|
412
|
}
|
413
|
|
414
|
public static final TaxonRelationshipType CONGRUENT_OR_OVERLAPS_OR_EXCLUDES(){
|
415
|
return getTermByUuid(uuidCongruentToOrOverlapsOrExcludes);
|
416
|
}
|
417
|
|
418
|
public static final TaxonRelationshipType OVERLAPS_OR_EXCLUDES(){
|
419
|
return getTermByUuid(uuidOverlapsOrExcludes);
|
420
|
}
|
421
|
|
422
|
public static final TaxonRelationshipType INCLUDED_OR_INCLUDES_OR_EXCLUDES(){
|
423
|
return getTermByUuid(uuidIncludedInOrIncludesOrExcludes);
|
424
|
}
|
425
|
|
426
|
public static final TaxonRelationshipType UNCLEAR(){
|
427
|
return getTermByUuid(uuidUnclear);
|
428
|
}
|
429
|
|
430
|
public static final TaxonRelationshipType NOT_YET_WORKED_ON(){
|
431
|
return getTermByUuid(uuidNotYetWorkedOn);
|
432
|
}
|
433
|
|
434
|
|
435
|
@Override
|
436
|
protected void setDefaultTerms(TermVocabulary<TaxonRelationshipType> termVocabulary) {
|
437
|
termMap = new HashMap<UUID, TaxonRelationshipType>();
|
438
|
for (TaxonRelationshipType term : termVocabulary.getTerms()){
|
439
|
termMap.put(term.getUuid(), term);
|
440
|
}
|
441
|
}
|
442
|
|
443
|
//TODO other relationshipTypes
|
444
|
|
445
|
public static final TaxonRelationshipType ALL_RELATIONSHIPS(){
|
446
|
return getTermByUuid(uuidAllRelationships);
|
447
|
}
|
448
|
|
449
|
@Override
|
450
|
public TaxonRelationshipType readCsvLine(Class<TaxonRelationshipType> termClass, List<String> csvLine, Map<UUID,DefinedTermBase> terms, boolean abbrevAsId) {
|
451
|
TaxonRelationshipType newInstance = super.readCsvLine(termClass, csvLine, terms, abbrevAsId);
|
452
|
|
453
|
newInstance.setSymbol(newInstance.getIdInVocabulary());
|
454
|
String inverseLabelAbbrev = csvLine.get(7).trim();
|
455
|
newInstance.setInverseSymbol(inverseLabelAbbrev);
|
456
|
return newInstance;
|
457
|
}
|
458
|
}
|