public class HtmlPipeline extends AbstractPipeline<HtmlPipelineContext>
HtmlPipelineContext.| Constructor and Description |
|---|
HtmlPipeline(HtmlPipelineContext hpc,
Pipeline<?> next) |
| Modifier and Type | Method and 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,
String text,
ProcessObject po)
Just calls getNext.
Override this to get notified on encountered content. |
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, setNextpublic HtmlPipeline(HtmlPipelineContext hpc, Pipeline<?> next)
hpc - the initial HtmlPipelineContextnext - the next pipe in rowpublic String getContextKey()
getContextKey in class AbstractPipeline<HtmlPipelineContext>getClass().getName() as name.public Pipeline<?> init(WorkerContext context) throws PipelineException
PipelineWorkerContext.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
AbstractPipelineopen in interface Pipeline<HtmlPipelineContext>open in class AbstractPipeline<HtmlPipelineContext>context - the WorkerContextt - the Tagpo - a processObject to put Writables inPipelineException - can be thrown to indicate that something went wrong.public Pipeline<?> content(WorkerContext context, Tag t, String text, ProcessObject po) throws PipelineException
AbstractPipelinecontent in interface Pipeline<HtmlPipelineContext>content in class AbstractPipeline<HtmlPipelineContext>context - the WorkerContextt - the Tagtext - the contentpo - a processObject to put Writables inPipelineException - can be thrown to indicate that something went wrong.public Pipeline<?> close(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipelineclose in interface Pipeline<HtmlPipelineContext>close in class AbstractPipeline<HtmlPipelineContext>context - the WorkerContextt - the Tagpo - a processObject to put Writables inPipelineException - can be thrown to indicate that something went wrong.protected void addStackKeeper(Tag t, HtmlPipelineContext hcc, TagProcessor tp)
Copyright © 2019. All rights reserved.