Interface ITimeMLParser

All Known Implementing Classes:
TimeMLParser

public interface ITimeMLParser
The interface for the master parser to allow for different parts of a timeML document (Event, Timex, and Link) to be parsed for the required variables within their strings.
Since:
jTLEX 1.0
Author:
ceber003
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
  • Method Details

    • parse

      The parse method which will take the input stream and break it up into the different variables held within.
      Parameters:
      timeML - the TimeML annotated text file to be parsed.
      Returns:
      a new Text object which contains all of the separated data.
      Throws:
      UnsupportedEncodingException - the text must be encoded using UFT-8.
      NullPointerException - if tml argument is null
      Since:
      jTLEX 1.0
    • parseEvent

      ITimeMLEvent 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. May be empty or whitespace however it will raise an IllegalArgumentException when creating the Event object.
      Parameters:
      eventString - a string input representing an Event.
      Returns:
      a new Event object.
      Throws:
      NullPointerException - if null
      Since:
      jTLEX 1.0
    • parseTimex

      ITimeMLTimex 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. May be empty or whitespace however it will raise an NullPointerException when creating the Timex object.
      Parameters:
      timexString - a string input representing a time expression.
      Returns:
      a new Timex object.
      Throws:
      NullPointerException - if null
      Since:
      jTLEX 1.0
    • parseLink

      ITimeMLLink 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. May be empty or whitespace however it will raise an NullPointerException when creating the Link object.
      Parameters:
      tag - an XML tag relating to the link.
      linkString - a string input representing a link.
      Returns:
      a new Link object.
      Throws:
      NullPointerException - if null
      Since:
      jTLEX 1.0
    • parseInstance

      ITimeMLInstance parseInstance(String instanceString)
      A parser method which takes the string input representing an Instance and parses it to get the Instance object. May be empty or whitespace however it will raise an IllegalArgumentException when creating the Instance object.
      Parameters:
      instanceString - a string input representing an instance.
      Returns:
      a new Instance object.
      Throws:
      NullPointerException - if null
      Since:
      jTLEX 1.0
    • parseSignal

      ITimeMLSignal parseSignal(String signalString)
      A parser method which takes the string input representing a Signal and parses it to get the Signal object. May be empty or whitespace however it will raise an IllegalArgumentException when creating the Signal object.
      Parameters:
      signalString - a string representation of a signal.
      Returns:
      a new Signal object.
      Throws:
      NullPointerException - if null
      Since:
      jTLEX 1.0