Package org.apache.fop.render.mif
Class MIFHandler
- java.lang.Object
-
- org.apache.fop.fo.FOEventHandler
-
- org.apache.fop.render.mif.MIFHandler
-
public class MIFHandler extends FOEventHandler
The MIF Handler. This generates MIF output using the structure events from the FO Tree sent to this structure handler. This builds an MIF file and writes it to the output.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.commons.logging.LoglogLoggerprotected MIFFilemifFilethe MIFFile instanceprotected java.io.OutputStreamoutStreamthe OutputStream to write toprivate MIFElementparaprivate MIFElementtextFlow-
Fields inherited from class org.apache.fop.fo.FOEventHandler
fontInfo, foUserAgent
-
-
Constructor Summary
Constructors Constructor Description MIFHandler(FOUserAgent ua, java.io.OutputStream os)Creates a new MIF handler on a given OutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidappendCharacters(java.lang.String str)voidcharacter(Character c)Process a Character.voidcharacters(FOText foText)Process character data.voidendBlock(Block bl)voidendBody(TableBody tb)voidendCell(TableCell tc)voidendColumn(TableColumn tc)voidendDocument()This method is called to indicate the end of a document run.voidendFlow(Flow fl)voidendFooter(TableFooter tf)voidendFootnote(Footnote footnote)Process the ending of a footnote.voidendFootnoteBody(FootnoteBody body)Process the ending of a footnote body.voidendHeader(TableHeader th)voidendInline(Inline inl)voidendInstreamForeignObject(InstreamForeignObject ifo)Process the end of an InstreamForeignObject.voidendLeader(Leader l)Process the end of a Leader.voidendLink(BasicLink basicLink)Process end of a Link.voidendList(ListBlock lb)voidendListBody(ListItemBody listItemBody)Process end of a ListBody.voidendListItem(ListItem li)voidendListLabel(ListItemLabel listItemLabel)Process end of a ListLabel.voidendMarkup()Process end of a Markup.voidendPageNumber(PageNumber pagenum)voidendPageSequence(PageSequence pageSeq)voidendRow(TableRow tr)voidendStatic(StaticContent staticContent)Process end of a Static.voidendTable(Table tbl)voidimage(ExternalGraphic eg)Process an ExternalGraphic.voidpageRef()Process a pageRef.voidstartBlock(Block bl)voidstartBody(TableBody tb)voidstartCell(TableCell tc)voidstartColumn(TableColumn tc)voidstartDocument()This method is called to indicate the start of a new document run.voidstartFlow(Flow fl)This method is called to indicate the start of a new fo:flow or fo:static-content.voidstartFooter(TableFooter tf)voidstartFootnote(Footnote footnote)Process the start of a footnote.voidstartFootnoteBody(FootnoteBody body)Process the start of a footnote body.voidstartHeader(TableHeader th)voidstartInline(Inline inl)voidstartInstreamForeignObject(InstreamForeignObject ifo)Process the start of an InstreamForeignObject.voidstartLeader(Leader l)Process the start of a Leader.voidstartLink(BasicLink basicLink)Process start of a Link.voidstartList(ListBlock lb)voidstartListBody(ListItemBody listItemBody)Process start of a ListBody.voidstartListItem(ListItem li)voidstartListLabel(ListItemLabel listItemLabel)Process start of a ListLabel.voidstartMarkup()Process start of a Markup.voidstartPageNumber(PageNumber pagenum)voidstartPageSequence(PageSequence pageSeq)voidstartRow(TableRow tr)voidstartStatic(StaticContent staticContent)Process start of a Static.voidstartTable(Table tbl)-
Methods inherited from class org.apache.fop.fo.FOEventHandler
endBlockContainer, endExternalDocument, endPageNumberCitation, endPageNumberCitationLast, endRetrieveMarker, endRetrieveTableMarker, endRoot, endWrapper, getFontInfo, getResults, getUserAgent, restoreState, restoreState, startBlockContainer, startExternalDocument, startPageNumberCitation, startPageNumberCitationLast, startRetrieveMarker, startRetrieveTableMarker, startRoot, startWrapper
-
-
-
-
Field Detail
-
log
private static org.apache.commons.logging.Log log
Logger
-
mifFile
protected MIFFile mifFile
the MIFFile instance
-
outStream
protected java.io.OutputStream outStream
the OutputStream to write to
-
textFlow
private MIFElement textFlow
-
para
private MIFElement para
-
-
Constructor Detail
-
MIFHandler
public MIFHandler(FOUserAgent ua, java.io.OutputStream os)
Creates a new MIF handler on a given OutputStream.- Parameters:
ua- FOUserAgent instance for this processos- OutputStream to write to
-
-
Method Detail
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionThis method is called to indicate the start of a new document run.- Overrides:
startDocumentin classFOEventHandler- Throws:
org.xml.sax.SAXException- In case of a problem
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionThis method is called to indicate the end of a document run.- Overrides:
endDocumentin classFOEventHandler- Throws:
org.xml.sax.SAXException- In case of a problem
-
startPageSequence
public void startPageSequence(PageSequence pageSeq)
- Overrides:
startPageSequencein classFOEventHandler- Parameters:
pageSeq- PageSequence that is starting.
-
endPageSequence
public void endPageSequence(PageSequence pageSeq)
- Overrides:
endPageSequencein classFOEventHandler- Parameters:
pageSeq- PageSequence that is ending.
-
startFlow
public void startFlow(Flow fl)
This method is called to indicate the start of a new fo:flow or fo:static-content. This method also handles fo:static-content tags, because the StaticContent class is derived from the Flow class.- Overrides:
startFlowin classFOEventHandler- Parameters:
fl- Flow that is starting.
-
endFlow
public void endFlow(Flow fl)
- Overrides:
endFlowin classFOEventHandler- Parameters:
fl- Flow that is ending.
-
startBlock
public void startBlock(Block bl)
- Overrides:
startBlockin classFOEventHandler- Parameters:
bl- Block that is starting.
-
endBlock
public void endBlock(Block bl)
- Overrides:
endBlockin classFOEventHandler- Parameters:
bl- Block that is ending.
-
startInline
public void startInline(Inline inl)
- Overrides:
startInlinein classFOEventHandler- Parameters:
inl- Inline that is starting.
-
endInline
public void endInline(Inline inl)
- Overrides:
endInlinein classFOEventHandler- Parameters:
inl- Inline that is ending.
-
startTable
public void startTable(Table tbl)
- Overrides:
startTablein classFOEventHandler- Parameters:
tbl- Table that is starting.
-
endTable
public void endTable(Table tbl)
- Overrides:
endTablein classFOEventHandler- Parameters:
tbl- Table that is ending.
-
startColumn
public void startColumn(TableColumn tc)
- Overrides:
startColumnin classFOEventHandler- Parameters:
tc- TableColumn that is starting;
-
endColumn
public void endColumn(TableColumn tc)
- Overrides:
endColumnin classFOEventHandler- Parameters:
tc- TableColumn that is ending;
-
startHeader
public void startHeader(TableHeader th)
- Overrides:
startHeaderin classFOEventHandler- Parameters:
th- TableHeader that is starting;
-
endHeader
public void endHeader(TableHeader th)
- Overrides:
endHeaderin classFOEventHandler- Parameters:
th- TableHeader that is ending.
-
startFooter
public void startFooter(TableFooter tf)
- Overrides:
startFooterin classFOEventHandler- Parameters:
tf- TableFooter that is starting.
-
endFooter
public void endFooter(TableFooter tf)
- Overrides:
endFooterin classFOEventHandler- Parameters:
tf- TableFooter that is ending.
-
startBody
public void startBody(TableBody tb)
- Overrides:
startBodyin classFOEventHandler- Parameters:
tb- TableBody that is starting.
-
endBody
public void endBody(TableBody tb)
- Overrides:
endBodyin classFOEventHandler- Parameters:
tb- TableBody that is ending.
-
startRow
public void startRow(TableRow tr)
- Overrides:
startRowin classFOEventHandler- Parameters:
tr- TableRow that is starting.
-
endRow
public void endRow(TableRow tr)
- Overrides:
endRowin classFOEventHandler- Parameters:
tr- TableRow that is ending.
-
startCell
public void startCell(TableCell tc)
- Overrides:
startCellin classFOEventHandler- Parameters:
tc- TableCell that is starting.
-
endCell
public void endCell(TableCell tc)
- Overrides:
endCellin classFOEventHandler- Parameters:
tc- TableCell that is ending.
-
startList
public void startList(ListBlock lb)
- Overrides:
startListin classFOEventHandler- Parameters:
lb- ListBlock that is starting.
-
endList
public void endList(ListBlock lb)
- Overrides:
endListin classFOEventHandler- Parameters:
lb- ListBlock that is ending.
-
startListItem
public void startListItem(ListItem li)
- Overrides:
startListItemin classFOEventHandler- Parameters:
li- ListItem that is starting.
-
endListItem
public void endListItem(ListItem li)
- Overrides:
endListItemin classFOEventHandler- Parameters:
li- ListItem that is ending.
-
startListLabel
public void startListLabel(ListItemLabel listItemLabel)
Process start of a ListLabel.- Overrides:
startListLabelin classFOEventHandler- Parameters:
listItemLabel- ListItemLabel that is starting
-
endListLabel
public void endListLabel(ListItemLabel listItemLabel)
Process end of a ListLabel.- Overrides:
endListLabelin classFOEventHandler- Parameters:
listItemLabel- ListItemLabel that is ending
-
startListBody
public void startListBody(ListItemBody listItemBody)
Process start of a ListBody.- Overrides:
startListBodyin classFOEventHandler- Parameters:
listItemBody- ListItemBody that is starting
-
endListBody
public void endListBody(ListItemBody listItemBody)
Process end of a ListBody.- Overrides:
endListBodyin classFOEventHandler- Parameters:
listItemBody- ListItemBody that is ending
-
startStatic
public void startStatic(StaticContent staticContent)
Process start of a Static.- Overrides:
startStaticin classFOEventHandler- Parameters:
staticContent- StaticContent that is starting
-
endStatic
public void endStatic(StaticContent staticContent)
Process end of a Static.- Overrides:
endStaticin classFOEventHandler- Parameters:
staticContent- StaticContent that is ending
-
startMarkup
public void startMarkup()
Process start of a Markup.- Overrides:
startMarkupin classFOEventHandler
-
endMarkup
public void endMarkup()
Process end of a Markup.- Overrides:
endMarkupin classFOEventHandler
-
startLink
public void startLink(BasicLink basicLink)
Process start of a Link.- Overrides:
startLinkin classFOEventHandler- Parameters:
basicLink- BasicLink that is starting
-
endLink
public void endLink(BasicLink basicLink)
Process end of a Link.- Overrides:
endLinkin classFOEventHandler- Parameters:
basicLink- BasicLink that is ending
-
image
public void image(ExternalGraphic eg)
Process an ExternalGraphic.- Overrides:
imagein classFOEventHandler- Parameters:
eg- ExternalGraphic to process.
-
pageRef
public void pageRef()
Process a pageRef.- Overrides:
pageRefin classFOEventHandler
-
startInstreamForeignObject
public void startInstreamForeignObject(InstreamForeignObject ifo)
Process the start of an InstreamForeignObject.- Overrides:
startInstreamForeignObjectin classFOEventHandler- Parameters:
ifo- InstreamForeignObject that is starting
-
endInstreamForeignObject
public void endInstreamForeignObject(InstreamForeignObject ifo)
Process the end of an InstreamForeignObject.- Overrides:
endInstreamForeignObjectin classFOEventHandler- Parameters:
ifo- InstreamForeignObject that is ending
-
startFootnote
public void startFootnote(Footnote footnote)
Process the start of a footnote.- Overrides:
startFootnotein classFOEventHandler- Parameters:
footnote- Footnote that is starting
-
endFootnote
public void endFootnote(Footnote footnote)
Process the ending of a footnote.- Overrides:
endFootnotein classFOEventHandler- Parameters:
footnote- Footnote that is ending
-
startFootnoteBody
public void startFootnoteBody(FootnoteBody body)
Process the start of a footnote body.- Overrides:
startFootnoteBodyin classFOEventHandler- Parameters:
body- FootnoteBody that is starting
-
endFootnoteBody
public void endFootnoteBody(FootnoteBody body)
Process the ending of a footnote body.- Overrides:
endFootnoteBodyin classFOEventHandler- Parameters:
body- FootnoteBody that is ending
-
startLeader
public void startLeader(Leader l)
Process the start of a Leader.- Overrides:
startLeaderin classFOEventHandler- Parameters:
l- Leader that is starting
-
endLeader
public void endLeader(Leader l)
Process the end of a Leader.- Overrides:
endLeaderin classFOEventHandler- Parameters:
l- Leader that is ending
-
character
public void character(Character c)
Description copied from class:FOEventHandlerProcess a Character.- Overrides:
characterin classFOEventHandler- Parameters:
c- Character to process.
-
characters
public void characters(FOText foText)
Process character data.- Overrides:
charactersin classFOEventHandler- Parameters:
foText- text to process
-
startPageNumber
public void startPageNumber(PageNumber pagenum)
- Overrides:
startPageNumberin classFOEventHandler- Parameters:
pagenum- PageNumber that is starting.
-
endPageNumber
public void endPageNumber(PageNumber pagenum)
- Overrides:
endPageNumberin classFOEventHandler- Parameters:
pagenum- PageNumber that is ending.
-
appendCharacters
private void appendCharacters(java.lang.String str)
-
-