Statistics
| Revision:

gvsig-raster / org.gvsig.raster.wmts / trunk / org.gvsig.raster.wmts / org.gvsig.raster.wmts.ogc / org.gvsig.raster.wmts.ogc.impl / src / main / java / org / gvsig / raster / wmts / ogc / impl / wmts_1_0_0 / struct / WMTSServiceProvider_1_0_0.java @ 2485

History | View | Annotate | Download (2.28 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.raster.wmts.ogc.impl.wmts_1_0_0.struct;
23

    
24
import java.io.IOException;
25

    
26
import org.gvsig.raster.wmts.ogc.impl.Tags;
27
import org.gvsig.raster.wmts.ogc.impl.struct.WMTSServiceProviderImpl;
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 WMTSServiceProvider_1_0_0 extends WMTSServiceProviderImpl {
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, Tags.WMTS_PROVIDERNAME)) {
54
                                                setProviderName(nextText(parser));
55
                                        } else if (compareName(parser, Tags.WMTS_PROVIDERSITE)) {
56
                                                setProviderSite(parser.getAttributeValue(0));
57
                                        } /*else if (compareName(parser, CapabilitiesTags.WMTS_SERVICECONTACT)) {
58
                                                setServiceContact(nextText(parser));
59
                                        } */
60
                                        break;
61
                                case KXmlParser.END_TAG:
62
                                        if (compareName(parser, Tags.WMTS_SERVICEPROV))
63
                                                end = true;
64
                                        break;
65
                                case KXmlParser.TEXT:                                        
66
                                break;
67
                         }
68
             if (!end)
69
                 currentTag = parser.next();
70
            }
71
    }
72
}