Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libRemoteServices / src / org / gvsig / remoteclient / wmts / wmts_1_0_0 / struct / WMTSServiceIdentification_1_0_0.java @ 34402

History | View | Annotate | Download (2.99 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
* MA  02110-1301, USA.
20
*
21
*/
22
package org.gvsig.remoteclient.wmts.wmts_1_0_0.struct;
23

    
24
import java.io.IOException;
25

    
26
import org.gvsig.remoteclient.utils.CapabilitiesTags;
27
import org.gvsig.remoteclient.wmts.struct.WMTSServiceIdentification;
28
import org.kxml2.io.KXmlParser;
29
import org.xmlpull.v1.XmlPullParserException;
30

    
31
/**
32
 * General information about this server
33
 *
34
 * @author Nacho Brodin (nachobrodin@gmail.com)
35
 */
36
public class WMTSServiceIdentification_1_0_0 extends WMTSServiceIdentification {
37
        /**
38
     * Parses a theme
39
     * @param parser
40
     * @param content
41
     * @throws IOException
42
     * @throws XmlPullParserException
43
     */
44
    public void parse(KXmlParser parser) throws IOException, XmlPullParserException {
45
            int currentTag;
46
            boolean end = false;
47
            
48
            currentTag = parser.next();
49
            
50
            while (!end) {
51
                         switch(currentTag) {
52
                                case KXmlParser.START_TAG:
53
                                        if (compareName(parser, CapabilitiesTags.WMTS_IDENTIFIER)) {
54
                                                setIdentifier(parser.nextText());
55
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_TITLE)) {
56
                                                setTitle(parser.nextText());
57
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_ABSTRACT)) {
58
                                                setAbstract(parser.nextText());
59
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_KEYWORDS)) {
60
                                                parser.skipSubTree();
61
                                                //setKeywords(parser.nextText());
62
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_SERVICETYPE)) {
63
                                                setServiceType(parser.nextText());
64
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_SERVICETYPEVERSION)) {
65
                                                setServiceTypeVersion(parser.nextText());
66
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_PROFILE)) {
67
                                                setProfile(parser.nextText());
68
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_FEES)) {
69
                                                setFees(parser.nextText());
70
                                        } else if (compareName(parser, CapabilitiesTags.WMTS_ACCESSCONSTRAINTS)) {
71
                                                setAccessConstraints(parser.nextText());
72
                                        } 
73
                                        break;
74
                                case KXmlParser.END_TAG:
75
                                        if (compareName(parser, CapabilitiesTags.WMTS_SERVICEID))
76
                                                end = true;
77
                                        break;
78
                                case KXmlParser.TEXT:                                        
79
                                break;
80
                         }
81
             if (!end)
82
                 currentTag = parser.next();
83
            }
84
    }
85
}