svn-gvsig-desktop / tags / v2_0_0_Build_2020 / libraries / libRemoteServices / src / org / gvsig / remoteclient / wms / wms_1_3_0 / WMSStyle1_3_0.java @ 33910
History | View | Annotate | Download (1.6 KB)
1 | 3660 | ldiaz | |
---|---|---|---|
2 | 29648 | jpiera | package org.gvsig.remoteclient.wms.wms_1_3_0; |
3 | 3660 | ldiaz | |
4 | import java.io.IOException; |
||
5 | |||
6 | import org.kxml2.io.KXmlParser; |
||
7 | import org.xmlpull.v1.XmlPullParserException; |
||
8 | |||
9 | 33738 | jpiera | import org.gvsig.remoteclient.utils.CapabilitiesTags; |
10 | |||
11 | 3660 | ldiaz | /**
|
12 | * <p>Represents the layer style defined by the OGC Specifications for WMS 1.3.0</p>
|
||
13 | *
|
||
14 | */
|
||
15 | 29648 | jpiera | public class WMSStyle1_3_0 extends org.gvsig.remoteclient.wms.WMSStyle { |
16 | 3660 | ldiaz | |
17 | /**
|
||
18 | * <p>Parses the STYLE TAG according with the OGC Specifications for the WMS 1.3.0</p>
|
||
19 | */
|
||
20 | public void parse(KXmlParser parser) throws IOException, XmlPullParserException |
||
21 | { |
||
22 | int currentTag;
|
||
23 | boolean end = false; |
||
24 | |||
25 | parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.STYLE);
|
||
26 | currentTag = parser.nextTag(); |
||
27 | |||
28 | while (!end)
|
||
29 | { |
||
30 | switch(currentTag)
|
||
31 | { |
||
32 | case KXmlParser.START_TAG:
|
||
33 | if (parser.getName().compareTo(CapabilitiesTags.NAME)==0) |
||
34 | { |
||
35 | setName(parser.nextText()); |
||
36 | } |
||
37 | else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0) |
||
38 | { |
||
39 | setTitle(parser.nextText()); |
||
40 | } |
||
41 | else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0) |
||
42 | { |
||
43 | setAbstract(parser.nextText()); |
||
44 | } |
||
45 | else if (parser.getName().compareTo(CapabilitiesTags.LEGENDURL)==0) |
||
46 | 3750 | ldiaz | { |
47 | parseLegendURL( parser ); |
||
48 | } |
||
49 | 3660 | ldiaz | case KXmlParser.END_TAG:
|
50 | if (parser.getName().compareTo(CapabilitiesTags.STYLE) == 0) |
||
51 | end = true;
|
||
52 | break;
|
||
53 | case KXmlParser.TEXT:
|
||
54 | break;
|
||
55 | } |
||
56 | if (!end)
|
||
57 | { |
||
58 | 3775 | ldiaz | currentTag = parser.nextTag(); |
59 | 3660 | ldiaz | } |
60 | } |
||
61 | parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.STYLE);
|
||
62 | } |
||
63 | |||
64 | } |