Revision 40794 branches/v02_desarrollo/libraries/sld/temp/org.gvsig.sldsupport.lib.impl/src/main/java/org/gvsig/sldsupport/impl/sld1_0_0/parsing/RuleElement.java
RuleElement.java | ||
---|---|---|
3 | 3 |
import java.io.IOException; |
4 | 4 |
|
5 | 5 |
import org.gvsig.sldsupport.exception.SLDReadException; |
6 |
import org.gvsig.sldsupport.impl.sld1_0_0.parsing.symbol.SymbolElement; |
|
6 | 7 |
import org.gvsig.sldsupport.impl.util.SLDUtils; |
7 | 8 |
import org.gvsig.sldsupport.sld.SLDTags; |
8 | 9 |
import org.gvsig.sldsupport.sld.extent.SLDExtent; |
10 |
import org.gvsig.sldsupport.sld.filter.SLDFilter; |
|
9 | 11 |
import org.gvsig.sldsupport.sld.graphic.SLDLegendGraphic; |
10 | 12 |
import org.gvsig.sldsupport.sld.rule.SLDRule; |
13 |
import org.gvsig.sldsupport.sld.symbol.SLDSymbol; |
|
11 | 14 |
import org.kxml2.io.KXmlParser; |
12 | 15 |
import org.xmlpull.v1.XmlPullParser; |
13 | 16 |
import org.xmlpull.v1.XmlPullParserException; |
... | ... | |
46 | 49 |
break; |
47 | 50 |
} |
48 | 51 |
if (SLDUtils.isStr(name, SLDTags.LEGENDGRAPHIC)) { |
49 |
SLDLegendGraphic legr = LegendGraphicElement.parse(); |
|
52 |
SLDLegendGraphic legr = LegendGraphicElement.parse(parser, version); |
|
53 |
resp.setLegendGraphic(legr); |
|
54 |
break; |
|
55 |
} |
|
56 |
|
|
57 |
if (SLDUtils.isStr(name, SLDTags.FILTER) |
|
58 |
|| SLDUtils.isStr(name, SLDTags.ELSEFILTER)) { |
|
59 |
SLDFilter filt = FilterElement.parse(parser, version); |
|
60 |
resp.setFilter(filt); |
|
61 |
break; |
|
62 |
} |
|
63 |
|
|
64 |
if (SLDUtils.isStr(name, SLDTags.MINSCALEDENOMINATOR)) { |
|
50 | 65 |
txt = parser.nextText(); |
51 |
resp.setDescription(txt); |
|
66 |
resp.setMinScaleDenominator(SLDUtils.parseDouble(txt)); |
|
67 |
parser.next(); |
|
52 | 68 |
break; |
53 | 69 |
} |
70 |
if (SLDUtils.isStr(name, SLDTags.MAXSCALEDENOMINATOR)) { |
|
71 |
txt = parser.nextText(); |
|
72 |
resp.setMaxScaleDenominator(SLDUtils.parseDouble(txt)); |
|
73 |
parser.next(); |
|
74 |
break; |
|
75 |
} |
|
76 |
// =================================== |
|
77 |
// =================================== |
|
78 |
/* |
|
79 |
* Text, Raster, MappedColor symbols not supported |
|
80 |
*/ |
|
81 |
if (SLDUtils.isStr(name, SLDTags.POINTSYMBOL) |
|
82 |
|| SLDUtils.isStr(name, SLDTags.POINTSYMBOLIZER) |
|
83 |
|| SLDUtils.isStr(name, SLDTags.LINESYMBOL) |
|
84 |
|| SLDUtils.isStr(name, SLDTags.LINESYMBOLIZER) |
|
85 |
|| SLDUtils.isStr(name, SLDTags.POLYGONSYMBOL) |
|
86 |
|| SLDUtils.isStr(name, SLDTags.POLYGONSYMBOLIZER) |
|
87 |
) { |
|
88 |
SLDSymbol sym = SymbolElement.parse(parser, version); |
|
89 |
resp.getSymbols().add(sym); |
|
90 |
break; |
|
91 |
} |
|
92 |
|
|
54 | 93 |
break; |
55 | 94 |
case KXmlParser.END_TAG: |
56 | 95 |
break; |
Also available in: Unified diff