org.eml.MMAX2.api
Interface MarkableRelationAPI

All Known Implementing Classes:
MarkableRelation

public interface MarkableRelationAPI

This interface defines public methods for accessing MarkableRelation objects.
A MarkableRelation object establishes contact between relation-type attributes (as defined in the annotation scheme file) and concrete Markable objects on a MarkableLevel object. There is one MarkableRelation object per Attribute. Attributes must be of type MARKABLE_SET or MARKABLE_POINTER.

MARKABLE_SET: For each value occurring for an Attribute, the MarkableRelation contains a MarkableSet object containing those Markable objects having this value.
Example: Attribute 'coref_class' has values set_5, set_6. There are two MarkableSet objects in this MarkableRelation, mapped to the Strings 'set_5', 'set_6' as keys respectively.

MARKABLE_POINTER: For each Markable object having a non-empty value for Attribute _attributeName, this MarkableRelation contains a MarkablePointer object containing both the source ('pointing') Markables and all Markables pointed to. Example: Markable XY has value 'markable_5,markable_18' in its 'antecedent' Attribute. There is one MarkablePointer object in this MarkableRelation, mapped to the ID String of the source Markable as key.


Method Summary
 MarkablePointer getMarkablePointerForSourceMarkable(Markable sourceMarkable)
          (API) Returns the MarkablePointer object for which the Markable sourceMarkable is the source Markable (i.e.
 MarkablePointer[] getMarkablePointers(boolean sort)
          (API) Returns an array of all MarkablePointer objects associated with this MarkableRelation.
 MarkablePointer[] getMarkablePointersWithTargetMarkable(Markable targetMarkable)
          (API) Returns an array of all MarkablePointer objects that contain Markable targetMarkable as target markable.
 MarkableSet getMarkableSetContainingMarkable(Markable markable)
          (API) Returns the MarkableSet object of which Markable markable is a member.
 MarkableSet[] getMarkableSets(boolean sort)
          (API) Returns an array of all MarkableSet objects associated with this MarkableRelation.
 MarkableSet getMarkableSetWithAttributeValue(java.lang.String setID)
          (API) Returns the MarkableSet object containing Markable objects with the value setID in the Attribute pertaining to this MarkableRelation.
 

Method Detail

getMarkableSetWithAttributeValue

MarkableSet getMarkableSetWithAttributeValue(java.lang.String setID)
(API) Returns the MarkableSet object containing Markable objects with the value setID in the Attribute pertaining to this MarkableRelation.

Parameters:
setID - The ID of the MarkableSet object to be returned (e.g. 'set_4'). In order to retrieve the MarkableSet containing a particular Markable M and all of M's peer Markables in the set called 'coref', use M.getAttributeValue('coref', 'empty') to retrieve the ID of the set that M is a member of, and use this method to retrieve the corresponding set.
Returns:
The MarkableSet object with ID setID.

getMarkablePointerForSourceMarkable

MarkablePointer getMarkablePointerForSourceMarkable(Markable sourceMarkable)
(API) Returns the MarkablePointer object for which the Markable sourceMarkable is the source Markable (i.e. the origin of the pointing relation.)

Parameters:
sourceMarkable - The source Markable of the MarkablePointer object to be returned.
Returns:
The MarkablePointer containing the Markable sourceMarkable as source Markable.

getMarkableSetContainingMarkable

MarkableSet getMarkableSetContainingMarkable(Markable markable)
(API) Returns the MarkableSet object of which Markable markable is a member.

Parameters:
markable - The Markable object to be contained in the MarkableSet to be returned.
Returns:
The MarkableSet object containing the Markable markable (among others).

getMarkableSets

MarkableSet[] getMarkableSets(boolean sort)
(API) Returns an array of all MarkableSet objects associated with this MarkableRelation.

Parameters:
sort - If true, the array of MarkableSet objects is sorted according to the discourse position of the initial elements. If false, the order is undefined.
Returns:
An array of all MarkableSet objects associated with this MarkableRelation.

getMarkablePointers

MarkablePointer[] getMarkablePointers(boolean sort)
(API) Returns an array of all MarkablePointer objects associated with this MarkableRelation.

Parameters:
sort - If true, the array of MarkablePointer objects is sorted according to the discourse position of the respective source Markables elements. If false, the order is undefined.
Returns:
An array of all MarkablePointer objects associated with this MarkableRelation.

getMarkablePointersWithTargetMarkable

MarkablePointer[] getMarkablePointersWithTargetMarkable(Markable targetMarkable)
(API) Returns an array of all MarkablePointer objects that contain Markable targetMarkable as target markable.

Parameters:
targetMarkable - The Markable object to which the returned MarkablePointer objects are supposed to point.
Returns:
An array of all MarkablePointer objects pointing to Markable targetMarkable as target markable.