Revision 37802 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wmts/struct/WMTSLayer.java

View differences:

WMTSLayer.java
37 37
	private ArrayList               style                        = null;
38 38
	private ArrayList               imageFormat                  = null;
39 39
	private ArrayList               infoFormat                   = null;
40
	private ArrayList               keywords                     = null;
40 41
	private WMTSDimension           dimension                    = null;
41 42
	private String                  metadata                     = null;
42 43
	//WMTSTileMatrixSetLink
......
77 78
		return infoFormat;
78 79
	}
79 80
	
81
	public ArrayList getKeywords() {
82
		return keywords;
83
	}
84
	
85
	public void setKeywords(ArrayList k) {
86
		this.keywords = k;
87
	}
88
	
80 89
	public abstract WMTSBoundingBox getWGS84BBox();
81 90
	
82 91
	public abstract WMTSBoundingBox getBBox();
......
106 115
	}
107 116
	
108 117
	/**
118
	 * Returns the initial level of this layer inside the matrix set. 
119
	 * @return
120
	 */
121
	public int getInitialLevel(String tileMatrixSetId) {
122
		int initialLevel = 0;
123
		for (int i = 0; i < tileMatrixSetLinkList.size(); i++) {
124
			WMTSTileMatrixSetLink tileMatrixSetLink = (WMTSTileMatrixSetLink)tileMatrixSetLinkList.get(i);
125
			String id = tileMatrixSetLink.getTileMatrixSetId();
126
			if(tileMatrixSetId.compareTo(id) == 0) {
127
				ArrayList tileMatrixLimits = tileMatrixSetLink.getTileMatrixLimits();
128
				if(tileMatrixLimits != null && tileMatrixLimits.size() > 0) {
129
					String ref = ((WMTSTileMatrixLimits)tileMatrixLimits.get(0)).getRefToTileMatrix();
130
					ArrayList tileMatrixList = tileMatrixSetLink.getTileMatrixSet().getTileMatrix();
131
					for (int j = 0; j < tileMatrixList.size(); j++) {
132
						String idTileMatrix = ((WMTSTileMatrix)tileMatrixList.get(j)).getIdentifier();
133
						if(idTileMatrix.compareTo(ref) == 0)
134
							return initialLevel;
135
						initialLevel ++;
136
					}
137
				}
138
			}
139
		}
140
		return initialLevel;
141
	}
142
	
143
	/**
109 144
	 * Links the TileMatrixSet with the limits inside the layer structure
110 145
	 * @param tileMatrixSetList
111 146
	 */
......
147 182
		System.out.println("*****WMTSLayer******");
148 183
		System.out.println("Abstract:" + getAbstract());
149 184
		System.out.println("Identifier:" + getIdentifier());
150
		System.out.println("Keywords:" + getKeywords());
185
		System.out.println("Keywords:");
186
		for (int i = 0; i < keywords.size(); i++) {
187
			System.out.println("Keyword:" + keywords.get(i));
188
		}
151 189
		System.out.println("Title:" + getTitle());
152 190
		for (int i = 0; i < getFormat().size(); i++) {
153 191
			System.out.println("Format:" + getFormat().get(i));

Also available in: Unified diff