public class IFConcatenator
extends java.lang.Object
Note: This class will filter/ignore any document navigation events. Support for this may be added later.
Note: document-level extensions will only be transferred from the first document passed in. If you need to merge extensions from all the concatenated documents, you may have to merge these manually on the XML level, for example using XSLT.
Constructor and Description |
---|
IFConcatenator(IFDocumentHandler targetHandler,
org.apache.xmlgraphics.xmp.Metadata metadata)
Creates a new IF concatenator.
|
Modifier and Type | Method and Description |
---|---|
void |
appendDocument(javax.xml.transform.Source src)
Appends another intermediate format document to the current output file.
|
void |
finish()
Properly finishes the current output file by creating an empty document trailer and calling
IFDocumentHandler.endDocument() . |
protected IFDocumentHandler |
getTargetHandler()
Returns the target document handler.
|
public IFConcatenator(IFDocumentHandler targetHandler, org.apache.xmlgraphics.xmp.Metadata metadata) throws IFException
targetHandler
- the target document handlermetadata
- the metadata object for the generated file (may be null)IFException
- if an IF-related error occursprotected IFDocumentHandler getTargetHandler()
public void finish() throws IFException
IFDocumentHandler.endDocument()
.IFException
- if an IF-related error occurspublic void appendDocument(javax.xml.transform.Source src) throws javax.xml.transform.TransformerException, IFException
finish()
has been called.src
- the JAXP Source identifying the input documentjavax.xml.transform.TransformerException
- if an XML-related exception occurs duringIFException
- if an IF-related error occursCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.