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 the instances.getLinks()Returns the links.Returns the raw text.getRelatedInstances(IEvent event) Finds and returns the related instances to an event.getText()Returns the text.Returns the Timex's.
-
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
Returns the text. -
getRawText
Returns the raw text.- Specified by:
getRawTextin interfaceIText- Returns:
- the String containing raw text.
-
getTimexes
Returns the Timex's.- Specified by:
getTimexesin interfaceIText- Returns:
- the set of Timex's.
-
getLinks
Returns the links. -
getInstances
Returns the instances.- Specified by:
getInstancesin interfaceIText- Returns:
- the set of IInstances.
-
getRelatedInstances
Finds and returns the related instances to an event. May be null.- Specified by:
getRelatedInstancesin interfaceIText- Parameters:
event- the event in question.- Returns:
- a set of IInstances that are related to a given event.
-