org.eml.MMAX2.api
Interface QueryResultTupleElementAPI

All Known Implementing Classes:
MMAX2QueryResultTupleElement

public interface QueryResultTupleElementAPI

This interface defines public methods for accessing MMAX2QueryResultTupleElement objects. A MMAX2QueryResultTupleElement is a wrapper that contains either a Markable or a MMAX2DiscourseElement.


Method Summary
 MMAX2DiscourseElement getDiscourseElement()
          (API) Returns the MMAX2DiscourseElement object that this MMAX2ResultTupleElement contains.
 java.lang.String getID()
          (API) Returns the ID of the Markable or MMAX2DiscourseElement object that this MMAX2QueryResultTupleElement contains.
 int getLeftmostDiscoursePosition()
          (API) Returns the discourse position of the leftmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains.
 Markable getMarkable()
          (API) Returns the Markable object that this MMAX2QueryResultTupleElement contains.
 int getRightmostDiscoursePosition()
          (API) Returns the discourse position of the rightmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains.
 boolean isDiscourseElement()
          (API) Returns true if the content of this MMAX2QueryResultTupleElement is a MMAX2DiscourseElement object.
 boolean isMarkable()
          (API) Returns true if the content of this MMAX2QueryResultTupleElement is a Markable object.
 java.lang.String toString()
          (API) Returns the string representation of this MMAX2QueryResultTupleElement object.
 java.lang.String toTrimmedString(int maxWidth)
          (API) Returns the trimmed string representation of this MMAX2QueryResultTupleElement object.
 

Method Detail

isMarkable

boolean isMarkable()
(API) Returns true if the content of this MMAX2QueryResultTupleElement is a Markable object.

Returns:
True if the content of this MMAX2QueryResultTupleElement is a Markable object, else false.

getMarkable

Markable getMarkable()
(API) Returns the Markable object that this MMAX2QueryResultTupleElement contains.

Returns:
The Markable object that this MMAX2QueryResultTupleElement contains, or null if isMarkable() is false.

isDiscourseElement

boolean isDiscourseElement()
(API) Returns true if the content of this MMAX2QueryResultTupleElement is a MMAX2DiscourseElement object.

Returns:
True if the content of this MMAX2QueryResultTupleElement is a MMAX2DiscourseElement object, else false.

getDiscourseElement

MMAX2DiscourseElement getDiscourseElement()
(API) Returns the MMAX2DiscourseElement object that this MMAX2ResultTupleElement contains.

Returns:
The MMAX2DiscourseElement object that this MMAX2ResultTupleElement contains, or null if isDiscourseElement() is false.

toString

java.lang.String toString()
(API) Returns the string representation of this MMAX2QueryResultTupleElement object.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this MMAX2QueryResultTupleElement object.

toTrimmedString

java.lang.String toTrimmedString(int maxWidth)
(API) Returns the trimmed string representation of this MMAX2QueryResultTupleElement object.

Parameters:
maxWidth - The maximum string width to return.
Returns:
The string representation of this MMAX2QueryResultTupleElement's text. If isMarkable() returns true, this calls Markable.toTrimmedString(int maxWidth), else it calls MMAX2DiscourseElement.toString()

getID

java.lang.String getID()
(API) Returns the ID of the Markable or MMAX2DiscourseElement object that this MMAX2QueryResultTupleElement contains.

Returns:
The ID of the Markable or MMAX2DiscourseElement object that this MMAX2QueryResultTupleElement contains. If isMarkable() returns true, this calls Markable.getID(), else it calls MMAX2DiscourseElement.getID()

getLeftmostDiscoursePosition

int getLeftmostDiscoursePosition()
(API) Returns the discourse position of the leftmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains.

Returns:
The discourse position of the leftmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains. The discourse position is normally the base data element's position in the base data file. If isMarkable() returns true, this calls Markable.getLeftmostDiscoursePosition, else it calls MMAX2DiscourseElement.getDiscoursePosition()

getRightmostDiscoursePosition

int getRightmostDiscoursePosition()
(API) Returns the discourse position of the rightmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains.

Returns:
The discourse position of the rightmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains. The discourse position is normally the base data element's position in the base data file. If isMarkable() returns true, this calls Markable.getRightmostDiscoursePosition, else it calls MMAX2DiscourseElement.getDiscoursePosition()