Revision 6e8ebcb6
Added by Andreas Müller over 2 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/occurrence/DerivedUnitDefaultCacheStrategy.java | ||
---|---|---|
137 | 137 |
}; |
138 | 138 |
} |
139 | 139 |
|
140 |
|
|
141 |
//NOTE still need to discuss, if the identity cache for derived units |
|
142 |
//should also include the identity cache for field units (see also #5951). |
|
143 |
//This may make sense for searching, but is less comfortable in |
|
144 |
//tree representations. |
|
145 |
//For search it might be not so urgent if showing both the identity cache |
|
146 |
//followed by the titleCache whcih includes field unit information. |
|
147 |
@Override |
|
148 |
protected String doGetIdentityCache(DerivedUnit derivedUnit) { |
|
149 |
String specimenLabel = getSpecimenLabel(derivedUnit); |
|
150 |
if (isBlank(specimenLabel)){ |
|
151 |
return getTitleCache(derivedUnit); |
|
152 |
}else{ |
|
153 |
//NOTE: in future we may add further information if not both data are given |
|
154 |
// collection code/label AND unit number |
|
155 |
return specimenLabel; |
|
156 |
} |
|
157 |
} |
|
158 |
|
|
140 | 159 |
/** |
141 | 160 |
* Produces the collection code and number which is the combination of the collection code and |
142 | 161 |
* accession number or barcode. |
Also available in: Unified diff
ref #5952, ref #5951 add identityCache formatting to SpecimenOrObservationBase cache strategies