/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.engine.ir;

import org.eclipse.birt.core.data.DataType;


/**
 * Expression Type. see report design schema for reference.
 * 
 * @version $Revision: 1.6 $ $Date: 2005/05/08 06:08:26 $
 */
public class Expression
		implements

			org.eclipse.birt.data.engine.api.IScriptExpression
{

	String expression;
	int dataType = DataType.ANY_TYPE;
	Object handle = null;

	public Expression( String expression, int dataType )
	{
		this.expression = expression;
		this.dataType = dataType;
	}

	/**
	 * create an empty expression
	 */
	public Expression( )
	{
	}

	/**
	 * use expr as the expression.
	 * 
	 * @param expr
	 *            expression
	 */
	public Expression( String expr )
	{
		this( expr, DataType.ANY_TYPE );
	}

	/**
	 * get the expression
	 * 
	 * @return expression
	 */
	public String getExpr( )
	{
		return getExpression( );
	}

	/**
	 * set the expression
	 * 
	 * @param expr
	 *            expression
	 */
	public void setExpr( String expr )
	{
		setExpression( expr );
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.engine.analyzer.IExpression#getExpression()
	 */
	public String getExpression( )
	{
		return expression;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.engine.analyzer.IExpression#getDataType()
	 */
	public int getDataType( )
	{
		return dataType;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.engine.analyzer.IBaseExpression#getHandle()
	 */
	public Object getHandle( )
	{
		return handle;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.engine.analyzer.IBaseExpression#setHandle(java.lang.Object)
	 */
	public void setHandle( Object handle )
	{
		this.handle = handle;
	}

	/**
	 * @param dataType
	 *            The dataType to set.
	 */
	public void setDataType( int dataType )
	{
		this.dataType = dataType;
	}

	/**
	 * @param expression
	 *            The expression to set.
	 */
	public void setExpression( String expression )
	{
		assert ( expression != null );
		this.expression = expression;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.engine.analyzer.IBaseExpression#getText()
	 */
	public String getText( )
	{
		return expression;
	}

}
@@ -707,17 +707,17 @@
 sion: 1.
-6
+7
  $ $Date
@@ -736,13 +736,13 @@
  06:
-08:26
+59:45
  $%0A 
@@ -839,16 +839,42 @@
 sion%0A%7B%0A%0A
+%09private String exprID;%0A%09%0A
 %09String 
@@ -2748,9 +2748,334 @@
 on;%0A%09%7D%0A%0A
+%09/*%0A%09 * (non-Javadoc)%0A%09 * @see org.eclipse.birt.data.engine.api.IBaseExpression#getID()%0A%09 */%0A%09public String getID( )%0A%09%7B%0A%09%09return this.exprID;%0A%09%7D%0A%09%0A%09/*%0A%09 *  (non-Javadoc)%0A%09 * @see org.eclipse.birt.data.engine.api.IBaseExpression#setID(java.lang.String)%0A%09 */%0A%09public void setID( String exprID )%0A%09%7B%0A%09%09this.exprID = exprID;%0A%09%7D%0A%09%0A
 %7D

Update engine code related with DtE because DtE starts to support report document.