package edu.fiu.jtlex.data;

/**
* Represents the TIME tag.
* 
* @author ceber003
*
*/
public interface ITimex extends INode{

	public static final String TIMEX_ID 	= " tid = t";
	public static final String TYPE  	 	= " type = ";
	public static final String VALUE	    = " value = ";
	public static final String MOD          = " mod = ";
	public static final String ANCHORTIMEID = "anchorTimeID = t ";
	public static final String VALUEFROMFUNCTION = "valueFromFunction = ";
	public static final String FUNCTIONINDOCUMENT = "functionInDocument = ";
	public static final String BEGINPOINT = "beginPoint = t ";
	public static final String ENDPOINT = "endpoint = t ";
	public static final String QUANT = "quant = ";
	public static final String FREQ = "freq = ";
	
	
	/**
	 * An enum that represents the four different types an object may
	 * belong to. Timex may belong to DATE, TIME, DURATION, or SET type. 
	 */
	public static enum TimexType implements IType{
		DATE,
		TIME,
		DURATION,
		SET,
		NONE
	}
	
    
	/**
	 * An enum that represents the twelve different Mod states an object may
	 * belong to. Mod may belong to BEFORE, AFTER, ON_OR_BEFORE,
	 * ON_OR_AFTER, LESS_THAN, MORE_THAN, EQUAL_OR_LESS, EQUAL_OR_MORE,
	 * START, MID, END, or APPROX.	
	 */
	public static enum TimexMod{
		BEFORE,
		AFTER,
		ON_OR_BEFORE,
		ON_OR_AFTER,
		LESS_THAN,
		MORE_THAN,
		EQUAL_OR_LESS,
		EQUAL_OR_MORE,
		START,
		MID,
		END,
		APPROX	
	}
	
	
	/**
	 * An enum that represents the seven different functions an object may
	 * belong to. Function may belong to CREATION_TIME, MODIFICATION_TIME,
	 * PUBLICATION_TIME, RELEASE_TIME, RECEPTION_TIME, EXPIRATION_TIME,
	 * or NONE function. 
	 */
	public static enum FunctionInDocument{
		CREATION_TIME,
		MODIFICATION_TIME,
		PUBLICATION_TIME,
		RELEASE_TIME,
		RECEPTION_TIME,
		EXPIRATION_TIME,
		NONE	
	}
	
	
	
	
	/** 
	 * Each timex has to be identified by a unique ID number. This value is not optional. 
	 * Returns the integer part of the timexId
	 * @return timexId integer
	 * 		   may not be negative 
	 */
	public int getId();
	
	
	
	/** 
	 * Each timex has to be identified by a unique ID number. This value is not optional.
	 * Returns the string part of the timexId
	 * @return timexId string 
	 *         may not be null.
	 */
	public String getIdStr();
	
	
	/**
	 * This value is not optional.
	 * Returns the timex type to which the object belongs 
	 * @return TimexType enum
	 * 		may not be null.
	 */
	public TimexType getType();
	
	
	/**
	 * The value of the the timex tag determines what the actual amount of time for the
	 * date, time, duration, and set types.
	 * returns the string of value.
	 * @return value string
	 *         may not be null.
	 */
	public String getValue();
	
	
	/**
	 * This value is optional.
	 * Returns the mod to which the object belongs 
	 * @return TimexMod enum
	 *         may be null.
	 */
	public TimexMod getMod();
	
	/**
	 * Returns the inary attribute which expresses that the value of
	 * the temporal expression needs to be determined via evaluation of a temporal
	 * function.
	 * @return boolean temporalFunction
	 *         
	 */
	public boolean getTemporalFunction();
	
	/** 
	 * Each anchortime has to be identified by a unique ID number.
	 * This value is optional. 
	 * Returns the integer part of the anchortimeId
	 * @return anchortimeId integer
	 * 		   may not be negative 
	 */
	public int getAnchorTimeId();
	
	
	/** 
	 * Each anchortime has to be identified by a unique ID number. 
	 * This value is optional.
	 * Returns the string part of the anchortimeId
	 * @return anchortimeId string
	 *         may not be null.
	 */
	public String getAnchorTimeIdStr();
	
	
	
	//public String getValueFromFunction();
	
	
	/**
	 * function in document can be one of seven values.
	 * If it is not specified then it will be set as 'NONE' by default.
	 * Returns the function to which the object belongs 
	 * @return FunctionInDocument enum
	 *         may be null.
	 */
	public FunctionInDocument getFunction();
	
	
	/** 
	 * Beginpoint is only used if the expression is anchored to another timex expression.
	 * Each beginpoint has to be identified by a unique ID number. 
	 * If only endpoint is provided may create an empty timex to fill in.
	 * Returns the integer part of the beginpointId
	 * @return beginpointId integer
	 * 		   may not be negative 
	 */
	public int getBeginPoint();
	
	
	/** 
	 * Beginpoint is only used if the expression is anchored to another timex expression.
	 * Each beginpoint has to be identified by a unique ID number. 
	 * If only endpoint is provided may create an empty timex to fill in.
	 * Returns the string part of the beginpointId
	 * @return beginpointId string
	 *         may not be null.
	 */
	public String getBeginPointStr();
	
	
	/** 
	 * Endpoint is only used if the expression is anchored to another timex expression.
	 * Each endpoint has to be identified by a unique ID number. 
	 * If only beginpoint is provided may create an empty timex to fill in.
	 * Returns the integer part of the endpointId
	 * @return endpointId integer
	 * 		   may not be negative 
	 */
	public int getEndPoint();
	
	
	/** 
	 * Endpoint is only used if the expression is anchored to another timex expression.
	 * Each endpoint has to be identified by a unique ID number. 
	 * If only beginpoint is provided may create an empty timex to fill in.
	 * Returns the string part of the endpointId
	 * @return endpointId string
	 *         may not be null.
	 */
	public String getEndPointStr();
	
	
	/**
	 * The quant value is only used if the timex type is 'SET'.
	 * Returns the Quantity to which the object belongs 
	 * @return Quant enum
	 * 		   may be null.
	 */
	public String getQuant();
	
	
	/**
	 * The freq value is only used if the timex type is 'SET'.
	 * The integer value determines the number of time the frequency takes.
	 * i.e: 2 Weeks, 3 Months, 1 Day, etc.
	 * returns freq String portion
	 * @return freq String
	 *         may be null.
	 */
	public String getFreq();
	
	/**
	 * Returns the phrase from the text annotated as timex. 
	 * @return string phrase
	 *         may be null.
	 */
	public String getPhrase();
}
