/*$************************************************************************************************
**
** $Id: PaletteInterpretation.java 831 2006-05-01 00:27:23Z Desruisseaux $
**
** $URL: http://svn.code.sf.net/p/geoapi/code/branches/2.0.x/geoapi/src/main/java/org/opengis/coverage/PaletteInterpretation.java $
**
** Copyright (C) 2003-2005 Open GIS Consortium, Inc.
** All Rights Reserved. http://www.opengis.org/legal/
**
*************************************************************************************************/
package org.opengis.coverage;
// J2SE direct dependencies
import java.util.List;
import java.util.ArrayList;
import java.awt.color.ColorSpace; // For Javadoc
// OpenGIS direct dependencies
import org.opengis.util.CodeList;
// Annotations
import org.opengis.annotation.UML;
import static org.opengis.annotation.Obligation.*;
import static org.opengis.annotation.Specification.*;
/**
* Describes the color entry in a color table.
*
*
*
*
* WARNING: THIS CLASS WILL CHANGE. Current API is derived from OGC
* Grid Coverages Implementation specification 1.0.
* We plan to replace it by new interfaces derived from ISO 19123 (Schema for coverage geometry
* and functions). Current interfaces should be considered as legacy and are included in this
* distribution only because they were part of GeoAPI 1.0 release. We will try to preserve as much
* compatibility as possible, but no migration plan has been determined yet.
*
*
*
* @version Grid Coverage specification 1.0
* @author Martin Desruisseaux (IRD)
* @since GeoAPI 1.0
*
* @see ColorInterpretation
* @see SampleDimension
*/
@UML(identifier="CV_PaletteInterpretation", specification=OGC_01004)
public final class PaletteInterpretation extends CodeList {
/**
* Serial number for compatibility with different versions.
*/
private static final long serialVersionUID = -7387623392932592485L;
/**
* List of all enumerations of this type.
* Must be declared before any enum declaration.
*/
private static final List VALUES = new ArrayList(4);
/**
* Gray Scale color palette.
*
* @see ColorSpace#TYPE_GRAY
*/
@UML(identifier="CV_Gray", obligation=CONDITIONAL, specification=OGC_01004)
public static final PaletteInterpretation GRAY = new PaletteInterpretation("GRAY");
/**
* RGB (Red Green Blue) color palette.
*
* @see ColorSpace#TYPE_RGB
*/
@UML(identifier="CV_RGB", obligation=CONDITIONAL, specification=OGC_01004)
public static final PaletteInterpretation RGB = new PaletteInterpretation("RGB");
/**
* CYMK (Cyan Yellow Magenta blacK) color palette.
*
* @see ColorSpace#TYPE_CMYK
*/
@UML(identifier="CV_CMYK", obligation=CONDITIONAL, specification=OGC_01004)
public static final PaletteInterpretation CMYK = new PaletteInterpretation("CMYK");
/**
* HSL (Hue Saturation Lightness) color palette.
*
* @see ColorSpace#TYPE_HLS
*/
@UML(identifier="CV_HLS", obligation=CONDITIONAL, specification=OGC_01004)
public static final PaletteInterpretation HLS = new PaletteInterpretation("HLS");
/**
* Constructs an enum with the given name. The new enum is
* automatically added to the list returned by {@link #values}.
*
* @param name The enum name. This name must not be in use by an other enum of this type.
*/
public PaletteInterpretation(final String name) {
super(name, VALUES);
}
/**
* Returns the list of {@code PaletteInterpretation}s.
*/
public static PaletteInterpretation[] values() {
synchronized (VALUES) {
return (PaletteInterpretation[]) VALUES.toArray(new PaletteInterpretation[VALUES.size()]);
}
}
/**
* Returns the list of enumerations of the same kind than this enum.
*/
public /*{PaletteInterpretation}*/ CodeList[] family() {
return values();
}
}
Ads help maintain this website.