Revision 40278
branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wmts/struct/WMTSTileMatrixSetLink.java | ||
---|---|---|
85 | 85 |
//definido en la etiqueta |
86 | 86 |
if(tileMatrixLimits == null) |
87 | 87 |
return; |
88 |
java.util.List<String> idListToRemove = new ArrayList<String>(); |
|
88 | 89 |
for (int i = 0; i < tileMatrixLimits.size(); i++) { |
89 | 90 |
WMTSTileMatrixLimits limits = (WMTSTileMatrixLimits)tileMatrixLimits.get(i); |
90 | 91 |
String id = limits.getRefToTileMatrix(); |
92 |
boolean isWithoutReference = true; |
|
91 | 93 |
for (int j = 0; j < tileMatrixSet.getTileMatrix().size(); j++) { |
92 | 94 |
WMTSTileMatrix tileMatrix = (WMTSTileMatrix)tileMatrixSet.getTileMatrix().get(j); |
93 | 95 |
if(tileMatrix.getIdentifier().compareTo(id) == 0) { |
94 | 96 |
limits.setTileMatrix(tileMatrix); |
97 |
isWithoutReference = false; |
|
95 | 98 |
break; |
96 | 99 |
} |
97 | 100 |
} |
101 |
if(isWithoutReference) { |
|
102 |
idListToRemove.add(id); |
|
103 |
} |
|
98 | 104 |
} |
105 |
removeLevelsFromTileMatrix(idListToRemove); |
|
99 | 106 |
} |
100 | 107 |
|
101 |
/*public void setLayerBBox(WMTSBoundingBox bbox) { |
|
102 |
if(tileMatrixSet != null) |
|
103 |
tileMatrixSet.setLayerBBox(layerBBox); |
|
104 |
this.layerBBox = bbox; |
|
105 |
}*/ |
|
108 |
/** |
|
109 |
* Removes form the <code>WMTSTileMatrixLimits</code> the elements in the |
|
110 |
* ID list. These elements are <code>WMTSTileMatrix</code> without reference |
|
111 |
* @param idList |
|
112 |
* List of identifiers |
|
113 |
*/ |
|
114 |
private void removeLevelsFromTileMatrix(java.util.List<String> idList) { |
|
115 |
if(tileMatrixLimits == null || idList == null || idList.size() == 0) |
|
116 |
return; |
|
117 |
for (int i = 0; i < idList.size(); i++) { |
|
118 |
String id = idList.get(i); |
|
119 |
for (int j = 0; j < tileMatrixLimits.size(); j++) { |
|
120 |
WMTSTileMatrixLimits limits = (WMTSTileMatrixLimits)tileMatrixLimits.get(j); |
|
121 |
if(id.equals(limits.getRefToTileMatrix())) { |
|
122 |
tileMatrixLimits.remove(j); |
|
123 |
break; |
|
124 |
} |
|
125 |
} |
|
126 |
} |
|
127 |
} |
|
106 | 128 |
|
129 |
|
|
107 | 130 |
public void print() { |
108 | 131 |
System.out.println(" *****WMTSTileMatrixSetLink******"); |
109 | 132 |
System.out.println("TileMatrixSet ID:" + getTileMatrixSetId()); |
Also available in: Unified diff