2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.taxon
;
12 import java
.util
.HashMap
;
13 import java
.util
.HashSet
;
14 import java
.util
.List
;
17 import java
.util
.UUID
;
19 import javax
.persistence
.Entity
;
20 import javax
.xml
.bind
.annotation
.XmlAccessType
;
21 import javax
.xml
.bind
.annotation
.XmlAccessorType
;
22 import javax
.xml
.bind
.annotation
.XmlRootElement
;
23 import javax
.xml
.bind
.annotation
.XmlType
;
25 import org
.apache
.log4j
.Logger
;
26 import org
.hibernate
.envers
.Audited
;
28 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
29 import eu
.etaxonomy
.cdm
.model
.common
.RelationshipTermBase
;
30 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
31 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
35 * The class representing categories of {@link TaxonRelationship taxon relationships}
36 * (like "is congruent to" or "is misapplied name for").
38 * A standard (ordered) list of taxon relationship type instances will be
39 * automatically created as the project starts. But this class allows to extend
40 * this standard list by creating new instances of additional taxon
41 * relationship types if needed.
43 * This class corresponds in part to: <ul>
44 * <li> TaxonRelationshipTerm according to the TDWG ontology
45 * <li> RelationshipType according to the TCS
49 * @since 08-Nov-2007 13:06:17
51 @XmlAccessorType(XmlAccessType
.FIELD
)
52 @XmlType(name
= "TaxonRelationshipType")
53 @XmlRootElement(name
= "TaxonRelationshipType")
55 //@Indexed disabled to reduce clutter in indexes, since this type is not used by any search
56 //@Indexed(index = "eu.etaxonomy.cdm.model.common.DefinedTermBase")
58 public class TaxonRelationshipType
extends RelationshipTermBase
<TaxonRelationshipType
> {
59 private static final long serialVersionUID
= 6575652105931691670L;
60 @SuppressWarnings("unused")
61 private static final Logger logger
= Logger
.getLogger(TaxonRelationshipType
.class);
63 protected static Map
<UUID
, TaxonRelationshipType
> termMap
= null;
65 @Deprecated //will be removed in future versions. Use Classification/TaxonNode instead
66 private static final UUID uuidTaxonomicallyIncludedIn
= UUID
.fromString("d13fecdf-eb44-4dd7-9244-26679c05df1c");
68 private static final UUID uuidMisappliedNameFor
= UUID
.fromString("1ed87175-59dd-437e-959e-0d71583d8417");
69 private static final UUID uuidProParteMisappliedNameFor
= UUID
.fromString("b59b4bd2-11ff-45d1-bae2-146efdeee206");
70 private static final UUID uuidPartialMisappliedNameFor
= UUID
.fromString("859fb615-b0e8-440b-866e-8a19f493cd36");
71 public static final UUID uuidProParteSynonymFor
= UUID
.fromString("8a896603-0fa3-44c6-9cd7-df2d8792e577");
72 public static final UUID uuidPartialSynonymFor
= UUID
.fromString("9d7a5e56-973c-474c-b6c3-a1cb00833a3c");
73 private static final UUID uuidInvalidDesignationFor
= UUID
.fromString("605b1d01-f2b1-4544-b2e0-6f08def3d6ed");
75 private static final UUID uuidContradiction
= UUID
.fromString("a8f03491-2ad6-4fae-a04c-2a4c117a2e9b");
76 private static final UUID uuidCongruentTo
= UUID
.fromString("60974c98-64ab-4574-bb5c-c110f6db634d");
77 private static final UUID uuidIncludes
= UUID
.fromString("0501c385-cab1-4fbe-b945-fc747419bb13");
78 private static final UUID uuidOverlaps
= UUID
.fromString("2046a0fd-4fd6-45a1-b707-2b91547f3ec7");
79 private static final UUID uuidExcludes
= UUID
.fromString("4535a63c-4a3f-4d69-9350-7bf02e2c23be");
80 private static final UUID uuidDoesNotExclude
= UUID
.fromString("0e5099bb-87c0-400e-abdc-bcfed5b5eece");
81 private static final UUID uuidDoesNotOverlap
= UUID
.fromString("ecd2382b-3d94-4169-9dd2-2c4ea1d24605");
82 private static final UUID uuidNotIncludedIn
= UUID
.fromString("89dffa4e-e004-4d42-b0d1-ae1827529e43");
83 private static final UUID uuidNotCongruentTo
= UUID
.fromString("6c16c33b-cfc5-4a00-92bd-a9f9e448f389");
86 private static final UUID uuidCongruentToOrIncludes
= UUID
.fromString("b55cb3a2-6e20-4ca3-95bc-12b59d3235b0");
87 private static final UUID uuidIncludedInOrIncludes
= UUID
.fromString("c3ed5089-6779-4051-bb24-f5ea0eca80d5");
88 private static final UUID uuidCongruentIncludedInOrIncludes
= UUID
.fromString("0170cd83-93ad-43c2-9ad1-7ac879300e2f");
89 private static final UUID uuidCongruentToOrOverlaps
= UUID
.fromString("78355cfa-5200-432f-8e00-82b97afad0ed");
90 private static final UUID uuidIncludesOrOverlaps
= UUID
.fromString("f1ec567b-3c73-436b-8625-b4fd53588abb");
92 private static final UUID uuidCongruentToOrIncludesOrOverlaps
= UUID
.fromString("2d923b1a-6c0f-414c-ac9b-bbc502e18078");
93 private static final UUID uuidIncludedInOrIncludesOrOverlaps
= UUID
.fromString("43466aa9-e431-4f37-8bca-febfd9f63716");
94 private static final UUID uuidCongruentToOrExcludes
= UUID
.fromString("758e6cf3-05a0-49ed-9496-d8c4a9fd02ae");
95 private static final UUID uuidIncludesOrExcludes
= UUID
.fromString("6ee440bc-fd3d-4da2-ad85-906d35a94731");
96 private static final UUID uuidCongruentToOrIncludesOrExcludes
= UUID
.fromString("d5c6953d-aa53-46f8-aafc-ebc6428ad5d0");
97 private static final UUID uuidIncludedInOrIncludesOrExcludes
= UUID
.fromString("43d8492c-8bd5-4f38-a633-f1ad910a34dd");
98 private static final UUID uuidOverlapsOrExcludes
= UUID
.fromString("623ecdeb-ff1f-471d-a8dc-0d75b2fe8d94");
99 private static final UUID uuidCongruentToOrOverlapsOrExcludes
= UUID
.fromString("6fabef72-5264-44f1-bfc0-8e2e141375f2");
100 private static final UUID uuidIncludesOrOverlapsOrExcludes
= UUID
.fromString("b7153c89-cc6c-4f8c-bf74-216f10feac46");
102 private static final UUID uuidAllRelationships
= UUID
.fromString("831fcd88-e5c9-49e0-b06e-bbb67d1c05c9");
104 private static final UUID uuidUnclear
= UUID
.fromString("4c48ba25-c1d0-4bdd-9260-c1fa2e42a5d3");
105 private static final UUID uuidNotYetWorkedOn
= UUID
.fromString("8d47e59a-790d-428f-8060-01d443519166");
111 public static TaxonRelationshipType
NewInstance(String term
, String label
, String labelAbbrev
, boolean symmetric
, boolean transitive
) {
112 return new TaxonRelationshipType(term
, label
, labelAbbrev
, symmetric
, transitive
);
116 //********************************** CONSTRUCTOR *********************************/
119 * @deprecated for inner (hibernate) use only
122 protected TaxonRelationshipType() {
123 super(TermType
.TaxonRelationshipType
);
126 * Class constructor: creates an additional taxon relationship type
127 * instance with a description (in the {@link eu.etaxonomy.cdm.model.common.Language#DEFAULT() default language}), a label,
128 * a label abbreviation and the flags indicating whether this new taxon
129 * relationship type is symmetric and/or transitive.
131 * @param term the string (in the default language) describing the
132 * new taxon relationship type to be created
133 * @param label the string identifying the new taxon relationship
135 * @param labelAbbrev the string identifying (in abbreviated form) the
136 * new taxon relationship type to be created
137 * @param symmetric the boolean indicating whether the new taxon
138 * relationship type to be created is symmetric
139 * @param transitive the boolean indicating whether the new taxon
140 * relationship type to be created is transitive
141 * @see #TaxonRelationshipType()
143 private TaxonRelationshipType(String term
, String label
, String labelAbbrev
, boolean symmetric
, boolean transitive
) {
144 super(TermType
.TaxonRelationshipType
, term
, label
, labelAbbrev
, symmetric
, transitive
);
148 //************************** METHODS ********************************
151 public void resetTerms(){
156 protected static TaxonRelationshipType
getTermByUuid(UUID uuid
){
157 if (termMap
== null || termMap
.isEmpty()){
158 return getTermByClassAndUUID(TaxonRelationshipType
.class, uuid
);
160 return termMap
.get(uuid
);
165 * <code>true</code> if this relationship type is {@link #isAnyMisappliedName()
166 * any of the misapplied name relationship types} or an
167 * {@link #INVALID_DESIGNATION_FOR() invalid designation}
169 * @see #isAnyMisappliedName()()
171 public boolean isMisappliedNameOrInvalidDesignation(){
172 if (this.isAnyMisappliedName()){
174 }else if (isInvalidDesignation()){
181 * <code>true</code> if this relationship type is an
182 * {@link #INVALID_DESIGNATION_FOR() invalid designation}
184 * @see #isAnyMisappliedName()()
186 public boolean isInvalidDesignation(){
187 if (this.equals(INVALID_DESIGNATION_FOR())){
194 * <code>true</code> if this relationship type is any
195 * of the misapplied name relationships such as
196 * {@link #MISAPPLIED_NAME_FOR()} or {@link #PRO_PARTE_MISAPPLIED_NAME_FOR()}
198 * @see #isMisappliedNameOrInvalidDesignation()
200 public boolean isAnyMisappliedName(){
201 return (allMisappliedNameTypes().contains(this));
206 * <code>true</code> if this relationship type is any
207 * of the pro parte or partial synonym relationship types
208 * {@link #PRO_PARTE_SYNONYM_FOR()} or {@link #PARTIAL_SYNONYM_FOR()}
210 * @see #isAnyMisappliedName()
212 public boolean isAnySynonym(){
213 return (allSynonymTypes().contains(this));
217 * <code>true</code> if this relationship type is either
218 * a pro parte synonym or a pro parte misapplied name relationship type
219 * {@link #PRO_PARTE_SYNONYM_FOR()} or {@link #PRO_PARTE_MISAPPLIED_NAME_FOR}
221 public boolean isProParte(){
222 return (allProParteTypes().contains(this));
226 * <code>true</code> if this relationship type is either
227 * a partial synonym or a partial misapplied name relationship type
228 * {@link #PARTIAL_SYNONYM_FOR()} or {@link #PARTIAL_MISAPPLIED_NAME_FOR}
232 public boolean isPartial(){
233 return (allPartialTypes().contains(this));
237 * Returns a list of all misapplied name relationship
238 * types such as "misapplied name for" and
239 * "pro parte misapplied name for".
241 * @see #MISAPPLIED_NAME_FOR()
242 * @see #PRO_PARTE_MISAPPLIED_NAME_FOR()
244 public static Set
<TaxonRelationshipType
> allMisappliedNameTypes(){
245 Set
<TaxonRelationshipType
> result
= new HashSet
<>();
246 result
.add(MISAPPLIED_NAME_FOR());
247 result
.add(PRO_PARTE_MISAPPLIED_NAME_FOR());
248 result
.add(PARTIAL_MISAPPLIED_NAME_FOR());
252 public static Set
<TaxonRelationshipType
> allSynonymTypes(){
253 Set
<TaxonRelationshipType
> result
= new HashSet
<>();
254 result
.add(PRO_PARTE_SYNONYM_FOR());
255 result
.add(PARTIAL_SYNONYM_FOR());
259 public static Set
<TaxonRelationshipType
> allProParteTypes(){
260 Set
<TaxonRelationshipType
> result
= new HashSet
<>();
261 result
.add(PRO_PARTE_SYNONYM_FOR());
262 result
.add(PRO_PARTE_MISAPPLIED_NAME_FOR());
266 public static Set
<TaxonRelationshipType
> allPartialTypes(){
267 Set
<TaxonRelationshipType
> result
= new HashSet
<>();
268 result
.add(PARTIAL_SYNONYM_FOR());
269 result
.add(PARTIAL_MISAPPLIED_NAME_FOR());
275 * Returns <code>true</code>, if this relationship type is not a <i>misapplied name for<i>
276 * and also no <i>taxonomically included in</i> relationship.<BR>
277 * It assumes that all other relationships are concept relationships.
280 public boolean isConceptRelationship(){
281 if (this.isMisappliedNameOrInvalidDesignation()){
283 }else if (this.equals(TAXONOMICALLY_INCLUDED_IN())){
290 * Returns the taxon relationship type "is taxonomically included in". This
291 * indicates that the {@link TaxonRelationship#getFromTaxon() source taxon}
292 * in such a {@link TaxonRelationship taxon relationship} has the target {@link Taxon taxon}
293 * as immediate next higher parent within the classification. Generally
294 * the {@link Taxon#getSec() concept reference} of both taxa are the same
295 * except if the concept reference follows the taxonomical opinion of
296 * another reference.<BR>
297 * This type is neither symmetric nor transitive.
298 * @deprecated will be removed in version 3.0
301 public static final TaxonRelationshipType
TAXONOMICALLY_INCLUDED_IN(){
302 return getTermByUuid(uuidTaxonomicallyIncludedIn
);
305 * Returns the taxon relationship type "is misapplied name for". This
306 * indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name}
307 * of the {@link TaxonRelationship#getFromTaxon() source taxon}
308 * in such a {@link TaxonRelationship taxon relationship} has been erroneously used by
309 * the {@link TaxonBase#getSec() concept reference} to denominate the same real taxon
310 * as the one meant by the target {@link Taxon taxon}.<BR>
311 * This type is neither symmetric nor transitive.
313 public static final TaxonRelationshipType
MISAPPLIED_NAME_FOR(){
314 return getTermByUuid(uuidMisappliedNameFor
);
317 * Returns the taxon relationship type "is pro parte misapplied name for". This
318 * indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the
319 * {@link TaxonRelationship#getFromTaxon() source taxon}
320 * in such a {@link TaxonRelationship taxon relationship} has been erroneously used by
321 * the {@link TaxonBase#getSec() concept reference} to (partly) denominate the same real taxon
322 * as the one meant by the target {@link Taxon taxon}. Additionaly another real taxon
323 * is (partly) denominated by the given name in the concept reference. Therefore it is called
325 * This type is neither symmetric nor transitive.
327 * @see #MISAPPLIED_NAME_FOR()
328 * @see #PRO_PARTE_SYNONYM_FOR()
330 public static final TaxonRelationshipType
PRO_PARTE_MISAPPLIED_NAME_FOR(){
331 return getTermByUuid(uuidProParteMisappliedNameFor
);
334 * Returns the taxon relationship type "is partial misapplied name for". This
335 * indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the
336 * {@link TaxonRelationship#getFromTaxon() source taxon}
337 * in such a {@link TaxonRelationship taxon relationship} has been erroneously used by
338 * the {@link TaxonBase#getSec() concept reference} to (partly) denominate the same real taxon
339 * as the one meant by the target {@link Taxon taxon}. In contrary to a
340 * {@link #PRO_PARTE_MISAPPLIED_NAME_FOR() pro parte misapplied name} no other real taxon
341 * is (partly) demoninated by the given name in the concept reference. Therefore it is called
343 * This type is neither symmetric nor transitive.
345 * @see #MISAPPLIED_NAME_FOR()
346 * @see #PRO_PARTE_MISAPPLIED_NAME_FOR()
347 * @see #PARTIAL_SYNONYM_FOR()
350 public static final TaxonRelationshipType
PARTIAL_MISAPPLIED_NAME_FOR(){
351 return getTermByUuid(uuidPartialMisappliedNameFor
);
354 * Returns the taxon relationship type "is pro parte synonym for". This
355 * indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the
356 * {@link TaxonRelationship#getFromTaxon() source taxon}
357 * in such a {@link TaxonRelationship taxon relationship} has been used as a
358 * pro parte synonym.<BR>
359 * This type is neither symmetric nor transitive.
361 * @see #PRO_PARTE_MISAPPLIED_NAME_FOR()
363 public static final TaxonRelationshipType
PRO_PARTE_SYNONYM_FOR(){
364 return getTermByUuid(uuidProParteSynonymFor
);
367 * Returns the taxon relationship type "is partial synonym for". This
368 * indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the
369 * {@link TaxonRelationship#getFromTaxon() source taxon}
370 * in such a {@link TaxonRelationship taxon relationship} has been used as a
371 * partial synonym.<BR>
372 * This type is neither symmetric nor transitive.
374 * @see #PRO_PARTE_SYNONYM_FOR()
375 * @see #PARTIAL_MISAPPLIED_NAME_FOR()
377 public static final TaxonRelationshipType
PARTIAL_SYNONYM_FOR(){
378 return getTermByUuid(uuidPartialSynonymFor
);
382 * Returns the taxon relationship type "is invalid designation for". This
383 * indicates that the {@link eu.etaxonomy.cdm.model.name.TaxonName taxon name} of the {@link TaxonRelationship#getFromTaxon() source taxon}
384 * in such a {@link TaxonRelationship taxon relationship} has
385 * {@link eu.etaxonomy.cdm.model.name.NomenclaturalStatusType#isInvalidType() not been validly published} but was intended to denominate
386 * a real taxon which is the same as the one meant by the target {@link Taxon taxon}.<BR>
387 * According to the nomenclature codes a not validly published taxon name is
388 * not a taxon name at all.<BR>
389 * This type is neither symmetric nor transitive.
391 public static final TaxonRelationshipType
INVALID_DESIGNATION_FOR(){
392 return getTermByUuid(uuidInvalidDesignationFor
);
395 * Returns the (concept) taxon relationship type "is impossible"
396 * (contradiction). This is a concept relationship type which means that the
397 * circumscriptions (the set of organisms/specimens that belong to a {@link Taxon taxon}
398 * according to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
399 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
400 * beeing compared. In a concept relationship the concept references of the
401 * involved taxa must be distinct. <BR>
402 * The "is impossible" (contradiction) taxon relationship type arises
403 * logically if two or more incompatible (concept) taxon relationships
404 * between the two taxa already exist (for instance with the types
405 * "is congruent to" and "excludes").<BR>
406 * This type is symmetric but not transitive.
408 public static final TaxonRelationshipType
CONTRADICTION(){
409 return getTermByUuid(uuidContradiction
);
412 * Returns the (concept) taxon relationship type "is congruent to".
413 * This is a concept relationship type which means that the circumscriptions
414 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
415 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
416 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
417 * beeing compared. In a concept relationship the concept references of the
418 * involved taxa must be distinct. <BR>
419 * The "is congruent to" taxon relationship type indicates that the
420 * circumscriptions of both taxa involved in the taxon relationship are
422 * This type is symmetric and transitive.
424 public static final TaxonRelationshipType
CONGRUENT_TO(){
425 return getTermByUuid(uuidCongruentTo
);
428 * Returns the (concept) taxon relationship type "includes".
429 * This is a concept relationship type which means that the circumscriptions
430 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
431 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
432 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
433 * beeing compared. In a concept relationship the concept references of the
434 * involved taxa must be distinct. <BR>
435 * The "includes" taxon relationship type indicates that each element
436 * belonging to the circumscription of the target taxon involved in the
437 * taxon relationship belongs to the circumscription of the source taxon,
438 * but that some elements belonging to the circumscription of the source
439 * taxon do not belong to the circumscription of the target taxon.<BR>
440 * This type is not symmetric but transitive.
442 public static final TaxonRelationshipType
INCLUDES(){
443 return getTermByUuid(uuidIncludes
);
446 * Returns the (concept) taxon relationship type "overlaps".
447 * This is a concept relationship type which means that the circumscriptions
448 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
449 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
450 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
451 * beeing compared. In a concept relationship the concept references of the
452 * involved taxa must be distinct. <BR>
453 * The "overlaps" taxon relationship type indicates that both
454 * circumscriptions have common elements but that some elements belonging
455 * to the circumscription of the source taxon do not belong to the
456 * circumscription of the target taxon and vice-versa.<BR>
457 * This type is symmetric but not transitive.
459 public static final TaxonRelationshipType
OVERLAPS(){
460 return getTermByUuid(uuidOverlaps
);
463 * Returns the (concept) taxon relationship type "excludes".
464 * This is a concept relationship type which means that the circumscriptions
465 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
466 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
467 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
468 * beeing compared. In a concept relationship the concept references of the
469 * involved taxa must be distinct. <BR>
470 * The "excludes" taxon relationship type indicates that both
471 * circumscriptions have no common elements.<BR>
472 * This type is symmetric but not transitive.
474 public static final TaxonRelationshipType
EXCLUDES(){
475 return getTermByUuid(uuidExcludes
);
478 * Returns the (concept) taxon relationship type "does not exclude".
479 * This is a concept relationship type which means that the circumscriptions
480 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
481 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
482 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
483 * beeing compared. In a concept relationship the concept references of the
484 * involved taxa must be distinct. <BR>
485 * The "does not exclude" taxon relationship type indicates that both
486 * circumscriptions have common elements. This type is a generalisation of
487 * {@link #CONGRUENT_TO() "is congruent to"}, {@link #INCLUDES() "includes"} and {@link #OVERLAPS() "overlaps"}.<BR>
488 * This type is symmetric but not transitive.
492 public static final TaxonRelationshipType
DOES_NOT_EXCLUDE(){
493 return getTermByUuid(uuidDoesNotExclude
);
496 * Returns the (concept) taxon relationship type "does not overlap".
497 * This is a concept relationship type which means that the circumscriptions
498 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
499 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
500 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
501 * beeing compared. In a concept relationship the concept references of the
502 * involved taxa must be distinct. <BR>
503 * The "does not overlap" taxon relationship type is a generalisation of
504 * {@link #CONGRUENT_TO() "is congruent to"}, {@link #INCLUDES() "includes"} and {@link #EXCLUDES() "excludes"}.<BR>
505 * This type is symmetric but not transitive.
509 public static final TaxonRelationshipType
DOES_NOT_OVERLAP(){
510 return getTermByUuid(uuidDoesNotOverlap
);
513 * Returns the (concept) taxon relationship type "is not included in".
514 * This is a concept relationship type which means that the circumscriptions
515 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
516 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
517 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
518 * beeing compared. In a concept relationship the concept references of the
519 * involved taxa must be distinct. <BR>
520 * The "is not included in" taxon relationship type indicates that at least
521 * one element belonging to the circumscription of the source taxon involved
522 * in the taxon relationship does not belong to the circumscription of the
524 * This type is neither symmetric nor transitive.
528 public static final TaxonRelationshipType
NOT_INCLUDED_IN(){
529 return getTermByUuid(uuidNotIncludedIn
);
532 * Returns the (concept) taxon relationship type "is not congruent to".
533 * This is a concept relationship type which means that the circumscriptions
534 * (the set of organisms/specimens that belong to a {@link Taxon taxon} according
535 * to the -maybe implicit- opinion of the {@link TaxonBase#getSec() concept reference})
536 * of both taxa involved in such a {@link TaxonRelationship taxon relationship} are
537 * beeing compared. In a concept relationship the concept references of the
538 * involved taxa must be distinct. <BR>
539 * The "is not congruent to" taxon relationship type indicates that at least
540 * one element belonging to one of both circumscriptions does not belong to
541 * the other circumscription. This type is a generalisation of
542 * {@link #INCLUDES() "includes"}, {@link #OVERLAPS() "overlaps"} and {@link #EXCLUDES() "excludes"}.<BR>
543 * This type is symmetric but not transitive.
545 * @see #CONGRUENT_TO()
547 public static final TaxonRelationshipType
NOT_CONGRUENT_TO(){
548 return getTermByUuid(uuidNotCongruentTo
);
551 public static final TaxonRelationshipType
CONGRUENT_OR_INCLUDES(){
552 return getTermByUuid(uuidCongruentToOrIncludes
);
554 public static final TaxonRelationshipType
INCLUDED_OR_INCLUDES(){
555 return getTermByUuid(uuidIncludedInOrIncludes
);
557 public static final TaxonRelationshipType
CONGRUENT_OR_INCLUDED_OR_INCLUDES(){
558 return getTermByUuid(uuidCongruentIncludedInOrIncludes
);
560 public static final TaxonRelationshipType
CONGRUENT_OR_OVERLAPS(){
561 return getTermByUuid(uuidCongruentToOrOverlaps
);
564 public static final TaxonRelationshipType
INCLUDES_OR_OVERLAPS(){
565 return getTermByUuid(uuidIncludesOrOverlaps
);
568 public static final TaxonRelationshipType
CONGRUENT_OR_INCLUDES_OR_EXCLUDES(){
569 return getTermByUuid(uuidCongruentToOrIncludesOrExcludes
);
572 public static final TaxonRelationshipType
INCLUDES_OR_EXCLUDES(){
573 return getTermByUuid(uuidIncludesOrExcludes
);
576 public static final TaxonRelationshipType
CONGRUENT_OR_EXCLUDES(){
577 return getTermByUuid(uuidCongruentToOrExcludes
);
580 public static final TaxonRelationshipType
INCLUDED_OR_INCLUDES_OR_OVERLAPS(){
581 return getTermByUuid(uuidIncludedInOrIncludesOrOverlaps
);
584 public static final TaxonRelationshipType
CONGRUENT_OR_INCLUDES_OR_OVERLAPS(){
585 return getTermByUuid(uuidCongruentToOrIncludesOrOverlaps
);
588 public static final TaxonRelationshipType
INCLUDES_OR_OVERLAPS_OR_EXCLUDES(){
589 return getTermByUuid(uuidIncludesOrOverlapsOrExcludes
);
592 public static final TaxonRelationshipType
CONGRUENT_OR_OVERLAPS_OR_EXCLUDES(){
593 return getTermByUuid(uuidCongruentToOrOverlapsOrExcludes
);
596 public static final TaxonRelationshipType
OVERLAPS_OR_EXCLUDES(){
597 return getTermByUuid(uuidOverlapsOrExcludes
);
600 public static final TaxonRelationshipType
INCLUDED_OR_INCLUDES_OR_EXCLUDES(){
601 return getTermByUuid(uuidIncludedInOrIncludesOrExcludes
);
604 public static final TaxonRelationshipType
UNCLEAR(){
605 return getTermByUuid(uuidUnclear
);
608 public static final TaxonRelationshipType
NOT_YET_WORKED_ON(){
609 return getTermByUuid(uuidNotYetWorkedOn
);
614 protected void setDefaultTerms(TermVocabulary
<TaxonRelationshipType
> termVocabulary
) {
615 termMap
= new HashMap
<UUID
, TaxonRelationshipType
>();
616 for (TaxonRelationshipType term
: termVocabulary
.getTerms()){
617 termMap
.put(term
.getUuid(), term
);
621 //TODO other relationshipTypes
623 public static final TaxonRelationshipType
ALL_RELATIONSHIPS(){
624 return getTermByUuid(uuidAllRelationships
);
628 public TaxonRelationshipType
readCsvLine(Class
<TaxonRelationshipType
> termClass
, List
<String
> csvLine
, TermType termType
,
629 Map
<UUID
,DefinedTermBase
> terms
, boolean abbrevAsId
) {
630 TaxonRelationshipType newInstance
= super.readCsvLine(termClass
, csvLine
, termType
, terms
, abbrevAsId
);
632 newInstance
.setSymbol(newInstance
.getIdInVocabulary());
633 String inverseLabelAbbrev
= csvLine
.get(7).trim();
634 newInstance
.setInverseSymbol(inverseLabelAbbrev
);