|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.BaseElementProcessor
public abstract class 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.
Field Summary |
---|
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(Class theclass)
get the nearest ancestor that happens to be an instance of the specified class |
protected Iterator |
getAttributes()
|
protected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Cell |
getCell()
get the current cell we're working on. |
protected 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 String |
getValue(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.AbstractLogEnabled |
---|
enableLogging, getLogger, 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 Iterator getAttributes()
protected String getValue(String name)
name
- the name of the attribute to look up
protected org.apache.poi.poifs.filesystem.POIFSFileSystem getFilesystem()
protected ElementProcessor getParent()
protected ElementProcessor getAncestor(Class theclass)
theclass
- the class we're looking for
protected String getData()
protected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Workbook getWorkbook() throws IOException
IOException
- if the workbook is missingprotected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Sheet getSheet() throws IOException
IOException
- if the sheet is missingprotected org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements.Cell getCell() throws IOException
IOException
- if the cell is missingpublic void initialize(Attribute[] attributes, ElementProcessor parent) throws 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 null
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 IOException
endProcessing
in interface ElementProcessor
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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |