001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/owscommon_new/Operation.java $ 002 /*---------------- FILE HEADER ------------------------------------------ 003 This file is part of deegree. 004 Copyright (C) 2001-2006 by: 005 Department of Geography, University of Bonn 006 http://www.giub.uni-bonn.de/deegree/ 007 lat/lon GmbH 008 http://www.lat-lon.de 009 This library is free software; you can redistribute it and/or 010 modify it under the terms of the GNU Lesser General Public 011 License as published by the Free Software Foundation; either 012 version 2.1 of the License, or (at your option) any later version. 013 This library is distributed in the hope that it will be useful, 014 but WITHOUT ANY WARRANTY; without even the implied warranty of 015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 016 Lesser General Public License for more details. 017 You should have received a copy of the GNU Lesser General Public 018 License along with this library; if not, write to the Free Software 019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 020 Contact: 021 Andreas Poth 022 lat/lon GmbH 023 Aennchenstraße 19 024 53177 Bonn 025 Germany 026 E-Mail: poth@lat-lon.de 027 Jens Fitzke 028 lat/lon GmbH 029 Aennchenstraße 19 030 53177 Bonn 031 Germany 032 E-Mail: jens.fitzke@uni-bonn.de 033 ---------------------------------------------------------------------------*/ 034 package org.deegree.owscommon_new; 035 036 import java.util.List; 037 038 import org.deegree.datatypes.QualifiedName; 039 040 /** 041 * <code>Operation</code> stores the contents of an Operation 042 * element according to the OWS common specification version 1.0.0. 043 * 044 * @author <a href="mailto:schmitz@lat-lon.de">Andreas Schmitz</a> 045 * @author last edited by: $Author: bezema $ 046 * 047 * @version 2.0, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $ 048 * 049 * @since 2.0 050 */ 051 052 public class Operation { 053 054 private QualifiedName name = null; 055 056 private List<DCP> dcpList = null; 057 058 private List<Parameter> parameters = null; 059 060 private List<DomainType> constraints = null; 061 062 private Object metadata = null; 063 064 private String description = null; 065 066 /** 067 * Standard constructor that initializes all encapsulated data. 068 * 069 * @param name 070 * @param dcpList 071 * @param parameters 072 * @param constraints 073 * @param metadata 074 * @param description 075 */ 076 public Operation( QualifiedName name, List<DCP> dcpList, List<Parameter> parameters, 077 List<DomainType> constraints, Object metadata, String description ) { 078 this.name = name; 079 this.dcpList = dcpList; 080 this.parameters = parameters; 081 this.constraints = constraints; 082 this.metadata = metadata; 083 this.description = description; 084 } 085 086 /** 087 * @return Returns the constraints. 088 */ 089 public List<DomainType> getConstraints() { 090 return constraints; 091 } 092 093 /** 094 * @return Returns the dCP. 095 */ 096 public List<DCP> getDCP() { 097 return dcpList; 098 } 099 100 /** 101 * @return Returns the description. 102 */ 103 public String getDescription() { 104 return description; 105 } 106 107 /** 108 * @return Returns the metadata. 109 */ 110 public Object getMetadata() { 111 return metadata; 112 } 113 114 /** 115 * @return Returns the parameters. 116 */ 117 public List<Parameter> getParameters() { 118 return parameters; 119 } 120 121 /** 122 * @param name 123 * @return the <code>DomainType</code> with the specified name or null, if there is no 124 * constraint with that name. 125 */ 126 public DomainType getConstraint( QualifiedName name ) { 127 for ( DomainType constraint : constraints ) { 128 if ( constraint.getName().equals( name ) ) { 129 return constraint; 130 } 131 } 132 133 return null; 134 } 135 136 /** 137 * @param name 138 * @return the <code>Parameter</code> with the specified name or null, if there is no 139 * parameter with that name. This method only tests Parameters that are <code>DomainType</code>s. 140 */ 141 public Parameter getParameter( QualifiedName name ) { 142 for ( Parameter parameter : parameters ) { 143 if ( parameter instanceof DomainType ) { 144 if ( ( (DomainType) parameter ).getName().equals( name ) ) { 145 return parameter; 146 } 147 } 148 } 149 150 return null; 151 } 152 153 /** 154 * @return Returns the name. 155 */ 156 public QualifiedName getName() { 157 return name; 158 } 159 160 } 161 162 /* ******************************************************************** 163 Changes to this class. What the people have been up to: 164 $Log$ 165 Revision 1.5 2006/11/03 12:02:01 schmitz 166 Fixed documentation and formatting. 167 168 Revision 1.4 2006/08/29 13:02:32 poth 169 code formating 170 171 Revision 1.3 2006/08/29 09:48:59 poth 172 code formating 173 174 Revision 1.2 2006/08/24 06:43:04 poth 175 File header corrected 176 177 Revision 1.1 2006/08/23 07:10:21 schmitz 178 Renamed the owscommon_neu package to owscommon_new. 179 180 Revision 1.2 2006/08/08 10:21:52 schmitz 181 Parser is finished, as well as the iso XMLFactory. 182 183 Revision 1.1 2006/08/01 11:46:07 schmitz 184 Added data classes for the new OWS common capabilities framework 185 according to the OWS 1.0.0 common specification. 186 Added name to service identification. 187 188 189 190 ********************************************************************** */