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