001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/model/coverage/PaletteInterpretation.java $
002    /*$************************************************************************************************
003     **
004     ** $Id: PaletteInterpretation.java 6259 2007-03-20 09:15:15Z bezema $
005     **
006     ** $Source$
007     **
008     ** Copyright (C) 2003 Open GIS Consortium, Inc. All Rights Reserved. http://www.opengis.org/Legal/
009     **
010     *************************************************************************************************/
011    package org.deegree.model.coverage;
012    
013    
014    /**
015     * Describes the color entry in a color table.
016     *
017     * @UML codelist CV_PaletteInterpretation
018     * @author <A HREF="http://www.opengis.org">OpenGIS&reg; consortium</A>
019     * @version <A HREF="http://www.opengis.org/docs/01-004.pdf">Grid Coverage specification 1.0</A>
020     *
021     * @see ColorInterpretation
022     * @see SampleDimension
023     */
024    public final class PaletteInterpretation extends CodeList {
025        /**
026         * Serial number for compatibility with different versions.
027         */
028        private static final long serialVersionUID = -7387623392932592485L;
029    
030        /**
031         * Gray Scale color palette.
032         *
033         * @UML conditional CV_Gray
034         * @see java.awt.color.ColorSpace#TYPE_GRAY
035         */
036        public static final PaletteInterpretation GRAY = new PaletteInterpretation( "GRAY", 0 );
037    
038        /**
039         * RGB (Red Green Blue) color palette.
040         *
041         * @UML conditional CV_RGB
042         * @see java.awt.color.ColorSpace#TYPE_RGB
043         */
044        public static final PaletteInterpretation RGB = new PaletteInterpretation( "RGB", 1 );
045    
046        /**
047         * CYMK (Cyan Yellow Magenta blacK) color palette.
048         *
049         * @UML conditional CV_CMYK
050         * @see java.awt.color.ColorSpace#TYPE_CMYK
051         */
052        public static final PaletteInterpretation CMYK = new PaletteInterpretation( "CMYK", 2 );
053    
054        /**
055         * HSL (Hue Saturation Lightness) color palette.
056         *
057         * @UML conditional CV_HLS
058         * @see java.awt.color.ColorSpace#TYPE_HLS
059         */
060        public static final PaletteInterpretation HLS = new PaletteInterpretation( "HLS", 3 );
061    
062        /**
063         * List of all enumerations of this type.
064         */
065        private static final PaletteInterpretation[] VALUES = new PaletteInterpretation[] { GRAY, RGB,
066                                                                                           CMYK, HLS };
067    
068        /**
069         * Constructs an enum with the given name.
070         */
071        private PaletteInterpretation( final String name, final int ordinal ) {
072            super( name, ordinal );
073        }
074    
075        /**
076         * Returns the list of <code>PaletteInterpretation</code>s.
077         */
078        public static PaletteInterpretation[] values() {
079            return VALUES.clone();
080        }
081    
082        /**
083         * Returns the list of enumerations of the same kind than this enum.
084         */
085        public CodeList[] family() {
086            return values();
087        }
088    }
089    /* ********************************************************************
090     Changes to this class. What the people have been up to:
091     $Log$
092     Revision 1.1  2007/02/09 17:28:00  poth
093     *** empty log message ***
094    
095     Revision 1.3  2006/11/26 18:17:49  poth
096     unnecessary cast removed / code formatting
097    
098     Revision 1.2  2006/07/13 06:28:31  poth
099     comment footer added
100    
101     ********************************************************************** */