org.eml.MMAX2.annotation.query
Class MMAX2QueryResultTupleElement

java.lang.Object
  extended by org.eml.MMAX2.annotation.query.MMAX2QueryResultTupleElement
All Implemented Interfaces:
QueryResultTupleElementAPI

public class MMAX2QueryResultTupleElement
extends java.lang.Object
implements QueryResultTupleElementAPI


Constructor Summary
MMAX2QueryResultTupleElement(java.lang.Object object)
          Creates a new instance of MMAX2QueryResultTupleElement
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.util.HashMap getAttributes()
           
 java.lang.String getAttributeValue(java.lang.String attributeName, java.lang.String valIfUndefined)
           
 MMAX2DiscourseElement getDiscourseElement()
          (API) Returns the MMAX2DiscourseElement object that this MMAX2ResultTupleElement contains.
 MMAX2DiscourseElement[] getDiscourseElements(MMAX2Discourse discourse)
          This method returns an array of all MMAX2DiscourseElement objects in the span of this .
 java.lang.String[][] getFragments()
           
 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.
 java.lang.String getLevelName()
           
 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.
 int getSize()
           
 boolean isDiscontinuous()
           
 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.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MMAX2QueryResultTupleElement

public MMAX2QueryResultTupleElement(java.lang.Object object)
Creates a new instance of MMAX2QueryResultTupleElement

Method Detail

getDiscourseElements

public final MMAX2DiscourseElement[] getDiscourseElements(MMAX2Discourse discourse)
This method returns an array of all MMAX2DiscourseElement objects in the span of this .


getLevelName

public final java.lang.String getLevelName()

isMarkable

public final boolean isMarkable()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns true if the content of this MMAX2QueryResultTupleElement is a Markable object.

Specified by:
isMarkable in interface QueryResultTupleElementAPI
Returns:
True if the content of this MMAX2QueryResultTupleElement is a Markable object, else false.

getMarkable

public final Markable getMarkable()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the Markable object that this MMAX2QueryResultTupleElement contains.

Specified by:
getMarkable in interface QueryResultTupleElementAPI
Returns:
The Markable object that this MMAX2QueryResultTupleElement contains, or null if isMarkable() is false.

isDiscourseElement

public final boolean isDiscourseElement()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns true if the content of this MMAX2QueryResultTupleElement is a MMAX2DiscourseElement object.

Specified by:
isDiscourseElement in interface QueryResultTupleElementAPI
Returns:
True if the content of this MMAX2QueryResultTupleElement is a MMAX2DiscourseElement object, else false.

getDiscourseElement

public final MMAX2DiscourseElement getDiscourseElement()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the MMAX2DiscourseElement object that this MMAX2ResultTupleElement contains.

Specified by:
getDiscourseElement in interface QueryResultTupleElementAPI
Returns:
The MMAX2DiscourseElement object that this MMAX2ResultTupleElement contains, or null if isDiscourseElement() is false.

getAttributeValue

public final java.lang.String getAttributeValue(java.lang.String attributeName,
                                                java.lang.String valIfUndefined)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getLeftmostDiscoursePosition

public final int getLeftmostDiscoursePosition()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the discourse position of the leftmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains.

Specified by:
getLeftmostDiscoursePosition in interface QueryResultTupleElementAPI
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

public final int getRightmostDiscoursePosition()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the discourse position of the rightmost MMAX2DiscourseElement that this MMAX2QueryResultTupleElement object contains.

Specified by:
getRightmostDiscoursePosition in interface QueryResultTupleElementAPI
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()

getAttributes

public final java.util.HashMap getAttributes()

getSize

public final int getSize()

isDiscontinuous

public final boolean isDiscontinuous()

getFragments

public final java.lang.String[][] getFragments()

getID

public final java.lang.String getID()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the ID of the Markable or MMAX2DiscourseElement object that this MMAX2QueryResultTupleElement contains.

Specified by:
getID in interface QueryResultTupleElementAPI
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()

toTrimmedString

public final java.lang.String toTrimmedString(int maxWidth)
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the trimmed string representation of this MMAX2QueryResultTupleElement object.

Specified by:
toTrimmedString in interface QueryResultTupleElementAPI
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()

toString

public final java.lang.String toString()
Description copied from interface: QueryResultTupleElementAPI
(API) Returns the string representation of this MMAX2QueryResultTupleElement object.

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