Project

General

Profile

« Previous | Next » 

Revision c5e9236a

Added by Andreas Müller almost 2 years ago

ref #10067 update java-doc for and remove protected access to model constructors where possible in occurrence

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/occurrence/DerivationEventType.java
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
9

  
10 9
package eu.etaxonomy.cdm.model.occurrence;
11 10

  
12 11
import java.util.HashMap;
......
19 18
import javax.xml.bind.annotation.XmlRootElement;
20 19
import javax.xml.bind.annotation.XmlType;
21 20

  
22
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;
21
import org.apache.logging.log4j.LogManager;
22
import org.apache.logging.log4j.Logger;
23 23
import org.hibernate.envers.Audited;
24 24

  
25 25
import eu.etaxonomy.cdm.model.description.DescriptionBase;
......
39 39
//@Indexed(index = "eu.etaxonomy.cdm.model.term.DefinedTermBase")
40 40
@Audited
41 41
public class DerivationEventType extends DefinedTermBase<DerivationEventType> {
42

  
42 43
	private static final long serialVersionUID = 6895093454763415279L;
43 44
	@SuppressWarnings("unused")
44 45
	private static final Logger logger = LogManager.getLogger(DerivationEventType.class);
......
59 60

  
60 61
	protected static Map<UUID, DerivationEventType> termMap = null;
61 62

  
62

  
63
//*********************** FACTORY ***********************************************/
63 64

  
64 65
	/**
65 66
	 * Factory method
66
	 * @return
67 67
	 */
68 68
	public static DerivationEventType NewInstance(){
69 69
		return new DerivationEventType();
70 70
	}
71 71

  
72

  
73 72
	/**
74 73
	 * Factory method
75
	 * @return
76 74
	 */
77 75
	public static DerivationEventType NewInstance(String term, String label, String labelAbbrev){
78 76
		return new DerivationEventType(term, label, labelAbbrev);
......
80 78

  
81 79
//********************************** Constructor *********************************/
82 80

  
83
  	//for hibernate use only
84
  	@Deprecated
85
  	protected DerivationEventType() {
81
    //*packet* private required by bytebuddy
82
  	DerivationEventType() {
86 83
		super(TermType.DerivationEventType);
87 84
	}
88 85

  
89

  
90 86
	private DerivationEventType(String term, String label, String labelAbbrev) {
91 87
		super(TermType.DerivationEventType, term, label, labelAbbrev);
92 88
	}
93 89

  
94

  
95 90
//************************** METHODS ********************************
96 91

  
97

  
98 92
	@Override
99 93
	public void resetTerms(){
100 94
		termMap = null;
101 95
	}
102 96

  
103

  
104 97
	protected static DerivationEventType getTermByUuid(UUID uuid){
105 98
	    if (termMap == null || termMap.isEmpty()){
106 99
            return getTermByClassAndUUID(DerivationEventType.class, uuid);
......
111 104

  
112 105
	/**
113 106
	 * TODO distinguish from {@link #DUPLICATE_SEGREGATEION()}
114
	 * @return
115 107
	 */
116 108
	public static final DerivationEventType DUPLICATE(){
117 109
		return getTermByUuid(uuidDuplicate);
118 110
	}
111

  
119 112
	public static final DerivationEventType GATHERING_IN_SITU(){
120 113
		return getTermByUuid(uuidGatheringInSitu);
121 114
	}
115

  
122 116
	public static final DerivationEventType TISSUE_SAMPLING(){
123 117
		return getTermByUuid(uuidTissueSampling);
124 118
	}
119

  
125 120
	public static final DerivationEventType DNA_EXTRACTION(){
126 121
		return getTermByUuid(uuidDnaExtraction);
127 122
	}
123

  
128 124
	public static final DerivationEventType VEGETATIVE_PROPAGATION(){
129 125
		return getTermByUuid(uuidVegetativPropagation);
130 126
	}
127

  
131 128
	/**
132 129
	 * TODO distinguish from {@link #DUPLICATE()}
133
	 * @return
134 130
	 */
135 131
	public static final DerivationEventType DUPLICATE_SEGREGATEION(){
136 132
		return getTermByUuid(uuidDuplicateSegregation);
137 133
	}
134

  
138 135
	/**
139 136
	 * The accessioning in a collection which usually results in an accession number.
140 137
	 * @return
......
183 180
	/**
184 181
	 * The preparation of e.g. a living culture into a preparation which can be stored in a collection
185 182
	 * (using certain preparation methods)
186
	 * @return
187 183
	 */
188 184
	public static final DerivationEventType PREPARATION(){
189 185
		return getTermByUuid(uuidPreparation);
190 186
	}
191 187
	/**
192 188
	 * Ex-situ cultivation.
193
	 * @return
194 189
	 */
195 190
	public static final DerivationEventType CULTIVATION_EX_SITU(){
196 191
		return getTermByUuid(uuidCultivationExSitu);
197 192
	}
198 193

  
199

  
200 194
	@Override
201 195
	protected void setDefaultTerms(TermVocabulary<DerivationEventType> termVocabulary) {
202 196
		termMap = new HashMap<>();
......
204 198
			termMap.put(term.getUuid(), term);
205 199
		}
206 200
	}
207

  
208
}
201
}

Also available in: Unified diff