Project

General

Profile

Revision 27f61726

ID27f61726edebe0bf0e9f9c00abc1296a4bb22290
Parent b8911db5
Child 0f44e94a

Added by Andreas Müller about 2 years ago

cleanup

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/facade/DerivedUnitFacadeCacheStrategy.java
24 24
/**
25 25
 * @author a.mueller
26 26
 * @since 03.06.2010
27
 *
28 27
 */
29 28
public class DerivedUnitFacadeCacheStrategy extends StrategyBase implements IIdentifiableEntityCacheStrategy<DerivedUnit> {
30 29
	private static final long serialVersionUID = 1578628591216605619L;
......
34 33
	private static final UUID uuid = UUID.fromString("df4672c1-ce5c-4724-af6d-91e2b326d4a4");
35 34

  
36 35
	@Override
37
	protected UUID getUuid() {
38
		return uuid;
39
	}
36
	protected UUID getUuid() {return uuid;}
40 37

  
41 38
	private boolean includeEmptySeconds = false;
42 39
	private boolean includeReferenceSystem = true;
......
46 43
	    return getTitleCache(derivedUnit, false);
47 44
	}
48 45

  
49

  
50 46
	public String getTitleCache(DerivedUnit derivedUnit, boolean skipFieldUnit) {
51 47
		DerivedUnitFacadeFieldUnitCacheStrategy fieldStrategy = new DerivedUnitFacadeFieldUnitCacheStrategy();
52 48

  
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/facade/DerivedUnitFacadeFieldUnitCacheStrategy.java
34 34
/**
35 35
 * @author a.mueller
36 36
 * @since 03.06.2010
37
 *
38 37
 */
39 38
public class DerivedUnitFacadeFieldUnitCacheStrategy extends StrategyBase implements IIdentifiableEntityCacheStrategy<FieldUnit> {
40 39
	private static final long serialVersionUID = 1578628591216605619L;
......
43 42
	private static final UUID uuid = UUID.fromString("df4672c1-ce5c-4724-af6d-91e2b326d4a4");
44 43

  
45 44
	@Override
46
	protected UUID getUuid() {
47
		return uuid;
48
	}
45
	protected UUID getUuid() {return uuid;}
49 46

  
50 47
	private boolean includeEmptySeconds = false;
51 48
	private boolean includeReferenceSystem = true;
......
63 60
		return result;
64 61
	}
65 62

  
66

  
67 63
	protected String getFieldData(DerivedUnitFacade facade) {
68 64
		String ALTITUDE_PREFIX = "alt. ";
69 65
//		String ALTITUDE_POSTFIX = " m";
70 66

  
71 67
		String result = "";
72 68

  
73

  
74 69
		//country
75 70
		String strCountry = null;
76 71
		NamedArea country = facade.getCountry();
......
105 100
		String collectorAndFieldNumber = getCollectorAndFieldNumber(facade);
106 101
		result = CdmUtils.concat(", ", result, collectorAndFieldNumber);
107 102

  
108

  
109 103
		return result;
110 104
	}
111 105

  
112

  
113 106
	protected String addPlantDescription(String result, DerivedUnitFacade facade) {
114 107

  
115 108
		//plant description
......
121 114
		return result;
122 115
	}
123 116

  
124

  
125

  
126 117
	private String getCollectorAndFieldNumber(DerivedUnitFacade facade) {
127 118
		String result = "";
128 119
		AgentBase<?> collector = facade.getCollector();
......
170 161
			}
171 162
			return result;
172 163
		}
173

  
174 164
	}
175 165

  
176 166
	private String addFieldNumber(String str, String fieldNumber) {
......
178 168
		return result;
179 169
	}
180 170

  
181

  
182

  
183 171
	/**
184 172
	 * Strategy to format a collector team member name
185 173
	 * @param member
......
197 185
		}
198 186
	}
199 187

  
200

  
201

  
202 188
	private boolean testPrimaryCollectorInCollectorTeam(AgentBase collector, Person primaryCollector) {
203 189
		if (collector.isInstanceOf(Person.class)){
204 190
			return collector.equals(primaryCollector);
......
211 197
		}
212 198
	}
213 199

  
214

  
215

  
216 200
	/**
217 201
	 * @param facade
218 202
	 */
......
241 225
	public boolean isIncludeSeconds() {
242 226
		return includeEmptySeconds;
243 227
	}
244

  
245

  
246

  
247 228
	public void setIncludeSeconds(boolean includeSeconds) {
248 229
		this.includeEmptySeconds = includeSeconds;
249 230
	}
250 231

  
251

  
252

  
253 232
	public void setIncludeReferenceSystem(boolean includeReferenceSystem) {
254 233
		this.includeReferenceSystem = includeReferenceSystem;
255 234
	}
256

  
257

  
258

  
259 235
	public boolean isIncludeReferenceSystem() {
260 236
		return includeReferenceSystem;
261 237
	}
262

  
263

  
264 238
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)