001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/owscommon_new/OperationsMetadata.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>OperationsMetadata</code> stores the contents of a OperationsMetadata 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 OperationsMetadata { 053 054 private List<Parameter> parameters; 055 056 private List<DomainType> constraints; 057 058 private List<Operation> operations; 059 060 private List<Object> operatesOn; 061 062 /** 063 * Standard constructor that initializes all encapsulated data. 064 * 065 * @param parameters 066 * @param constraints 067 * @param operations 068 * @param operatesOn 069 */ 070 public OperationsMetadata( List<Parameter> parameters, List<DomainType> constraints, 071 List<Operation> operations, List<Object> operatesOn ) { 072 this.parameters = parameters; 073 this.constraints = constraints; 074 this.operations = operations; 075 this.operatesOn = operatesOn; 076 } 077 078 /** 079 * @return Returns the constraints. 080 */ 081 public List<DomainType> getConstraints() { 082 return constraints; 083 } 084 085 /** 086 * @return Returns the operations. 087 */ 088 public List<Operation> getOperations() { 089 return operations; 090 } 091 092 /** 093 * @return Returns the parameters. 094 */ 095 public List<Parameter> getParameters() { 096 return parameters; 097 } 098 099 /** 100 * @param name 101 * @return the <code>DomainType</code> with the specified name or null, if there is no 102 * constraint with that name. 103 */ 104 public DomainType getConstraint( QualifiedName name ) { 105 for( DomainType constraint : constraints ) { 106 if( constraint.getName().equals( name ) ) { 107 return constraint; 108 } 109 } 110 111 return null; 112 } 113 114 /** 115 * @param name 116 * @return the <code>Parameter</code> with the specified name or null, if there is no 117 * parameter with that name. This method only tests Parameters that are <code>DomainType</code>s. 118 */ 119 public Parameter getParameter( QualifiedName name ) { 120 for( Parameter parameter : parameters ) { 121 if( parameter instanceof DomainType ) { 122 if( ( (DomainType) parameter ).getName().equals( name ) ) { 123 return parameter; 124 } 125 } 126 } 127 128 return null; 129 } 130 131 /** 132 * @param name 133 * @return the <code>Operation</code> with the specified name or null, if there is no 134 * operation with that name. 135 */ 136 public Operation getOperation( QualifiedName name ) { 137 for( Operation operation : operations ) { 138 if( operation.getName().equals( name ) ) { 139 return operation; 140 } 141 } 142 143 return null; 144 } 145 146 /** 147 * @return Returns the operatesOn. 148 */ 149 public List<Object> getOperatesOn() { 150 return operatesOn; 151 } 152 153 } 154 /* ******************************************************************** 155 Changes to this class. What the people have been up to: 156 $Log$ 157 Revision 1.3 2006/08/29 13:02:32 poth 158 code formating 159 160 Revision 1.2 2006/08/24 06:43:04 poth 161 File header corrected 162 163 Revision 1.1 2006/08/23 07:10:22 schmitz 164 Renamed the owscommon_neu package to owscommon_new. 165 166 Revision 1.1 2006/08/01 11:46:07 schmitz 167 Added data classes for the new OWS common capabilities framework 168 according to the OWS 1.0.0 common specification. 169 Added name to service identification. 170 171 172 173 ********************************************************************** */