package edu.fiu.jtlex.data;

/**
 * Interface of Link attributes shared by 3 Links (TLink,SLink,ALink).
 * 
 * @author Pablo Maldonado
 *
 */


public interface ILink {
	
	
	/**
	 * These are the 3 types of link tags:
	 *Temporal Link (TLINK),Subordination Link (SLINK), 
	 *and Aspectual Link (ALINK)
	 *
	 */
	public static enum LinkTag{
		TLINK,
		SLINK,
		ALINK	
	}
		
	/**
	 * Enum that represents temporal relation holding between
	 * the entities for a TLink
	 *Possible values are: BEFORE, AFTER, INCLUDES, IS INCLUDED,
	 *DURING, DURING INV, SIMULTANEOUS, IAFTER, IBEFORE, IDENTITY,
	 *BEGINS, ENDS, BEGUN BY, ENDED BY .
	 */

	public enum TLinkType  implements ILinkType{
		BEFORE,
		AFTER,
		INCLUDES,
		IS_INCLUDED,
		DURING,
		DURING_INV,
		SIMULTANEOUS,
		IAFTER,
		IBEFORE,
		IDENTITY,
		BEGINS,
		ENDS,
		BEGUN_BY,
		ENDED_BY
	}

	/**
	 * Enum that represents the temporal relation holding between
	 * the entities for ALink
	 * possible values are: INITIATES, CULMINATES, TERMINATES,
	 * CONTINUES, REINITIATES
	 */
	public enum ALinkType implements ILinkType{
		INITIATES,
		CULMINATES,
		TERMINATES,
		CONTINUES,
		REINITIATES
		
	}
	
	
	/**
	 * enum that represents the temporal relation holding between
	 * the entities for SLink
	 *possible values are: : MODAL, EVIDENTIAL, NEG EVIDENTIAL,
	 *FACTIVE, COUNTER FACTIVE, CONDITIONAL
	 */
	public enum SLinkType implements ILinkType{
		MODAL,
		EVIDENTIAL,
		NEG_EVIDENTIAL,
		FACTIVE,
		COUNTER_FACTIVE,
		CONDITIONAL
	}
	
	
	
	/**
	 * Enum that represents whether the TLink was generated manually or by closure.
	 * 2 options: MANUALLY or CLOSURE
	 */
	public static enum Origintype{
		USER,
		MANUALLY,
		CLOSURE
	}
	
	
	
	/**
	 * Link ID gives each TimeML link an identification number
	 * OPTIONAL
	 * @return LinkID int
	 */
	public int getLinkID();
	
	/**
	 * syntax holds any syntactic pattern that was used in generating the link (e.g.
	 * from an automatic annotation tool).
	 * OPTIONAL
	 * @return syntax string
	 */
	public String getSyntax();
	
	/**
	 * This is the ID of the eventInstance different for each type of link,
	 * more details in each method in each class
	 * OBLIGATORY
	 * @return eventInstanceID int
	 */
	public INode getEventInstance();
	
	
	/**
	 * attributed shared by all 3 kinds of link,
	 * more details in each method in each class
	 * OPTIONAL
	 * @return signalID int
	 */
	public ISignal getSignal();
	
	
	/**
	 * THIS IS ONLY FOR TLINK
	 * This attribute shows whether a TLINK 
	 * was generated manually or by closure.
	 * @return orig Origintype
	 */
	public Origintype getOrigin();
	
	/**
	 *  (relatedToEventInstance or relatedToTime needs to be present).
	 * This is the ID of the entity that is being related to the event instance
	 * with ID=eventInstanceID or time expression with ID=timeID.
	 * @return relatedToEventOrTime int
	 */
	public INode getRelatedToEvent();
	
	
	/**
	 * This is the temporal relation holding between
	 * the entities. this are represented by 3 different enums:
	 *ALinkRelType, SLinkRelType, TLinkRelType
	 *the return depends on the linkTag
	 * @return Object ALinkRelType/ SLinkRelType/ TLinkRelType
	 */
	public ILinkType getRelType();
	
}
