Pipeline<MapContext>
public class PdfWriterPipeline extends AbstractPipeline<MapContext>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
CONTINUOUS |
The key for the a boolean in the
MapContext used as CustomContext . |
static java.lang.String |
DOCUMENT |
|
static java.lang.String |
WRITER |
Constructor | Description |
---|---|
PdfWriterPipeline() |
|
PdfWriterPipeline(Document doc,
PdfWriter writer) |
|
PdfWriterPipeline(Pipeline<?> next) |
Modifier and Type | Method | Description |
---|---|---|
Pipeline<?> |
close(WorkerContext context,
Tag t,
ProcessObject po) |
Just calls getNext.
Override this to get notified on encountered closing tags. |
Pipeline<?> |
content(WorkerContext context,
Tag currentTag,
java.lang.String text,
ProcessObject po) |
Just calls getNext.
Override this to get notified on encountered content. |
Pipeline<?> |
init(WorkerContext context) |
The init method allows implementation to initialize the pipeline.
|
Pipeline<?> |
open(WorkerContext context,
Tag t,
ProcessObject po) |
Just calls getNext.
Override this to get notified on encountered opening tags. |
void |
setDocument(Document document) |
The document to write to.
|
void |
setWriter(PdfWriter writer) |
The writer used to write to the document.
|
getContextKey, getLocalContext, getNext, setNext
public static final java.lang.String DOCUMENT
public static final java.lang.String WRITER
public static final java.lang.String CONTINUOUS
MapContext
used as CustomContext
. Setting to true enables swallowing of DocumentExceptionspublic PdfWriterPipeline()
public PdfWriterPipeline(Pipeline<?> next)
next
- the next pipeline if any.public Pipeline<?> init(WorkerContext context) throws PipelineException
Pipeline
WorkerContext.put(String, CustomContext)
.init
in interface Pipeline<MapContext>
init
in class AbstractPipeline<MapContext>
context
- the WorkerContextPipelineException
- can be thrown to indicate that something went wrong.public Pipeline<?> open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipeline
open
in interface Pipeline<MapContext>
open
in class AbstractPipeline<MapContext>
context
- the WorkerContextt
- the Tagpo
- a processObject to put Writable
s inPipelineException
- can be thrown to indicate that something went wrong.public Pipeline<?> content(WorkerContext context, Tag currentTag, java.lang.String text, ProcessObject po) throws PipelineException
AbstractPipeline
content
in interface Pipeline<MapContext>
content
in class AbstractPipeline<MapContext>
context
- the WorkerContextcurrentTag
- the Tagtext
- the contentpo
- a processObject to put Writable
s inPipelineException
- can be thrown to indicate that something went wrong.public Pipeline<?> close(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipeline
close
in interface Pipeline<MapContext>
close
in class AbstractPipeline<MapContext>
context
- the WorkerContextt
- the Tagpo
- a processObject to put Writable
s inPipelineException
- can be thrown to indicate that something went wrong.public void setDocument(Document document)
document
- the Documentpublic void setWriter(PdfWriter writer)
writer
- the writer.Copyright © 1998–2018. All rights reserved.