public final class NdfParser extends AsciiParser<ApplicationContext> implements NdfConstants, NdfParseControl
NdfHandler about every structure and property it has
found in the NDF source file. Note that NDF data is read in streaming mode such that
not much memory is needed during parsing. It is the job of the attached custom
NdfHandler to interpret and collect the data.| Modifier and Type | Field and Description |
|---|---|
protected NdfProperties |
headerProps |
currentLine, DEFAULT_BUFF_SIZEchildTaskRef, isTestMode, monitorController, resultRef, stateFlagallowedInNames, blockCommentChar, booleanFalseChar, booleanFalseLiteral, booleanTrueChar, booleanTrueLiteral, currentNdfDocVersion, defaultTextEndChar, defaultTextParagraphChar, lineCommentChar, ndfDocAuthorKey, ndfDocCreatedKey, ndfDocEncodingKey, ndfDocTypeKey, ndfDocVersionKey, nullLiteral, quotingBreakCodes, standardBreakCodes, structureChar, textValueBreakCodes, validTextBreakSymbols| Constructor and Description |
|---|
NdfParser(ApplicationContext ctx,
FileInfo fileInfo,
java.io.InputStream stream,
NdfHandler handler) |
NdfParser(ApplicationContext ctx,
FileInfo fileInfo,
java.io.InputStream stream,
NdfHandler handler,
int buffSize) |
NdfParser(ApplicationContext ctx,
java.io.File file,
NdfHandler handler) |
NdfParser(ApplicationContext ctx,
java.io.File file,
NdfHandler handler,
int buffSize) |
NdfParser(ApplicationContext ctx,
ProgressFileInputStream progressStream,
NdfHandler handler) |
NdfParser(ApplicationContext ctx,
ProgressInputStream progressStream,
NdfHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentNestingLevel()
Returns the current nesting level.
|
NdfStructure |
getCurrentStructure()
Returns the current structure in process.
|
int |
getMaxNestingLevel()
Returns the deepest nesting level reached so far during parsing
the document.
|
long |
getParseDuration()
Returns the parsing duration in millis after parsing has been executed.
|
protected void |
performRead() |
void |
setNotifyAllProperties(boolean notifyAll)
By default only properties on top level are notified because all other
properties obtain to particular structures.
|
createAsciiLine, getNextLine, nextLine, nextWord, setBlockCommentChar, setBreakCodescheckedByte, close, createFileInputStream, executeAsync, getCurrentToRestOfLine, getCurrentWord, getFileInfo, getLineNumber, getNextWord, getReadByteCount, getReadOperationCount, getRestOfLine, isEndOfLineReached, nextDouble, nextInt, nextLong, nextShort, nextString, openFile, setEncoding, setLineCommentChar, skipLines, skipRestOfLine, skipWordsaddMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, handleFinish, handleStart, handleSuccess, hasError, hasMonitor, isCancellable, notifyProceeded, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelledgetApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelconfigureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetApplicationContextgetLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelprotected NdfProperties headerProps
public NdfParser(ApplicationContext ctx, java.io.File file, NdfHandler handler) throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic NdfParser(ApplicationContext ctx, java.io.File file, NdfHandler handler, int buffSize) throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic NdfParser(ApplicationContext ctx, ProgressInputStream progressStream, NdfHandler handler)
public NdfParser(ApplicationContext ctx, ProgressFileInputStream progressStream, NdfHandler handler)
public NdfParser(ApplicationContext ctx, FileInfo fileInfo, java.io.InputStream stream, NdfHandler handler)
public NdfParser(ApplicationContext ctx, FileInfo fileInfo, java.io.InputStream stream, NdfHandler handler, int buffSize)
public void setNotifyAllProperties(boolean notifyAll)
NdfHandler.foundProperties(NdfStructure, NdfProperties) to be
called for all properties no matter on which nesting level they were found.public NdfStructure getCurrentStructure()
NdfParseControlgetCurrentStructure in interface NdfParseControlpublic int getCurrentNestingLevel()
NdfParseControlgetCurrentNestingLevel in interface NdfParseControlpublic int getMaxNestingLevel()
NdfParseControlgetMaxNestingLevel in interface NdfParseControlpublic long getParseDuration()
protected final void performRead()
throws java.lang.Exception
performRead in class AbstractAsciiParser<ApplicationContext,AsciiLine>java.lang.ExceptionCopyright © 2014 EsprIT-Systems. All Rights Reserved.