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 / struct / WMTSTileMatrixLimitsImpl.java @ 1809

History | View | Annotate | Download (3.19 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.struct;
23

    
24
import java.io.IOException;
25
import java.util.List;
26

    
27
import org.gvsig.raster.wmts.ogc.struct.WMTSTileMatrixLimits;
28
import org.kxml2.io.KXmlParser;
29
import org.xmlpull.v1.XmlPullParserException;
30

    
31

    
32
/**
33
 * Limits of a tile
34
 * @author Nacho Brodin (nachobrodin@gmail.com)
35
 */
36
public abstract class WMTSTileMatrixLimitsImpl implements WMTSTileMatrixLimits {
37
        private String                 refToTileMatrix      = null;
38
        private WMTSTileMatrixImpl     tileMatrix           = null;
39
        private int                    minTileRow           = 0;
40
        private int                    maxTileRow           = 0;
41
        private int                    minTileCol           = 0;
42
        private int                    maxTileCol           = 0;
43
        
44
        /**
45
     * Parses this service
46
     * @param parser
47
     * @param content
48
     * @throws IOException
49
     * @throws XmlPullParserException
50
     */
51
        public abstract void parse(KXmlParser parser, List<WMTSTileMatrixLimits> list) throws IOException, XmlPullParserException; 
52
        
53
        public WMTSTileMatrixImpl getTileMatrix() {
54
                return tileMatrix;
55
        }
56
        
57
        public void setTileMatrix(WMTSTileMatrixImpl tileMatrix) {
58
                this.tileMatrix = tileMatrix;
59
        }
60
        
61
        public String getRefToTileMatrix() {
62
                return refToTileMatrix;
63
        }
64
        
65
        public void setRefToTileMatrix(String refToTileMatrix) {
66
                this.refToTileMatrix = refToTileMatrix;
67
        }
68
        
69
        public int getMinTileRow() {
70
                return minTileRow - 1;
71
        }
72
        
73
        public void setMinTileRow(int minTileRow) {
74
                this.minTileRow = minTileRow;
75
        }
76
        
77
        public int getMaxTileRow() {
78
                return maxTileRow - 1;
79
        }
80
        
81
        public void setMaxTileRow(int maxTileRow) {
82
                this.maxTileRow = maxTileRow;
83
        }
84
        
85
        public int getMinTileCol() {
86
                return minTileCol;
87
        }
88
        
89
        public void setMinTileCol(int minTileCol) {
90
                this.minTileCol = minTileCol;
91
        }
92
        
93
        public int getMaxTileCol() {
94
                return maxTileCol;
95
        }
96
        
97
        public void setMaxTileCol(int maxTileCol) {
98
                this.maxTileCol = maxTileCol;
99
        }
100
        
101
        public void print() {
102
                System.out.println("  *****WMTSTileMatrixLimits******");
103
                System.out.println("  MaxTileCol:" + getMaxTileCol());
104
                System.out.println("  MaxTileRow:" + getMaxTileRow());
105
                System.out.println("  MinTileCol:" + getMinTileCol());
106
                System.out.println("  MinTileRow:" + getMinTileRow());
107
                System.out.println("  Reference:" + getRefToTileMatrix());
108
                if(tileMatrix != null)
109
                        tileMatrix.print();
110
        }
111
}