|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eml.MMAX2.discourse.MMAX2Discourse
public class MMAX2Discourse
Field Summary | |
---|---|
static AlphabeticMarkableComparator |
ALPHACOMP
|
static DiscourseOrderMarkableComparator |
DISCOURSEORDERCOMP
|
static EndingMarkableComparator |
ENDCOMP
|
static MarkableIDComparator |
IDCOMP
|
static MarkableLevelPositionComparator |
LEVELCOMP
|
static StartingMarkableComparator |
STARTCOMP
|
Constructor Summary | |
---|---|
MMAX2Discourse(boolean withGUI)
Creates new Discourse |
Method Summary | |
---|---|
MMAX2Discourse |
_buildDiscourse(java.lang.String infile,
java.lang.String commonPathsFile)
(API) Loads the .mmax file of name inFileName, using the common_paths.xml file specified in commonPathsFileName. |
void |
addWithID(java.lang.String id,
org.w3c.dom.Element node)
|
void |
applyStyleSheet(java.lang.String overrideStyleFileName)
Apply the XSL style sheet in this.styleSheetFileName to this.structureDOM. |
void |
basedataTextAndAttributeSelected(org.w3c.dom.Node referenceNode,
int mode,
java.lang.String text,
java.lang.String attribute)
|
static MMAX2Discourse |
buildDiscourse(java.lang.String infile)
|
static MMAX2Discourse |
buildDiscourse(java.lang.String infile,
java.lang.String commonPathsFile)
|
void |
destroyDependentComponents()
|
java.lang.String[] |
getAllDiscourseElementIDs()
|
java.lang.Integer[] |
getAllDisplayAssociations()
|
java.lang.String |
getCommonBasedataPath()
|
int |
getCurrentDocumentPosition()
This method returns the current length of this.incrementalTransformationResult. |
MarkableChart |
getCurrentMarkableChart()
|
java.lang.String |
getCurrentStyleSheet()
|
MMAX2DiscourseElement |
getDiscourseElementAtDiscoursePosition(int discPos)
(API) Returns the MMAX2DiscourseElement object (i.e. |
MMAX2DiscourseElement |
getDiscourseElementByID(java.lang.String id)
(API) Returns the MMAX2DiscourseElement object (i.e. |
int |
getDiscourseElementCount()
(API) Returns the number of MMAX2DiscourseElement objects in this discourse. |
java.lang.String |
getDiscourseElementIDAtDiscoursePosition(int pos)
|
org.w3c.dom.Node |
getDiscourseElementNode(java.lang.String ID)
Returns the Node representation of the discourse element with id ID. |
MMAX2DiscourseElement[] |
getDiscourseElements()
(API) Returns an array containing all MMAX2DiscourseElement objects in the current discourse, ordered in discourse order. |
MMAX2DiscourseElement[] |
getDiscourseElements(Markable _markable)
(API) Returns an array containing all MMAX2DiscourseElement objects in Markable markable, ordered in discourse order. |
int |
getDiscoursePositionAtDisplayPosition(int _displayPosition)
This method returns the DiscoursePosition of the DiscourseElement currently displayed at display position displayPosition, or -1 if no DiscourseElement is displayed at this position. |
int |
getDiscoursePositionFromDiscourseElementID(java.lang.String id)
This method receives the String id of a DiscourseElement (word_x) and returns the (0-based) discourse position, i.e. |
MMAX2Document |
getDisplayDocument()
|
int |
getDisplayEndPositionFromDiscoursePosition(int discoursePosition)
This method returns the display end position (i.e. |
int |
getDisplayStartPositionFromDiscoursePosition(int discoursePosition)
This method returns the display start position (i.e. |
java.lang.String |
getFromHash(java.lang.String key)
|
boolean |
getHasGUI()
|
java.lang.String |
getHotSpotAtDisplayAssociation(int displayPosition)
|
Markable |
getMarkableAtDisplayAssociation(int displayPosition)
|
MarkableLevel |
getMarkableLevelByName(java.lang.String name,
boolean interactive)
(API) Returns the MarkableLevel object of name levelName, or null if no MarkableLevel of this name exists. |
MarkableLevel |
getMarkableLevelFromAbsoluteFileName(java.lang.String absFileName)
|
MMAX2 |
getMMAX2()
|
java.lang.String |
getNameSpace()
|
MMAX2DiscourseElement |
getNextDiscourseElement(MMAX2DiscourseElement element)
(API) Returns the MMAX2DiscourseElement object at discourse position currentElement.DiscourseElementAPI.getDiscoursePosition() +1, or null if none exists at this position. |
java.lang.String |
getNextDocumentChunk()
This method returns the next chunk of the incremental transformation result that has not yet been processed. |
MMAX2DiscourseElement |
getPreviousDiscourseElement(MMAX2DiscourseElement element)
(API) Returns the MMAX2DiscourseElement object at discourse position currentElement.DiscourseElementAPI.getDiscoursePosition() -1, or null if none exists at this position. |
java.lang.String[] |
getStyleSheetFileNames()
|
java.lang.String |
getStyleSheetOutput()
|
org.apache.xerces.dom.DocumentImpl |
getWordDOM()
|
java.lang.String |
getWordFileName()
|
boolean |
isCurrentlyLoaded(java.lang.String absoluteMarkableFileName)
|
void |
performNonGUIInitializations()
|
void |
putInHash(java.lang.String key,
java.lang.String value)
|
void |
reapplyStyleSheet()
This method is called when the deep refresh button on the MarkableLevelControlPanel is pressed. |
void |
registerAllDiscourseElements()
|
void |
registerDiscourseElement(java.lang.String id)
This method receives a DiscourseElement id (word_x), assigns it a discourse position (0-based) and stores both values in the Hash DiscoursePositionOfDiscourseElement. |
java.lang.Integer[] |
removeDisplayAssociationsForMarkable(Markable removee)
|
void |
requestAddBasedataElement(org.w3c.dom.Node referenceNode,
int mode)
This method is called by the MMAX2BasedataEditActionSelector upon selection of an 'add' action. |
void |
requestDeleteBasedataElement(org.w3c.dom.Node deletee)
|
void |
resetForStyleSheetReapplication()
|
void |
saveBasedata(java.lang.String newFileName)
|
void |
setCommonBasedataPath(java.lang.String path)
|
void |
setCurrentStyleSheet(java.lang.String name)
|
void |
setMMAX2(MMAX2 _mmax2)
|
void |
setNameSpace(java.lang.String _nameSpace)
|
void |
setStyleSheetFileNames(java.lang.String[] names)
|
void |
setWordFileName(java.lang.String name)
|
void |
showEditBasedataElementWindow(java.util.ArrayList recentTexts,
java.util.ArrayList recentAttributes,
org.w3c.dom.Node referenceNode,
int mode)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static StartingMarkableComparator STARTCOMP
public static EndingMarkableComparator ENDCOMP
public static AlphabeticMarkableComparator ALPHACOMP
public static DiscourseOrderMarkableComparator DISCOURSEORDERCOMP
public static MarkableLevelPositionComparator LEVELCOMP
public static MarkableIDComparator IDCOMP
Constructor Detail |
---|
public MMAX2Discourse(boolean withGUI)
Method Detail |
---|
public MMAX2Discourse _buildDiscourse(java.lang.String infile, java.lang.String commonPathsFile)
DiscourseAPI
_buildDiscourse
in interface DiscourseAPI
infile
- The name and path of the .mmax file to load.commonPathsFile
- The name (and possibly path) of the common_paths.xml file to use. If this parameter is an empty string, the file common_paths.xml in the current directory will be used.
public static MMAX2Discourse buildDiscourse(java.lang.String infile, java.lang.String commonPathsFile)
public static MMAX2Discourse buildDiscourse(java.lang.String infile)
public final void setNameSpace(java.lang.String _nameSpace)
public final java.lang.String getNameSpace()
public final void setWordFileName(java.lang.String name)
public final java.lang.String getWordFileName()
public final void addWithID(java.lang.String id, org.w3c.dom.Element node)
public final void destroyDependentComponents()
public final boolean getHasGUI()
public final MMAX2Document getDisplayDocument()
public final void setMMAX2(MMAX2 _mmax2)
public final MMAX2 getMMAX2()
public final java.lang.Integer[] getAllDisplayAssociations()
public final Markable getMarkableAtDisplayAssociation(int displayPosition)
public final java.lang.String getHotSpotAtDisplayAssociation(int displayPosition)
public final java.lang.Integer[] removeDisplayAssociationsForMarkable(Markable removee)
public final org.apache.xerces.dom.DocumentImpl getWordDOM()
public final int getDisplayStartPositionFromDiscoursePosition(int discoursePosition)
public final int getDisplayEndPositionFromDiscoursePosition(int discoursePosition)
public final int getDiscoursePositionAtDisplayPosition(int _displayPosition)
public final MMAX2DiscourseElement getDiscourseElementByID(java.lang.String id)
DiscourseAPI
MMAX2DiscourseElement
object (i.e. base data element) associated with the ID discourseElementID (e.g. 'word_4'), or null if none exists.
getDiscourseElementByID
in interface DiscourseAPI
id
- The ID of the MMAX2DiscourseElement
to return.
MMAX2DiscourseElement
with ID discourseElementID.public final int getDiscoursePositionFromDiscourseElementID(java.lang.String id)
public final java.lang.String getDiscourseElementIDAtDiscoursePosition(int pos)
public final void registerAllDiscourseElements()
public final void registerDiscourseElement(java.lang.String id)
public final MMAX2DiscourseElement[] getDiscourseElements()
DiscourseAPI
MMAX2DiscourseElement
objects in the current discourse, ordered in discourse order.
getDiscourseElements
in interface DiscourseAPI
MMAX2DiscourseElement
objects in the current discourse.public final MMAX2DiscourseElement[] getDiscourseElements(Markable _markable)
DiscourseAPI
MMAX2DiscourseElement
objects in Markable
markable, ordered in discourse order.
getDiscourseElements
in interface DiscourseAPI
_markable
- The Markable object whose MMAX2DiscourseElement
objects are to be returned.
MMAX2DiscourseElement
objects in Markable
markable.public final MMAX2DiscourseElement getDiscourseElementAtDiscoursePosition(int discPos)
DiscourseAPI
MMAX2DiscourseElement
object (i.e. base data element) associated with discourse position discoursePosition, or null if none exists at this position.
getDiscourseElementAtDiscoursePosition
in interface DiscourseAPI
discPos
- The numeric discourse position of the MMAX2DiscourseElement
to return. This is normally the base data element's position in the base data file.
MMAX2DiscourseElement
at discourse position discoursePosition.public final MMAX2DiscourseElement getNextDiscourseElement(MMAX2DiscourseElement element)
DiscourseAPI
MMAX2DiscourseElement
object at discourse position currentElement.DiscourseElementAPI.getDiscoursePosition()
+1, or null if none exists at this position.
getNextDiscourseElement
in interface DiscourseAPI
element
- The MMAX2DiscourseElement
object at the current position, or null.
MMAX2DiscourseElement
object at discourse position currentElement.DiscourseElementAPI.getDiscoursePosition()
+1, or null if none exists at this position. If currentElement is null, the first MMAX2DiscourseElement
object in the current discourse is returned.public final MMAX2DiscourseElement getPreviousDiscourseElement(MMAX2DiscourseElement element)
DiscourseAPI
MMAX2DiscourseElement
object at discourse position currentElement.DiscourseElementAPI.getDiscoursePosition()
-1, or null if none exists at this position.
getPreviousDiscourseElement
in interface DiscourseAPI
element
- The MMAX2DiscourseElement
object at the current position, or null.
MMAX2DiscourseElement
object at discourse position currentElement.DiscourseElementAPI.getDiscoursePosition()
-1, or null if none exists at this position. If currentElement is null, the last MMAX2DiscourseElement
object in the current discourse is returned.public final org.w3c.dom.Node getDiscourseElementNode(java.lang.String ID)
public final void resetForStyleSheetReapplication()
public final void reapplyStyleSheet()
public final void applyStyleSheet(java.lang.String overrideStyleFileName)
public final void setCurrentStyleSheet(java.lang.String name)
public final java.lang.String getCurrentStyleSheet()
public final void setStyleSheetFileNames(java.lang.String[] names)
public final java.lang.String[] getStyleSheetFileNames()
public final int getCurrentDocumentPosition()
public final java.lang.String getNextDocumentChunk()
public final MarkableLevel getMarkableLevelFromAbsoluteFileName(java.lang.String absFileName)
public final boolean isCurrentlyLoaded(java.lang.String absoluteMarkableFileName)
public final java.lang.String getStyleSheetOutput()
public final void putInHash(java.lang.String key, java.lang.String value)
public final java.lang.String getFromHash(java.lang.String key)
public final MarkableLevel getMarkableLevelByName(java.lang.String name, boolean interactive)
DiscourseAPI
getMarkableLevelByName
in interface DiscourseAPI
name
- The name of the MarkableLevel
to return.interactive
- If true, a message box will be displayed if no MarkableLevel
of name levelName could be found.
MarkableLevel
object of name levelName, or null.public final MarkableChart getCurrentMarkableChart()
public final java.lang.String[] getAllDiscourseElementIDs()
public final int getDiscourseElementCount()
DiscourseAPI
MMAX2DiscourseElement
objects in this discourse.
getDiscourseElementCount
in interface DiscourseAPI
MMAX2DiscourseElement
objects in this discourse.public final void performNonGUIInitializations()
public final void setCommonBasedataPath(java.lang.String path)
public final java.lang.String getCommonBasedataPath()
public final void requestDeleteBasedataElement(org.w3c.dom.Node deletee)
public final void showEditBasedataElementWindow(java.util.ArrayList recentTexts, java.util.ArrayList recentAttributes, org.w3c.dom.Node referenceNode, int mode)
public final void basedataTextAndAttributeSelected(org.w3c.dom.Node referenceNode, int mode, java.lang.String text, java.lang.String attribute)
public final void requestAddBasedataElement(org.w3c.dom.Node referenceNode, int mode)
public final void saveBasedata(java.lang.String newFileName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |