Package edu.fiu.jtlex.timeml.data
Class TimeMLInstance
java.lang.Object
edu.fiu.jtlex.timeml.data.TimeMLInstance
- All Implemented Interfaces:
ITimeMLInstance,ITimeMLNode
Default implementation of
IMakeInstance.- Since:
- jTLEX 1.0
- Author:
- arada002
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.fiu.jtlex.timeml.data.ITimeMLInstance
ITimeMLInstance.Aspect, ITimeMLInstance.Polarity, ITimeMLInstance.Pos, ITimeMLInstance.Tense -
Constructor Summary
ConstructorsConstructorDescriptionTimeMLInstance(int eventInstanceID, ITimeMLEvent event, ITimeMLInstance.Tense tense, ITimeMLInstance.Aspect aspect, ITimeMLInstance.Pos pos, ITimeMLInstance.Polarity polarity, String modality, ITimeMLSignal signal, String cardinality) Creates a new event Instance object. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a field-by-field copy of the Instance.booleanChecks if this instance equals an object.Returns the aspect of the verbal phrase.Returns the cardinality, only present if there is a signal that provides its value.getEvent()Returns the ID of the event to which the instance is related.intgetId()Returns the unique ID number eventInstanceID.getIdStr()Grabs the eventInstanceID, adds eiid to the front for the String format and returns.The modality attribute is only present if there is a modal word present that modifies the instance.Returns the polarity of the eventInstance.getPos()Returns the syntactic category of the phrase (part of speech).Returns the signal object, present if multiple event instances are creatednullif not defined, may not be less than 0getTense()Returns the tense of the verbal phrase.getType()Calls the event to which the instance is related, then returns the event class of the event instance.toJSON()Converts the Instance and its info into JSON format.toString()Returns the info of the Instance in String format.
-
Constructor Details
-
TimeMLInstance
public TimeMLInstance(int eventInstanceID, ITimeMLEvent event, ITimeMLInstance.Tense tense, ITimeMLInstance.Aspect aspect, ITimeMLInstance.Pos pos, ITimeMLInstance.Polarity polarity, String modality, ITimeMLSignal signal, String cardinality) Creates a new event Instance object.- Parameters:
eventInstanceID- a unique ID number may not be less than 1event- the even to which event instance is relatedtense- phrase tense may not benullaspect- phrase aspect may not benullpos- part of speech, syntactic category of phrase may not benullpolarity- indicates whether the eventInstance phrase is negated may not benullmodality- modal word that modifies the instance may benullsignal- the signal object, present if multiple event instances are creatednullif not defined may not be less than 0cardinality- only present if there is a signal that provides its value 0 if not defined may not be less than 0- Throws:
NullPointerException- if Event, Tense, Aspect, Pos, or Polarity are nullIllegalArgumentException- if Modality is empty or all whitespace
-
-
Method Details
-
getId
public int getId()Returns the unique ID number eventInstanceID.- Specified by:
getIdin interfaceITimeMLInstance- Specified by:
getIdin interfaceITimeMLNode- Returns:
- the unique ID number eventInstanceID.
- Since:
- jTLEX 1.0
-
getEvent
Returns the ID of the event to which the instance is related.- Specified by:
getEventin interfaceITimeMLInstance- Returns:
- the ID of the event to which the instance is related. May not return less than 1.
- Since:
- jTLEX 1.0
-
getTense
Returns the tense of the verbal phrase.- Specified by:
getTensein interfaceITimeMLInstance- Returns:
- the tense of the verbal phrase.
May not return
null. - Since:
- jTLEX 1.0
-
getAspect
Returns the aspect of the verbal phrase.- Specified by:
getAspectin interfaceITimeMLInstance- Returns:
- the aspect of the verbal phrase.
May not return
null. - Since:
- jTLEX 1.0
-
getPos
Returns the syntactic category of the phrase (part of speech).- Specified by:
getPosin interfaceITimeMLInstance- Returns:
- the syntactic category of the phrase (part of speech).
May not return
null. - Since:
- jTLEX 1.0
-
getModality
The modality attribute is only present if there is a modal word present that modifies the instance.- Specified by:
getModalityin interfaceITimeMLInstance- Returns:
- the modal word that modifies the instance.
May return
null. - Since:
- jTLEX 1.0
- See Also:
-
getPolarity
Returns the polarity of the eventInstance. The polarity of an event instance is a required attribute represented by the boolean attribute, polarity.
If it is set to NEG, the event instance is negated.
If it is set to POS or not present in the annotation, the event instance is not negated.- Specified by:
getPolarityin interfaceITimeMLInstance- Returns:
- polarity:
NEG if the phrase is negated,
POS if the phrase is not negated.
May not return
null. - Since:
- jTLEX 1.0
-
getSignal
Returns the signal object, present if multiple event instances are creatednullif not defined, may not be less than 0- Specified by:
getSignalin interfaceITimeMLInstance- Returns:
- the signal object, present if multiple event instances are created.
- Since:
- jTLEX 1.0
-
getCardinality
Returns the cardinality, only present if there is a signal that provides its value. 0 if not defined, may not be less than 0.- Specified by:
getCardinalityin interfaceITimeMLInstance- Returns:
- the cardinality, only present if there is a signal that provides its value.
- Since:
- jTLEX 1.0
- See Also:
-
getType
Calls the event to which the instance is related, then returns the event class of the event instance.- Specified by:
getTypein interfaceITimeMLInstance- Specified by:
getTypein interfaceITimeMLNode- Returns:
- the event class of the event instance.
- Since:
- jTLEX 1.0
-
getIdStr
Grabs the eventInstanceID, adds eiid to the front for the String format and returns.- Specified by:
getIdStrin interfaceITimeMLInstance- Specified by:
getIdStrin interfaceITimeMLNode- Returns:
- the eventInstanceID in string format.
- Since:
- jTLEX 1.0
-
toString
Returns the info of the Instance in String format. -
toJSON
Converts the Instance and its info into JSON format.- Specified by:
toJSONin interfaceITimeMLNode- Returns:
- the JSON format of the Instance.
- Since:
- jTLEX 1.0
-
clone
Creates and returns a field-by-field copy of the Instance.- Specified by:
clonein interfaceITimeMLNode- Returns:
- a copy of the Instance.
- Since:
- jTLEX 1.0
-
equals
Checks if this instance equals an object.- Specified by:
equalsin interfaceITimeMLInstance- Specified by:
equalsin interfaceITimeMLNode- Overrides:
equalsin classObject- Parameters:
o- The object to compare against.- Returns:
- True if both instances are equal, i.e. same ID and event, or else false.
- Throws:
NullPointerException- If the object to compare against is false.- Since:
- jTLEX 1.0
-