001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/wcs/describecoverage/AxisDescription.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.wcs.describecoverage;
045    
046    import java.net.URI;
047    
048    import org.deegree.datatypes.values.Values;
049    import org.deegree.ogcbase.Description;
050    import org.deegree.ogcbase.OGCException;
051    import org.deegree.ogcwebservices.MetadataLink;
052    import org.deegree.ogcwebservices.wcs.WCSException;
053    
054    /**
055     * @version $Revision: 9345 $
056     * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a>
057     * @author last edited by: $Author: apoth $
058     * 
059     * @version 1.0. $Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $
060     * 
061     * @since 2.0
062     */
063    
064    public class AxisDescription extends Description implements Cloneable {
065    
066        private URI semantic = null;
067    
068        private URI refSys = null;
069    
070        private String refSysLabel = null;
071    
072        private Values values = null;
073    
074        /**
075         * @param name
076         * @param label
077         * @param values
078         */
079        public AxisDescription( String name, String label, Values values ) throws OGCException, WCSException {
080            super( name, label );
081            setValues( values );
082        }
083    
084        /**
085         * @param name
086         * @param label
087         * @param description
088         * @param metadataLink
089         * @param semantic
090         * @param refSys
091         * @param refSysLabel
092         * @param values
093         */
094        public AxisDescription( String name, String label, String description, MetadataLink metadataLink, URI semantic,
095                                URI refSys, String refSysLabel, Values values ) throws OGCException, WCSException {
096            super( name, label, description, metadataLink );
097            this.semantic = semantic;
098            this.refSys = refSys;
099            this.refSysLabel = refSysLabel;
100            setValues( values );
101        }
102    
103        /**
104         * @return Returns the refSys.
105         */
106        public URI getRefSys() {
107            return refSys;
108        }
109    
110        /**
111         * @param refSys
112         *            The refSys to set.
113         */
114        public void setRefSys( URI refSys ) {
115            this.refSys = refSys;
116        }
117    
118        /**
119         * @return Returns the refSysLabel.
120         */
121        public String getRefSysLabel() {
122            return refSysLabel;
123        }
124    
125        /**
126         * @param refSysLabel
127         *            The refSysLabel to set.
128         */
129        public void setRefSysLabel( String refSysLabel ) {
130            this.refSysLabel = refSysLabel;
131        }
132    
133        /**
134         * @return Returns the semantic.
135         */
136        public URI getSemantic() {
137            return semantic;
138        }
139    
140        /**
141         * @param semantic
142         *            The semantic to set.
143         */
144        public void setSemantic( URI semantic ) {
145            this.semantic = semantic;
146        }
147    
148        /**
149         * @return Returns the values.
150         */
151        public Values getValues() {
152            return values;
153        }
154    
155        /**
156         * @param values
157         *            The values to set.
158         */
159        public void setValues( Values values )
160                                throws WCSException {
161            if ( values == null ) {
162                throw new WCSException( "values must be <> null for AxisDescription" );
163            }
164            this.values = values;
165        }
166    
167        /**
168         * @see java.lang.Object#clone()
169         */
170        public Object clone() {
171            Values values_ = null;
172            if ( values != null ) {
173                values_ = (Values) values.clone();
174            }
175            try {
176                Description des = (Description) super.clone();
177                return new AxisDescription( des.getName(), des.getLabel(), des.getDescription(), des.getMetadataLink(),
178                                            semantic, refSys, refSysLabel, values_ );
179            } catch ( Exception e ) {
180            }
181            return null;
182        }
183    
184    }