/*
 * ParseEvent.java
 *
 * Created on June 26, 2006, 3:30 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package usda.weru.util.table;

/**
 * Custom event for the WepsTable.
 * @author Joseph Levin
 */
public class ParseEvent {

	/**
	 *
	 */
	protected String c_column;

	/**
	 *
	 */
	protected String c_field;

	/**
	 *
	 */
	protected WepsTable c_table;

	/**
	 *
	 */
	protected int c_rowIndex;

	/**
	 *
	 */
	protected int c_columnIndex;

	/**
	 *
	 */
	protected Object c_value;

	/**
	 *
	 */
	protected Object c_parsed;

	/**
	 *
	 */
	protected String c_expression;
    /**
     * Creates a new instance of ParseEvent.
     * @param value The Object to be parsed.
     * @param table The WepsTable the event originated from.
     * @param rowIndex The row of the cell to be parsed.
     * @param columnIndex The column of the cell to be parsed.
     * @param expression The expression to be used to parse the Object.
     * @param column 
     * @param field 
     */
    public ParseEvent(Object value, WepsTable table, int rowIndex, int columnIndex,String expression, String column, String field) {
        c_value = value;
        c_table = table;
        c_rowIndex = rowIndex;
        c_columnIndex = columnIndex;
        c_expression = expression;
        c_column = column;
        c_field = field;
    }
    
    /**
     * 
     * @return 
     */
    public Object getValue(){
        return c_value;
    }
    
    /**
     * 
     * @return 
     */
    public Object getParsed(){
        return c_parsed;
    }
    
    /**
     * 
     * @param value 
     */
    public void setParsedExpression(Object value){        
        c_parsed = value;
    }
    
    /**
     * 
     * @return 
     */
    public WepsTable getTable(){
        return c_table;
    }
    
    /**
     * 
     * @return 
     */
    public int getRowIndex(){
        return c_rowIndex;        
    }
    
    /**
     * 
     * @return 
     */
    public int getColumnIndex(){
        return c_columnIndex;
    }
    
    /**
     * 
     * @return 
     */
    public String getColumn(){
        return c_column;
    }
    
    /**
     * 
     * @return 
     */
    public String getField(){
        return c_field;
    }
    
    /**
     * 
     * @return 
     */
    public String getExpression(){
        return c_expression;
    }
    
}
