ref #6794 change FeatureTree to TermTree
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / description / DescriptiveSystemRole.java
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.description;
11
12 import javax.persistence.Transient;
13 import javax.xml.bind.annotation.XmlEnum;
14 import javax.xml.bind.annotation.XmlEnumValue;
15
16 import eu.etaxonomy.cdm.model.common.Language;
17 import eu.etaxonomy.cdm.model.term.TermTree;
18
19 /**
20 * The role of the descriptive system of type {@link TermTree}.<BR>
21 * A descriptive systeme may play different roles within a working set.
22 * The roles may be
23 * <li>
24 * <ul>Default</ul>
25 * <ul>Interactive Identification</ul>
26 * <ul>Natural Language Reporting</ul>
27 * <ul>Filtering</ul>
28 * <ul>Description Editing</ul>
29 * <ul>Terminology Reporting</ul>
30 * <ul>Management</ul>
31 * </li>
32 *
33 * Compare SDD: .../CharacterTree/DesignedFor/Role
34 *
35 * @author a.mueller
36 * @since 04-Mar-2011
37 */
38 @XmlEnum
39 public enum DescriptiveSystemRole {
40 //0 ; if default is set, this descriptive system is taken for all purpose where no more specific
41 //system is defined
42 @XmlEnumValue("Default")
43 Default("Default"),
44 //1 ; used for interactive keys
45 @XmlEnumValue("InteractiveIdentification")
46 InteractiveIdentification("Interactive Identification"),
47 //2 ; used for natural language reporting
48 @XmlEnumValue("NaturalLanguageReporting")
49 NaturalLanguageReporting("Natural Language Reporting"),
50 //3 ; used for fitering
51 @XmlEnumValue("Filtering")
52 Filtering("Filtering"),
53 //4 ; used for editing descriptions
54 @XmlEnumValue("DescriptionEditing")
55 DescriptionEditing("Description Editing"),
56 //5 ; used for reporting of the descriptive terminology
57 @XmlEnumValue("TerminologyReporting")
58 TerminologyReporting("Terminology Reporting"),
59 //6 ; used for management
60 @XmlEnumValue("Management")
61 Management("Management"),
62 ;
63
64 private String readableString;
65
66 private DescriptiveSystemRole(String readableString ){
67 this.readableString = readableString;
68 }
69
70 @Transient
71 public String getMessage(){
72 return getMessage(Language.DEFAULT());
73 }
74 public String getMessage(Language language){
75 //TODO make multi-lingual
76 return readableString;
77 }
78 }