Class TimeMLParser

java.lang.Object
edu.fiu.jtlex.data.TimeMLParser
All Implemented Interfaces:
ITimeMLParser

public class TimeMLParser extends Object implements ITimeMLParser
Default implementation of ITimeMLParser.
Author:
arada002
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    parse​(InputStream tmlFile)
    The parse method which will take the input stream and break it up into the different variables held within.
    parseEvent​(String eventString)
    A parser method which takes the string input representing an Event and parses it to get the different variables from the string.
    parseInstance​(String instanceString)
    A parser method which takes the string input representing an Instance and parses it to get the Instance object.
    parseLink​(String tag, String linkString)
    A parser method which takes the string input representing a Link and parses it to get the different variables from the string.
    parseSignal​(String signalString)
    A parser method which takes the string input representing a Signal and parses it to get the Signal object.
    parseTimex​(String timexString)
    A parser method which takes the string input representing a Timex and parses it to get the different variables from the string.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TimeMLParser

      public TimeMLParser()
  • Method Details

    • parse

      public IText parse​(InputStream tmlFile)
      Description copied from interface: ITimeMLParser
      The parse method which will take the input stream and break it up into the different variables held within.
      Specified by:
      parse in interface ITimeMLParser
      Parameters:
      tmlFile - the TimeML annotated text file to be parsed.
      Returns:
      a new Text object which contains all of the separated data.
    • parseEvent

      public IEvent parseEvent​(String eventString)
      Description copied from interface: ITimeMLParser
      A parser method which takes the string input representing an Event and parses it to get the different variables from the string.
      Specified by:
      parseEvent in interface ITimeMLParser
      Parameters:
      eventString - a string input representing an Event.
      Returns:
      a new Event object.
    • parseTimex

      public ITimex parseTimex​(String timexString)
      Description copied from interface: ITimeMLParser
      A parser method which takes the string input representing a Timex and parses it to get the different variables from the string.
      Specified by:
      parseTimex in interface ITimeMLParser
      Parameters:
      timexString - a string input representing a time expression.
      Returns:
      a new Timex object.
    • parseLink

      public ILink parseLink​(String tag, String linkString)
      Description copied from interface: ITimeMLParser
      A parser method which takes the string input representing a Link and parses it to get the different variables from the string.
      Specified by:
      parseLink in interface ITimeMLParser
      Parameters:
      tag - an XML tag relating to the link.
      linkString - a string input representing a link.
      Returns:
      a new Link object.
    • parseInstance

      public IInstance parseInstance​(String instanceString)
      Description copied from interface: ITimeMLParser
      A parser method which takes the string input representing an Instance and parses it to get the Instance object.
      Specified by:
      parseInstance in interface ITimeMLParser
      Parameters:
      instanceString - a string input representing an instance.
      Returns:
      a new Instance object.
    • parseSignal

      public ISignal parseSignal​(String signalString)
      Description copied from interface: ITimeMLParser
      A parser method which takes the string input representing a Signal and parses it to get the Signal object.
      Specified by:
      parseSignal in interface ITimeMLParser
      Parameters:
      signalString - a string representation of a signal.
      Returns:
      a new Signal object.