/** * Creates a new instance of WMSLayerNode containing a copy of this, but with no children and * parent set. */ public Object clone() { WMSLayerNode clone = new WMSLayerNode(); clone._name = this._name; clone.queryable = this.queryable; clone.srs = this.srs; clone._title = this._title; clone.transparency = this.transparency; clone.styles = new ArrayList(); clone.lAbstract = this.lAbstract; clone.latLonBox = this.latLonBox; clone.selectedStyleIndex = this.selectedStyleIndex; if (keywords != null) { clone.keywords = new ArrayList(keywords.size()); for (int i = 0; i < keywords.size(); i++) { clone.keywords.add((String) keywords.get(i)); } } if (styles != null) for (int i = 0; i < styles.size(); i++) { FMapWMSStyle sty = (FMapWMSStyle) ((FMapWMSStyle) this.styles.get(i)).clone(); sty.parent = this; clone.styles.add(sty); } if (dimensions != null) for (int i = 0; i < dimensions.size(); i++) { clone.dimensions = new ArrayList(); clone.dimensions.add((IFMapWMSDimension) this.dimensions.get(i)); } return clone; }
/** @return Returns the srs. */ public Vector getAllSrs() { if ((srs.size() == 0) && _parent != null) return _parent.getAllSrs(); return srs; }