|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--corpora.markup.Marker
| Constructor Summary | |
Marker()
Initialises auto-marker workspace. |
|
| Method Summary | |
boolean |
closeUntil(java.io.BufferedWriter xmlBuffer,
java.lang.String element,
boolean include)
Closes all opened stack elements until given element. |
int |
countElement(java.lang.String element)
Counts each opened element in structure tree that matches the given element. |
java.io.BufferedWriter |
createLog(java.lang.String logFile)
Creates log file of automatic structuring and marking process. |
java.io.BufferedWriter |
createXML(java.lang.String xmlFile,
java.lang.String dtd)
Creates transformation file that will contain marked text. |
java.io.BufferedReader |
getConfig(java.lang.String configFile)
Opens auto-marker configuration file. |
java.io.BufferedReader |
getSource(java.lang.String srcFile)
Opens source file - text to be structured and marked. |
void |
openElement(java.io.BufferedWriter xmlBuffer,
java.lang.String element)
Writes opening element into transformation file and pushes it into stack. |
java.lang.String |
readSource(java.io.BufferedReader srcBuffer)
Reads current row of source file. |
java.lang.String |
topElement()
Returns last opened element name. |
void |
writeLog(java.io.BufferedWriter logBuffer,
java.lang.String type,
java.lang.String text)
Writes record of problem event in log file. |
void |
writeXML(java.io.BufferedWriter xmlBuffer,
java.lang.String xmlRecord,
int newLines)
Writes marked string in transformation file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Marker()
| Method Detail |
public boolean closeUntil(java.io.BufferedWriter xmlBuffer,
java.lang.String element,
boolean include)
throws java.lang.Exception
xmlBuffer - buffered writer of transformation file.element - the given element - element to close until.include - if set to 'true' closes all element including the given one, otherwise closes until the given element.
java.lang.Exceptionpublic int countElement(java.lang.String element)
element - matcher element.
public java.io.BufferedWriter createLog(java.lang.String logFile)
throws java.lang.Exception
logFile - log file name without extension (i.e. 'log_collection').
java.lang.Exception
public java.io.BufferedWriter createXML(java.lang.String xmlFile,
java.lang.String dtd)
throws java.lang.Exception
xmlFile - transformation file name without extension (i.e. 'collection')
java.lang.Exception
public java.io.BufferedReader getConfig(java.lang.String configFile)
throws java.lang.Exception
configFile - configuration file name with extension (i.e. 'config.xml').
java.lang.Exception
public java.io.BufferedReader getSource(java.lang.String srcFile)
throws java.lang.Exception
java.lang.Exception
public void openElement(java.io.BufferedWriter xmlBuffer,
java.lang.String element)
throws java.lang.Exception
xmlBuffer - buffered writer of transformation file.element - element name (string) to open.
java.lang.Exception
public java.lang.String readSource(java.io.BufferedReader srcBuffer)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String topElement()
public void writeXML(java.io.BufferedWriter xmlBuffer,
java.lang.String xmlRecord,
int newLines)
throws java.lang.Exception
xmlBuffer - buffered writer of transformation file.xmlRecord - string (includes one-line opening-closing xml tags, that doesn't need openElement method) to write in transformation file.newLines - count of actual new lines to write in transformation file (i.e. count of '\r\n').
java.lang.Exception
public void writeLog(java.io.BufferedWriter logBuffer,
java.lang.String type,
java.lang.String text)
throws java.lang.Exception
logBuffer - buffered writer of log file.type - type of log record (title).text - text string of log record.
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||