/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *    (C) 2002-2006, GeoTools Project Managment Committee (PMC)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.filter;

import org.opengis.filter.expression.Literal;
import org.geotools.feature.Feature;


/**
 * Defines an expression that holds a literal for return.
 *
 * @author Rob Hranac, Vision for New York
 * @author Chris Holmes, TOPP
 * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/filter/LiteralExpression.java $
 * @version $Id: LiteralExpression.java 22294 2006-10-20 00:55:40Z desruisseaux $
 *
 * @deprecated use {@link org.opengis.filter.expression.Literal}
 */
public interface LiteralExpression extends Expression, Literal {
    /**
     * Sets the literal.
     *
     * @param literal The literal to store inside this expression.
     *
     * @throws IllegalFilterException This literal type is not in scope.
     *
     * @deprecated use {@link Literal#setValue(Object)}
     */
    void setLiteral(Object literal) throws IllegalFilterException;

    /**
     * Gets the value of this literal.
     *
     * @param feature Required by the interface but not used.
     *
     * @return the literal held by this expression.  Ignores the passed in
     *         feature.
     *
     * @deprecated use {@link Expression#evaluate(Feature)}.
     */
    Object getValue(Feature feature);

    /**
     * Returns the literal type.
     *
     * @return the short representation of the literal expression type.
     */
    short getType();

    /**
     * Retrieves the literal of this expression.
     *
     * @return the literal held by this expression.
     *
     * @deprecated use {@link Literal#getValue()}.
     */
    Object getLiteral();
}
