Revision 1809 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/WMTSThemesImpl.java

View differences:

WMTSThemesImpl.java
23 23

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

  
27 28
import org.gvsig.raster.wmts.ogc.impl.base.WMTSServerDescription;
29
import org.gvsig.raster.wmts.ogc.struct.WMTSLayer;
30
import org.gvsig.raster.wmts.ogc.struct.WMTSTheme;
28 31
import org.gvsig.raster.wmts.ogc.struct.WMTSThemes;
29 32
import org.kxml2.io.KXmlParser;
30 33
import org.xmlpull.v1.XmlPullParserException;
......
33 36
 * Layer hierarchy
34 37
 * @author Nacho Brodin (nachobrodin@gmail.com)
35 38
 */
36
public abstract class WMTSThemesImpl extends ArrayList implements WMTSThemes {
39
public abstract class WMTSThemesImpl extends ArrayList<WMTSThemeImpl> implements WMTSThemes {
37 40
	private static final long serialVersionUID = 1L;
38 41
	
39 42
    /**
......
49 52
	 * Assign the layer associated
50 53
	 * @param layers
51 54
	 */
52
	public void calculateLayers(ArrayList layers) {
55
	public void calculateLayers(List<WMTSLayer> layers) {
53 56
		for (int i = 0; i < size(); i++) {
54
			((WMTSTheme)get(i)).calculateLayers(layers);
57
			((WMTSThemeImpl)get(i)).calculateLayers(layers);
55 58
		}
56 59
	}
57 60
	
......
59 62
	 * Loads this list of themes with the layer information
60 63
	 * @param layers
61 64
	 */
62
	public void loadThemesWithLayerInfo(ArrayList layers, WMTSServerDescription status) {
65
	public void loadThemesWithLayerInfo(List<WMTSLayer> layers, WMTSServerDescription status) {
63 66
		if(size() == 0) {
64 67
			for (int i = 0; i < layers.size(); i++) {
65
				WMTSTheme theme = (WMTSTheme)status.createVersionObject("WMTSTheme");
68
				WMTSThemeImpl theme = (WMTSThemeImpl)status.createVersionObject("WMTSTheme");
66 69
				WMTSLayerImpl layer = (WMTSLayerImpl)layers.get(i);
67 70
				theme.setTitle(layer.getTitle());
68 71
				theme.setLayer(layer);
......
81 84
		WMTSTheme result = null;
82 85
		
83 86
		for (int i = 0; i < size(); i++) {
84
			WMTSTheme theme = ((WMTSTheme)get(i));
87
			WMTSThemeImpl theme = ((WMTSThemeImpl)get(i));
85 88
			String title = theme.getTitle();
86 89
			if(title.compareTo(name) == 0)
87
				result = ((WMTSTheme)get(i));
90
				result = ((WMTSThemeImpl)get(i));
88 91
			else 
89 92
				result = theme.getNodeByName(name);
90 93
			if(result != null)
......
113 116
	 * @param index
114 117
	 * @return
115 118
	 */
116
	public WMTSTheme getChildren(int index) {
117
		return (WMTSTheme)get(index);	
119
	public WMTSThemeImpl getChildren(int index) {
120
		return (WMTSThemeImpl)get(index);	
118 121
	}
119 122
	
120 123
	/**

Also available in: Unified diff