Package edu.fiu.jtlex.data
Class Text
java.lang.Object
edu.fiu.jtlex.data.Text
- All Implemented Interfaces:
IText
Default implementation of
IText.- Author:
- arada002
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a set view of all the instances.getLinks()Returns a set view of all the links.Returns the article text with TimeML tags.getRelatedInstances(IEvent event)Returns the Instances related to the event passedgetText()Returns the article text without TimeML tags.Returns a set view of all the TIMEXes.
-
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 benulltext- Article text without the tags. May not benull.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 isnullIllegalArgumentException- 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
Description copied from interface:ITextReturns the article text without TimeML tags. -
getRawText
Description copied from interface:ITextReturns the article text with TimeML tags. This is the original text file that was input.- Specified by:
getRawTextin interfaceIText- Returns:
- the article text with TimeML tags.
-
getTimexes
Description copied from interface:ITextReturns a set view of all the TIMEXes.- Specified by:
getTimexesin interfaceIText- Returns:
- a set view of all the TIMEXes
-
getLinks
Description copied from interface:ITextReturns a set view of all the links. -
getInstances
Description copied from interface:ITextReturns a set view of all the instances.- Specified by:
getInstancesin interfaceIText- Returns:
- a set view of all the instances
-
getRelatedInstances
Description copied from interface:ITextReturns the Instances related to the event passed- Specified by:
getRelatedInstancesin interfaceIText- Parameters:
event- the event in question.- Returns:
- the Instances related to the event passed
-