Pipeline<HtmlPipelineContext>
public class HtmlPipeline extends AbstractPipeline<HtmlPipelineContext>
HtmlPipelineContext
.Constructor | Description |
---|---|
HtmlPipeline(HtmlPipelineContext hpc,
Pipeline<?> next) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addStackKeeper(Tag t,
HtmlPipelineContext hcc,
TagProcessor tp) |
|
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 t,
java.lang.String text,
ProcessObject po) |
Just calls getNext.
Override this to get notified on encountered content. |
java.lang.String |
getContextKey() |
This allows the descendant classes to be fetched from the context.
|
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. |
getLocalContext, getNext, setNext
public HtmlPipeline(HtmlPipelineContext hpc, Pipeline<?> next)
hpc
- the initial HtmlPipelineContext
next
- the next pipe in rowpublic java.lang.String getContextKey()
getContextKey
in class AbstractPipeline<HtmlPipelineContext>
getClass().getName()
as name.public Pipeline<?> init(WorkerContext context) throws PipelineException
Pipeline
WorkerContext.put(String, CustomContext)
.init
in interface Pipeline<HtmlPipelineContext>
init
in class AbstractPipeline<HtmlPipelineContext>
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<HtmlPipelineContext>
open
in class AbstractPipeline<HtmlPipelineContext>
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 t, java.lang.String text, ProcessObject po) throws PipelineException
AbstractPipeline
content
in interface Pipeline<HtmlPipelineContext>
content
in class AbstractPipeline<HtmlPipelineContext>
context
- the WorkerContextt
- 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<HtmlPipelineContext>
close
in class AbstractPipeline<HtmlPipelineContext>
context
- the WorkerContextt
- the Tagpo
- a processObject to put Writable
s inPipelineException
- can be thrown to indicate that something went wrong.protected void addStackKeeper(Tag t, HtmlPipelineContext hcc, TagProcessor tp)
Copyright © 1998–2018. All rights reserved.