svn-gvsig-desktop / tags / v2_0_0_Build_2020 / libraries / libRemoteServices / src / org / gvsig / remoteclient / wms / wms_1_1_0 / WMSStyle1_1_0.java @ 33910
History | View | Annotate | Download (1.64 KB)
1 | 3687 | ldiaz | |
---|---|---|---|
2 | 29648 | jpiera | package org.gvsig.remoteclient.wms.wms_1_1_0; |
3 | 3687 | 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 | 3687 | ldiaz | /**
|
12 | * <p>Represents the layer style defined by the OGC Specifications for WMS 1.1.0</p>
|
||
13 | *
|
||
14 | */
|
||
15 | 29648 | jpiera | public class WMSStyle1_1_0 extends org.gvsig.remoteclient.wms.WMSStyle { |
16 | 3687 | ldiaz | |
17 | /**
|
||
18 | * <p>URL pointing to the legend for a layer with this style</p>
|
||
19 | */
|
||
20 | |||
21 | /**
|
||
22 | * <p>Parses the STYLE TAG according with the OGC Specifications for the WMS 1.1.1</p>
|
||
23 | */
|
||
24 | public void parse(KXmlParser parser) throws IOException, XmlPullParserException |
||
25 | { |
||
26 | int currentTag;
|
||
27 | boolean end = false; |
||
28 | |||
29 | parser.require(KXmlParser.START_TAG, null, CapabilitiesTags.STYLE);
|
||
30 | currentTag = parser.nextTag(); |
||
31 | |||
32 | while (!end)
|
||
33 | { |
||
34 | switch(currentTag)
|
||
35 | { |
||
36 | case KXmlParser.START_TAG:
|
||
37 | if (parser.getName().compareTo(CapabilitiesTags.NAME)==0) |
||
38 | { |
||
39 | setName(parser.nextText()); |
||
40 | } |
||
41 | else if (parser.getName().compareTo(CapabilitiesTags.TITLE)==0) |
||
42 | { |
||
43 | setTitle(parser.nextText()); |
||
44 | } |
||
45 | else if (parser.getName().compareTo(CapabilitiesTags.ABSTRACT)==0) |
||
46 | { |
||
47 | setAbstract(parser.nextText()); |
||
48 | } |
||
49 | else if (parser.getName().compareTo(CapabilitiesTags.LEGENDURL)==0) |
||
50 | break;
|
||
51 | case KXmlParser.END_TAG:
|
||
52 | if (parser.getName().compareTo(CapabilitiesTags.STYLE) == 0) |
||
53 | end = true;
|
||
54 | break;
|
||
55 | case KXmlParser.TEXT:
|
||
56 | break;
|
||
57 | } |
||
58 | if (!end)
|
||
59 | { |
||
60 | currentTag = parser.next(); |
||
61 | } |
||
62 | } |
||
63 | parser.require(KXmlParser.END_TAG, null, CapabilitiesTags.STYLE);
|
||
64 | } |
||
65 | } |