|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.BaseElementProcessor
The BaseElementProcessor class provides default behavior for classes that can handle a particular XML element's content. It is intended that all ElementProcessors should extend this class. This class is declared Abstract although it has no abstract methods. It can be used 'as is' for a no-op ElementProcessor, and an ElementProcessor that chooses to simply extend this class with no overrides will be a no-op ElementProcessor.
Fields inherited from interface org.apache.cocoon.components.elementprocessor.ElementProcessor |
ROLE |
Constructor Summary | |
protected |
BaseElementProcessor(Attribute[] implied_attributes)
Constructor |
Method Summary | |
void |
acceptCharacters(char[] data)
The data provided in this method call comes from the corresponding XML element's contents. |
void |
acceptWhitespaceCharacters(char[] data)
The data provided in this method call comes from the corresponding XML element's contents. |
void |
endProcessing()
This is the last method call executed by the POIFSSerializer. |
protected ElementProcessor |
getAncestor(java.lang.Class theclass)
get the nearest ancestor that happens to be an instance of the specified class |
protected java.util.Iterator |
getAttributes()
|
protected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Cell |
getCell()
get the current cell we're working on. |
protected java.lang.String |
getData()
|
protected org.apache.poi.poifs.filesystem.POIFSFileSystem |
getFilesystem()
|
protected ElementProcessor |
getParent()
|
protected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Sheet |
getSheet()
get the current sheet we're working on. |
protected java.lang.String |
getValue(java.lang.String name)
Get the value of an attribute |
protected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Workbook |
getWorkbook()
get the workbook we're working on. |
void |
initialize(Attribute[] attributes,
ElementProcessor parent)
The implementation should walk the array of attributes and perform appropriate actions based on that data. |
void |
setFilesystem(org.apache.poi.poifs.filesystem.POIFSFileSystem fs)
Set the POIFSFileSystem for the element processor |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected BaseElementProcessor(Attribute[] implied_attributes)
implied_attributes
- an array of Attributes which might
not appear in the initialization call
because they are implied, and the SAX
processor will not automatically
generate them.Method Detail |
protected java.util.Iterator getAttributes()
protected java.lang.String getValue(java.lang.String name)
name
- the name of the attribute to look upprotected org.apache.poi.poifs.filesystem.POIFSFileSystem getFilesystem()
protected ElementProcessor getParent()
protected ElementProcessor getAncestor(java.lang.Class theclass)
theclass
- the class we're looking forprotected java.lang.String getData()
protected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Workbook getWorkbook() throws java.io.IOException
java.io.IOException
- if the workbook is missingprotected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Sheet getSheet() throws java.io.IOException
java.io.IOException
- if the sheet is missingprotected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Cell getCell() throws java.io.IOException
java.io.IOException
- if the cell is missingpublic void initialize(Attribute[] attributes, ElementProcessor parent) throws java.io.IOException
for (int k = 0; k < attributes.length; k++)
{
Attribute attr = attributes[ k ];
// process attribute
}
initialize
in interface ElementProcessor
attributes
- the array of Attribute instances; may be
empty, will never be nullparent
- the parent ElementProcessor; may be nulljava.io.IOException
- if anything is wrongpublic void acceptCharacters(char[] data)
acceptCharacters
in interface ElementProcessor
data
- the character datapublic void acceptWhitespaceCharacters(char[] data)
acceptWhitespaceCharacters
in interface ElementProcessor
data
- the whitespace characterspublic void endProcessing() throws java.io.IOException
endProcessing
in interface ElementProcessor
java.io.IOException
- public void setFilesystem(org.apache.poi.poifs.filesystem.POIFSFileSystem fs)
setFilesystem
in interface POIFSElementProcessor
fs
- the POIFSFileSystem instance
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |