root / branches / v2_0_0_prep / libraries / libRemoteServices / src / org / gvsig / remoteclient / wmts / struct / WMTSTileMatrixLimits.java @ 38531
History | View | Annotate | Download (3.07 KB)
1 | 34236 | nbrodin | /* 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.struct; |
||
23 | |||
24 | import java.io.IOException; |
||
25 | import java.util.ArrayList; |
||
26 | |||
27 | import org.kxml2.io.KXmlParser; |
||
28 | import org.xmlpull.v1.XmlPullParserException; |
||
29 | |||
30 | |||
31 | /**
|
||
32 | * Limits of a tile
|
||
33 | * @author Nacho Brodin (nachobrodin@gmail.com)
|
||
34 | */
|
||
35 | public abstract class WMTSTileMatrixLimits { |
||
36 | 34260 | nbrodin | private String refToTileMatrix = null; |
37 | private WMTSTileMatrix tileMatrix = null; |
||
38 | private int minTileRow = 0; |
||
39 | private int maxTileRow = 0; |
||
40 | private int minTileCol = 0; |
||
41 | private int maxTileCol = 0; |
||
42 | 34236 | nbrodin | |
43 | /**
|
||
44 | * Parses this service
|
||
45 | * @param parser
|
||
46 | * @param content
|
||
47 | * @throws IOException
|
||
48 | * @throws XmlPullParserException
|
||
49 | */
|
||
50 | public abstract void parse(KXmlParser parser, ArrayList list) throws IOException, XmlPullParserException; |
||
51 | |||
52 | 34260 | nbrodin | public WMTSTileMatrix getTileMatrix() {
|
53 | return tileMatrix;
|
||
54 | } |
||
55 | |||
56 | public void setTileMatrix(WMTSTileMatrix tileMatrix) { |
||
57 | this.tileMatrix = tileMatrix;
|
||
58 | } |
||
59 | |||
60 | 34236 | nbrodin | public String getRefToTileMatrix() { |
61 | return refToTileMatrix;
|
||
62 | } |
||
63 | |||
64 | public void setRefToTileMatrix(String refToTileMatrix) { |
||
65 | this.refToTileMatrix = refToTileMatrix;
|
||
66 | } |
||
67 | |||
68 | public int getMinTileRow() { |
||
69 | 34308 | nbrodin | return minTileRow - 1; |
70 | 34236 | nbrodin | } |
71 | |||
72 | public void setMinTileRow(int minTileRow) { |
||
73 | this.minTileRow = minTileRow;
|
||
74 | } |
||
75 | |||
76 | public int getMaxTileRow() { |
||
77 | 34308 | nbrodin | return maxTileRow - 1; |
78 | 34236 | nbrodin | } |
79 | |||
80 | public void setMaxTileRow(int maxTileRow) { |
||
81 | this.maxTileRow = maxTileRow;
|
||
82 | } |
||
83 | |||
84 | public int getMinTileCol() { |
||
85 | return minTileCol;
|
||
86 | } |
||
87 | |||
88 | public void setMinTileCol(int minTileCol) { |
||
89 | this.minTileCol = minTileCol;
|
||
90 | } |
||
91 | |||
92 | public int getMaxTileCol() { |
||
93 | return maxTileCol;
|
||
94 | } |
||
95 | |||
96 | public void setMaxTileCol(int maxTileCol) { |
||
97 | this.maxTileCol = maxTileCol;
|
||
98 | } |
||
99 | |||
100 | public void print() { |
||
101 | System.out.println(" *****WMTSTileMatrixLimits******"); |
||
102 | 34260 | nbrodin | System.out.println(" MaxTileCol:" + getMaxTileCol()); |
103 | System.out.println(" MaxTileRow:" + getMaxTileRow()); |
||
104 | System.out.println(" MinTileCol:" + getMinTileCol()); |
||
105 | System.out.println(" MinTileRow:" + getMinTileRow()); |
||
106 | System.out.println(" Reference:" + getRefToTileMatrix()); |
||
107 | if(tileMatrix != null) |
||
108 | tileMatrix.print(); |
||
109 | 34236 | nbrodin | } |
110 | } |