001 //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/ogcwebservices/wms/capabilities/Extent.java $ 002 /*---------------------------------------------------------------------------- 003 This file is part of deegree, http://deegree.org/ 004 Copyright (C) 2001-2009 by: 005 Department of Geography, University of Bonn 006 and 007 lat/lon GmbH 008 009 This library is free software; you can redistribute it and/or modify it under 010 the terms of the GNU Lesser General Public License as published by the Free 011 Software Foundation; either version 2.1 of the License, or (at your option) 012 any later version. 013 This library is distributed in the hope that it will be useful, but WITHOUT 014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 015 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 016 details. 017 You should have received a copy of the GNU Lesser General Public License 018 along with this library; if not, write to the Free Software Foundation, Inc., 019 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 020 021 Contact information: 022 023 lat/lon GmbH 024 Aennchenstr. 19, 53177 Bonn 025 Germany 026 http://lat-lon.de/ 027 028 Department of Geography, University of Bonn 029 Prof. Dr. Klaus Greve 030 Postfach 1147, 53001 Bonn 031 Germany 032 http://www.geographie.uni-bonn.de/deegree/ 033 034 e-mail: info@deegree.org 035 ----------------------------------------------------------------------------*/ 036 package org.deegree.ogcwebservices.wms.capabilities; 037 038 039 040 /** 041 * The Extent element indicates what _values_ along a dimension are valid. 042 * <p>----------------------------------------------------------------------</p> 043 * 044 * @author <a href="mailto:k.lupp@web.de">Katharina Lupp</a> 045 * @author <a href="mailto:mschneider@lat-lon.de">Markus Schneider</a> 046 * @version $Revision: 18195 $ 047 */ 048 public class Extent { 049 private String default_ = null; 050 private String name = null; 051 private boolean useNearestValue = false; 052 private String value = null; 053 054 /** 055 * constructor initializing the class with the <Extent> 056 */ 057 Extent( String name, String default_, boolean useNearestValue ) { 058 setName( name ); 059 setDefault( default_ ); 060 setUseNearestValue( useNearestValue ); 061 } 062 063 /** 064 * constructor initializing the class with the <Extent> 065 * @param name 066 * @param default_ 067 * @param useNearestValue 068 * @param value 069 */ 070 public Extent( String name, String default_, boolean useNearestValue, String value ) { 071 this( name, default_, useNearestValue ); 072 this.value = value; 073 } 074 075 /** 076 * @return the name of the extent 077 */ 078 public String getName() { 079 return name; 080 } 081 082 /** 083 * sets the name of the extent 084 * @param name 085 */ 086 public void setName( String name ) { 087 this.name = name; 088 } 089 090 /** 091 * @return the default extent 092 */ 093 public String getDefault() { 094 return default_; 095 } 096 097 /** 098 * sets the default extent 099 * @param default_ 100 */ 101 public void setDefault( String default_ ) { 102 this.default_ = default_; 103 } 104 105 /** 106 * @return true if a WMS should use the extent that is nearest to 107 * the requested level. 108 */ 109 public boolean useNearestValue() { 110 return useNearestValue; 111 } 112 113 /** 114 * sets true if a WMS should use the extent that is nearest to 115 * the requested level. 116 * @param useNearestValue 117 */ 118 public void setUseNearestValue( boolean useNearestValue ) { 119 this.useNearestValue = useNearestValue; 120 } 121 122 /** 123 * 124 * @return the value 125 */ 126 public String getValue() { 127 return value; 128 } 129 130 /** 131 * 132 * @param value 133 */ 134 public void setValue( String value ) { 135 this.value = value; 136 } 137 138 @Override 139 public String toString() { 140 String ret = null; 141 ret = "name = " + name + "\n"; 142 ret += ( "default_ = " + default_ + "\n" ); 143 ret += ( "useNearestValue = " + useNearestValue + "\n" ); 144 return ret; 145 } 146 147 }