use of org.geotoolkit.se.xml.vext.RangeType in project geotoolkit by Geomatys.
the class PatternSymbolizer method setRanges.
public void setRanges(Map<Expression, List<Symbolizer>> range) {
this.thredholds = new TreeMap<>(new ExpComparator());
if (range != null)
this.thredholds.putAll(range);
final GTtoSLD110Transformer io = new StyleXmlIO().getTransformerXMLv110();
final List<JAXBElement<RangeType>> ranges = new ArrayList<>();
for (Entry<Expression, List<Symbolizer>> entry : this.thredholds.entrySet()) {
final JAXBElement<RangeType> rt = io.visitRange(entry.getKey(), entry.getValue());
ranges.add(rt);
}
this.range = ranges;
}
use of org.geotoolkit.se.xml.vext.RangeType in project geotoolkit by Geomatys.
the class SE110toGTTransformer method visitRanges.
// Sub elements -------------------------------------------------------------
public Map<Expression, List<Symbolizer>> visitRanges(final List<JAXBElement<RangeType>> types) {
final Map<Expression, List<Symbolizer>> ranges = new LinkedHashMap<Expression, List<Symbolizer>>();
for (final JAXBElement<RangeType> type : types) {
final RangeType rt = type.getValue();
final Expression exp = visitExpression(rt.getThreshold());
final List<Symbolizer> symbols = new ArrayList<Symbolizer>();
for (final JAXBElement<? extends SymbolizerType> jst : rt.getSymbolizer()) {
final SymbolizerType st = jst.getValue();
if (st == null)
continue;
symbols.add(visit(st));
}
ranges.put(exp, symbols);
}
return ranges;
}
Aggregations