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