Revision cf7b78e5
Added by Andreas Kohlbecker almost 8 years ago
cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/geo/EditGeoServiceUtilities.java | ||
---|---|---|
70 | 70 |
|
71 | 71 |
private static final int INT_MAX_LENGTH = String.valueOf(Integer.MAX_VALUE).length(); |
72 | 72 |
|
73 |
private static PresenceAbsenceTerm defaultStatus = PresenceAbsenceTerm.PRESENT(); |
|
74 |
|
|
75 | 73 |
private static IDefinedTermDao termDao; |
76 | 74 |
|
77 | 75 |
|
... | ... | |
229 | 227 |
if (statusColor != null){ |
230 | 228 |
fillColorRgb = Integer.toHexString(statusColor.getRGB()).substring(2); |
231 | 229 |
}else{ |
232 |
if(status != null){ |
|
233 |
fillColorRgb = status.getDefaultColor(); //TODO |
|
234 |
} else { |
|
235 |
fillColorRgb = defaultStatus.getDefaultColor(); |
|
236 |
} |
|
230 |
fillColorRgb = status.getDefaultColor(); //TODO |
|
237 | 231 |
} |
238 | 232 |
String styleValues = StringUtils.join(new String[]{fillColorRgb, borderColorRgb, borderWidth, borderDashingPattern}, ','); |
239 | 233 |
|
... | ... | |
362 | 356 |
//collect status |
363 | 357 |
PresenceAbsenceTerm status = distribution.getStatus(); |
364 | 358 |
if(status == null){ |
365 |
status = defaultStatus;
|
|
359 |
continue;
|
|
366 | 360 |
} |
367 | 361 |
status = HibernateProxyHelper.deproxy(status, PresenceAbsenceTerm.class); |
368 | 362 |
if (! statusList.contains(status)){ |
... | ... | |
569 | 563 |
private static void addDistributionToStyleMap(Distribution distribution, Map<Integer, Set<Distribution>> styleMap, |
570 | 564 |
List<PresenceAbsenceTerm> statusList) { |
571 | 565 |
PresenceAbsenceTerm status = distribution.getStatus(); |
572 |
if (status == null) {
|
|
573 |
status = defaultStatus;
|
|
574 |
}
|
|
575 |
int style = statusList.indexOf(status);
|
|
576 |
Set<Distribution> distributionSet = styleMap.get(style);
|
|
577 |
if (distributionSet == null) {
|
|
578 |
distributionSet = new HashSet<Distribution>();
|
|
579 |
styleMap.put(style, distributionSet);
|
|
566 |
if (status != null) {
|
|
567 |
int style = statusList.indexOf(status);
|
|
568 |
Set<Distribution> distributionSet = styleMap.get(style);
|
|
569 |
if (distributionSet == null) {
|
|
570 |
distributionSet = new HashSet<Distribution>();
|
|
571 |
styleMap.put(style, distributionSet);
|
|
572 |
}
|
|
573 |
distributionSet.add(distribution);
|
|
580 | 574 |
} |
581 |
distributionSet.add(distribution); |
|
582 | 575 |
} |
583 | 576 |
|
584 | 577 |
/** |
Also available in: Unified diff
#4410 removing default status finally also from the distribution map query parameter code