Package org.vast.swe
Class XmlDataParserDOM
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataParser
org.vast.swe.XmlDataParserDOM
- All Implemented Interfaces:
 DataStreamParser
Writes CDM XML data stream using the given data components structure directly inside a DOM.
- Since:
 - Feb 29, 2008
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Elementprotected DOMHelperprotected Stringprotected intprotected Stringprotected intprotected intprotected AsciiDataParserFields inherited from class org.vast.swe.AbstractDataParser
CHOICE_ERROR, dataTypeUtils, renewDataBlock, stopParsing, STREAM_ERRORFields inherited from class org.vast.swe.DataTreeVisitor
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected ElementgetCurrentElement(DataComponent componentInfo) protected StringgetElementName(DataComponent component) protected booleanmoreData()Checks if more data is available from the streamvoidparse(InputStream inputStream) protected voidprocessAtom(ScalarComponent component) Processes a scalar componentprotected booleanprocessBlock(DataComponent blockComponent) Processes an aggregate componentvoidvoidreset()Reset the parser before parsing a new tupleprotected voidvoidsetInput(InputStream inputStream) Methods inherited from class org.vast.swe.AbstractDataParser
parse, parse, parseNextBlock, setDataComponents, setRenewDataBlock, stopMethods inherited from class org.vast.swe.DataTreeVisitor
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vast.cdm.common.DataStreamParser
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler 
- 
Field Details
- 
dom
 - 
currentParentElt
 - 
namespace
 - 
prefix
 - 
prevStackSize
protected int prevStackSize - 
tokenParser
 - 
recordCounter
protected int recordCounter - 
numRecord
protected int numRecord 
 - 
 - 
Constructor Details
- 
XmlDataParserDOM
public XmlDataParserDOM() 
 - 
 - 
Method Details
- 
setInput
- Throws:
 IOException
 - 
parse
- Throws:
 IOException
 - 
read
- Throws:
 IOException
 - 
moreData
protected boolean moreData()Checks if more data is available from the stream- Specified by:
 moreDatain classAbstractDataParser- Returns:
 - true if more data needs to be parsed, false otherwise
 
 - 
reset
public void reset()Description copied from class:DataTreeVisitorReset the parser before parsing a new tuple- Specified by:
 resetin interfaceDataStreamParser- Overrides:
 resetin classAbstractDataParser
 - 
getElementName
 - 
setCurrentParent
protected void setCurrentParent() - 
getCurrentElement
- Throws:
 IOException
 - 
processBlock
Description copied from class:DataTreeVisitorProcesses an aggregate component- Specified by:
 processBlockin classDataTreeVisitor- Returns:
 - true if children should be processed, false otherwise
 - Throws:
 IOException
 - 
processAtom
Description copied from class:DataTreeVisitorProcesses a scalar component- Specified by:
 processAtomin classDataTreeVisitor- Throws:
 IOException
 - 
close
- Throws:
 IOException
 
 -