01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, Geotools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.wms;
17:
18: import java.util.ArrayList;
19: import java.util.Arrays;
20:
21: import org.geotools.data.ows.OperationType;
22:
23: /**
24: * A subclass of OperationType that allows format getters and setters without
25: * having to cast them.
26: *
27: * @author Richard Gould
28: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/WMSOperationType.java $
29: * @deprecated Use of OperationType should be sufficient
30: */
31: public class WMSOperationType extends OperationType {
32: public WMSOperationType() {
33: super ();
34: }
35:
36: /**
37: *
38: * @deprecated Use OperationType.getFormats();
39: */
40: public String[] getFormatStrings() {
41: return (String[]) formats.toArray(new String[formats.size()]);
42: }
43:
44: /**
45: *
46: * @param formats
47: * @deprecated Use OpeartionType.setFormats();
48: */
49: public void setFormatStrings(String[] formats) {
50: if (formats == null) {
51: this .formats = null;
52: } else {
53: this .formats = new ArrayList(formats.length);
54: this.formats.addAll(Arrays.asList(formats));
55: }
56: }
57: }
|