Revision 39e32c59
Added by Lutz Suhrbier over 12 years ago
- ID 39e32c59ceaf3c683fb0c2483f92d812804d5599
- Parent b363e59c
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java | ||
---|---|---|
13 | 13 |
import java.net.URI; |
14 | 14 |
import java.net.URISyntaxException; |
15 | 15 |
import java.util.Arrays; |
16 |
import java.util.HashSet; |
|
17 | 16 |
import java.util.List; |
18 | 17 |
import java.util.Map; |
19 |
import java.util.Set; |
|
20 | 18 |
|
21 | 19 |
import org.eclipse.swt.SWT; |
22 | 20 |
import org.eclipse.swt.widgets.Label; |
23 | 21 |
|
24 | 22 |
import eu.etaxonomy.cdm.common.UriUtils; |
25 |
import eu.etaxonomy.cdm.ext.geo.EditGeoServiceUtilities; |
|
26 | 23 |
import eu.etaxonomy.cdm.model.common.Language; |
27 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
|
28 |
import eu.etaxonomy.cdm.model.description.Distribution; |
|
29 | 24 |
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase; |
25 |
import eu.etaxonomy.cdm.model.description.TaxonDescription; |
|
30 | 26 |
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; |
31 | 27 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
32 | 28 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
... | ... | |
115 | 111 |
|
116 | 112 |
List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()}); |
117 | 113 |
|
118 |
String parameter = EditGeoServiceUtilities.getDistributionServiceRequestParameterString(getDistributions(), presenceAbsenceTermColors, width, 0, bbox, backLayer, null, languages);
|
|
114 |
String parameter = CdmStore.getGeoService().getDistributionServiceRequestParameterString(getTaxonDescriptions(), presenceAbsenceTermColors, width, 0, bbox, backLayer, languages);
|
|
119 | 115 |
|
120 |
|
|
121 |
String mapUriString = accessPoint + "?" + parameter + "&ms=1000"; |
|
116 |
String mapUriString = String.format("%s?%s&ms=1000", accessPoint, parameter); |
|
122 | 117 |
return mapUriString; |
123 | 118 |
} |
124 | 119 |
|
125 | 120 |
/** |
126 | 121 |
* @return |
127 | 122 |
*/ |
128 |
private Set<Distribution> getDistributions() { |
|
129 |
HashSet<Distribution> distributions = new HashSet<Distribution>(); |
|
130 |
|
|
131 |
for (DescriptionElementBase element : getEntity().getDescriptionElements()) { |
|
132 |
if (element instanceof Distribution) { |
|
133 |
distributions.add((Distribution) element); |
|
134 |
} |
|
135 |
} |
|
136 |
return distributions; |
|
123 |
private List<TaxonDescription> getTaxonDescriptions() { |
|
124 |
return Arrays.asList(((TaxonDescription) getEntity().getDescription()).getTaxon().getDescriptions().toArray(new TaxonDescription[0])); |
|
137 | 125 |
} |
138 | 126 |
|
139 | 127 |
} |
Also available in: Unified diff
First changes for Spring Remote