org.eml.MMAX2.api
Interface MarkableLevelAPI

All Known Implementing Classes:
MarkableLevel

public interface MarkableLevelAPI

This interface defines public methods for accessing MarkableLevel objects.


Method Summary
 Markable addMarkable(java.util.ArrayList discourseElements, java.util.HashMap attributes)
          (API) Adds a Markable to this MarkableLevel, and returns the newly added Markable.
 void deleteAllMarkables()
          (API) Deletes all Markables from this MarkableLevel.
 void deleteMarkable(Markable toDelete)
          (API) Deletes the Markable toDelete from this MarkableLevel.
 Markable[] getAllMarkablesAtDiscoursePosition(int discoursePosition)
          (API) Returns an array of all Markables associated with the DiscourseElement at discourse position discoursePosition, or empty array if none.
 Markable[] getAllMarkablesEndedByDiscourseElement(java.lang.String discourseElementID)
          (API) Returns an array of all Markables whose last DiscourseElement is the one with ID discourseElementID, or empty array if none.
 Markable[] getAllMarkablesStartedByDiscourseElement(java.lang.String discourseElementID)
          (API) Returns an array of all Markables whose first DiscourseElement is the one with ID discourseElementID, or empty array if none.
 java.lang.String getMarkableLevelName()
          (API) Returns the name of this MarkableLevel.
 void saveMarkables(java.lang.String fileName)
          (API) Saves the Markables on this MarkableLevel to file fileName.
 

Method Detail

getMarkableLevelName

java.lang.String getMarkableLevelName()
(API) Returns the name of this MarkableLevel. Each MarkableLevel in a MMAX2 document must have a unique name. This name is assigned in the common_paths.xml file.

Returns:
The name of this MarkableLevel.

saveMarkables

void saveMarkables(java.lang.String fileName)
(API) Saves the Markables on this MarkableLevel to file fileName. If fileName is an empty string, it saves the Markables to the location the MarkableLevel was loaded from.

Parameters:
fileName - The name of the file in which the Markables are to be saved.

addMarkable

Markable addMarkable(java.util.ArrayList discourseElements,
                     java.util.HashMap attributes)
(API) Adds a Markable to this MarkableLevel, and returns the newly added Markable.

Parameters:
discourseElements - An ArrayList of DiscourseElement objects which the new Markable is to span.
attributes - A HashMap of content attibutes that the new Markable is to carry.
Returns:
The newly added Markable object.

deleteMarkable

void deleteMarkable(Markable toDelete)
(API) Deletes the Markable toDelete from this MarkableLevel.

Parameters:
toDelete - The Markable to delete.

deleteAllMarkables

void deleteAllMarkables()
(API) Deletes all Markables from this MarkableLevel.


getAllMarkablesAtDiscoursePosition

Markable[] getAllMarkablesAtDiscoursePosition(int discoursePosition)
(API) Returns an array of all Markables associated with the DiscourseElement at discourse position discoursePosition, or empty array if none.

Parameters:
discoursePosition - The numeric discourse position for which the Markables on this MarkableLevel are to be returned.
Returns:
An array of Markable objects

getAllMarkablesEndedByDiscourseElement

Markable[] getAllMarkablesEndedByDiscourseElement(java.lang.String discourseElementID)
(API) Returns an array of all Markables whose last DiscourseElement is the one with ID discourseElementID, or empty array if none.

Parameters:
discourseElementID - The ID of a DiscourseElement (e.g. 'word_4').
Returns:
An array of Markable objects.

getAllMarkablesStartedByDiscourseElement

Markable[] getAllMarkablesStartedByDiscourseElement(java.lang.String discourseElementID)
(API) Returns an array of all Markables whose first DiscourseElement is the one with ID discourseElementID, or empty array if none.

Parameters:
discourseElementID - The ID of a DiscourseElement (e.g. 'word_4').
Returns:
An array of Markable objects.