Class Text

java.lang.Object
edu.fiu.jtlex.data.Text
All Implemented Interfaces:
IText

public class Text extends Object implements IText
Default implementation of IText.
Author:
arada002
  • Constructor Details

    • Text

      public Text​(String rawText, String text, Set<ITimex> timexes, Set<ILink> links, Set<IInstance> instances)
      Creates a new Text object.
      Parameters:
      rawText - Full article text including the tags. May not be null
      text - Article text without the tags. May not be null.
      timexes - Set of timex objects. May not be empty.
      links - Set of link objects. May not be empty.
      instances - Set of makeInstance objects. May not be empty.
      Throws:
      NullPointerException - If rawText or text argument is null
      IllegalArgumentException - If rawText or text argument is all whitespace or an empty string. If events, timexes, or links argument is an empty set.
  • Method Details

    • getText

      public String getText()
      Description copied from interface: IText
      Returns the article text without TimeML tags.
      Specified by:
      getText in interface IText
      Returns:
      the article text without TimeML tags.
    • getRawText

      public String getRawText()
      Description copied from interface: IText
      Returns the article text with TimeML tags. This is the original text file that was input.
      Specified by:
      getRawText in interface IText
      Returns:
      the article text with TimeML tags.
    • getTimexes

      public Set<ITimex> getTimexes()
      Description copied from interface: IText
      Returns a set view of all the TIMEXes.
      Specified by:
      getTimexes in interface IText
      Returns:
      a set view of all the TIMEXes
    • getLinks

      public Set<ILink> getLinks()
      Description copied from interface: IText
      Returns a set view of all the links.
      Specified by:
      getLinks in interface IText
      Returns:
      a set view of all the links.
    • getInstances

      public Set<IInstance> getInstances()
      Description copied from interface: IText
      Returns a set view of all the instances.
      Specified by:
      getInstances in interface IText
      Returns:
      a set view of all the instances
    • getRelatedInstances

      public Set<IInstance> getRelatedInstances​(IEvent event)
      Description copied from interface: IText
      Returns the Instances related to the event passed
      Specified by:
      getRelatedInstances in interface IText
      Parameters:
      event - the event in question.
      Returns:
      the Instances related to the event passed