|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
adams.data.io.input.ExcelStreamingSpreadSheetReader.SheetHandler
public static class ExcelStreamingSpreadSheetReader.SheetHandler
For reading a sheet from XML.
| Field Summary | |
|---|---|
protected HashMap<String,Cell.ContentType> |
m_CellStrings
the cell-strings. |
protected HashMap<String,Cell.ContentType> |
m_CellTypes
the cell-types. |
protected Cell.ContentType |
m_ContentType
what type the current cell is. |
protected StringBuilder |
m_LastContents
the assembled cell content. |
protected ExcelStreamingSpreadSheetReader |
m_Owner
the reader this handler belongs to. |
protected String |
m_Reference
the cell reference. |
protected SpreadSheet |
m_Sheet
the spreadsheet to add the content to. |
protected org.apache.poi.xssf.model.SharedStringsTable |
m_SST
the table for shared strings. |
protected boolean |
m_Stopped
whether the parsing was stopped. |
protected HashSet<String> |
m_UnknownCellStrings
the unknown cell-strings. |
protected HashSet<String> |
m_UnknownCellTypes
the unknown cell-types. |
| Constructor Summary | |
|---|---|
ExcelStreamingSpreadSheetReader.SheetHandler(ExcelStreamingSpreadSheetReader owner,
SpreadSheet sheet,
org.apache.poi.xssf.model.SharedStringsTable sst)
Initializes the SAX handler. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data inside an element. |
void |
endElement(String uri,
String localName,
String name)
Receive notification of the end of an element. |
HashSet<String> |
getUnknownCellStrings()
Returns the unknown cell strings that were encountered. |
HashSet<String> |
getUnknownCellTypes()
Returns the unknown cell types that were encountered. |
void |
startElement(String uri,
String localName,
String name,
Attributes attributes)
Receive notification of the start of an element. |
void |
stopExecution()
Stops the parsing. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ExcelStreamingSpreadSheetReader m_Owner
protected SpreadSheet m_Sheet
protected org.apache.poi.xssf.model.SharedStringsTable m_SST
protected StringBuilder m_LastContents
protected Cell.ContentType m_ContentType
protected String m_Reference
protected boolean m_Stopped
protected HashMap<String,Cell.ContentType> m_CellTypes
protected HashMap<String,Cell.ContentType> m_CellStrings
protected HashSet<String> m_UnknownCellTypes
protected HashSet<String> m_UnknownCellStrings
| Constructor Detail |
|---|
public ExcelStreamingSpreadSheetReader.SheetHandler(ExcelStreamingSpreadSheetReader owner,
SpreadSheet sheet,
org.apache.poi.xssf.model.SharedStringsTable sst)
owner - the reader this handler belongs tosheet - the spreadsheet to add the content tosst - the table for shared strings| Method Detail |
|---|
public void startElement(String uri,
String localName,
String name,
Attributes attributes)
throws SAXException
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName - The qualified name (with prefix), or the
empty string if qualified names are not available.attributes - The attributes attached to the element. If
there are no attributes, it shall be an empty
Attributes object.
SAXException - Any SAX exception, possibly wrapping another exception.
public void endElement(String uri,
String localName,
String name)
throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - The Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed.localName - The local name (without prefix), or the
empty string if Namespace processing is not being
performed.qName - The qualified name (with prefix), or the
empty string if qualified names are not available.
SAXException - Any SAX exception, possibly wrapping another exception.
public void characters(char[] ch,
int start,
int length)
throws SAXException
By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).
characters in interface ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerch - The characters.start - The start position in the character array.length - The number of characters to use from the
character array.
SAXException - Any SAX exception, possibly
wrapping another exception.public void stopExecution()
stopExecution in interface Stoppablepublic HashSet<String> getUnknownCellTypes()
public HashSet<String> getUnknownCellStrings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||