001: //$HeadURL: https://svn.wald.intevation.org/svn/deegree/base/trunk/src/org/deegree/ogcwebservices/wmps/capabilities/WMPSOperationsMetadata.java $
002: /*---------------- FILE HEADER ------------------------------------------
003:
004: This file is part of deegree.
005: Copyright (C) 2001-2008 by:
006: EXSE, Department of Geography, University of Bonn
007: http://www.giub.uni-bonn.de/deegree/
008: lat/lon GmbH
009: http://www.lat-lon.de
010:
011: This library is free software; you can redistribute it and/or
012: modify it under the terms of the GNU Lesser General Public
013: License as published by the Free Software Foundation; either
014: version 2.1 of the License, or (at your option) any later version.
015:
016: This library is distributed in the hope that it will be useful,
017: but WITHOUT ANY WARRANTY; without even the implied warranty of
018: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: Lesser General Public License for more details.
020:
021: You should have received a copy of the GNU Lesser General Public
022: License along with this library; if not, write to the Free Software
023: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024:
025: Contact:
026:
027: Andreas Poth
028: lat/lon GmbH
029: Aennchenstr. 19
030: 53115 Bonn
031: Germany
032: E-Mail: poth@lat-lon.de
033:
034: Prof. Dr. Klaus Greve
035: Department of Geography
036: University of Bonn
037: Meckenheimer Allee 166
038: 53115 Bonn
039: Germany
040: E-Mail: greve@giub.uni-bonn.de
041:
042:
043: ---------------------------------------------------------------------------*/
044: package org.deegree.ogcwebservices.wmps.capabilities;
045:
046: import java.util.ArrayList;
047: import java.util.List;
048:
049: import org.deegree.framework.log.ILogger;
050: import org.deegree.framework.log.LoggerFactory;
051: import org.deegree.ogcwebservices.getcapabilities.Operation;
052: import org.deegree.ogcwebservices.getcapabilities.OperationsMetadata;
053: import org.deegree.owscommon.OWSDomainType;
054:
055: /**
056: *
057: * Represents the <code>OperationMetadata</code> part in the capabilities document of a WMPS. The
058: * <code>GetCapabilities</code> operation may define the following operation:
059: * <ul>
060: * <li>PrintMap
061: * </ul>
062: *
063: * @author <a href="mailto:deshmukh@lat-lon.de">Anup Deshmukh</a>
064: * @version 2.0.
065: *
066: */
067:
068: public class WMPSOperationsMetadata extends OperationsMetadata {
069:
070: private static final long serialVersionUID = -3294700326681151524L;
071:
072: private static final ILogger LOG = LoggerFactory
073: .getLogger(WMPSOperationsMetadata.class);
074:
075: private Operation printMap;
076:
077: /**
078: * Constructs a new <code>WMPSOperationsMetadata</code> instance from the given parameters.
079: *
080: * @param getCapabilities
081: * @param printMap
082: * @param parameters
083: * @param constraints
084: */
085: public WMPSOperationsMetadata(Operation getCapabilities,
086: Operation printMap, OWSDomainType[] parameters,
087: OWSDomainType[] constraints) {
088: super (getCapabilities, parameters, constraints);
089: this .printMap = printMap;
090: }
091:
092: /**
093: * Constructs a new <code>WMPSOperationsMetadata</code> instance from the given parameters.
094: *
095: * @param getCapabilities
096: * @param printMap
097: */
098: public WMPSOperationsMetadata(Operation getCapabilities,
099: Operation printMap) {
100: super (getCapabilities, null, null);
101: this .printMap = printMap;
102: }
103:
104: /**
105: * Returns all <code>Operations</code> known to the WMPS. Currently only
106: * <ul>
107: * <li>GetCapabilities
108: * <li>PrintMap
109: * </ul>
110: * supported
111: *
112: * @return Operation[]
113: */
114: @Override
115: public Operation[] getOperations() {
116:
117: LOG
118: .logDebug("Getting the list of operations known to the WMPS as an array.");
119: List<Operation> list = new ArrayList<Operation>(10);
120: list.add(this .getCapabilitiesOperation);
121: if (this .printMap != null) {
122: list.add(this .printMap);
123: }
124:
125: Operation[] ops = new Operation[list.size()];
126:
127: return list.toArray(ops);
128: }
129:
130: /**
131: * Returns the print map operation.
132: *
133: * @return Operation
134: */
135: public Operation getPrintMap() {
136: return this .printMap;
137: }
138:
139: /**
140: * Sets the print map operation
141: *
142: * @param printMap
143: */
144: public void setPrintMap(Operation printMap) {
145: this.printMap = printMap;
146: }
147:
148: }
|