org.teleal.lemma.processor
Class AbstractProcessor<IN,OUT>

java.lang.Object
  extended by org.teleal.lemma.processor.AbstractProcessor<IN,OUT>
All Implemented Interfaces:
Processor<IN,OUT>
Direct Known Subclasses:
AbstractJavadocProcessor, TocProcessor, XRefProcessor

public abstract class AbstractProcessor<IN,OUT>
extends Object
implements Processor<IN,OUT>

Encapsulates common processor functionality.

Also provides a mapping from citation anchor to Reader instance. For example, a citation anchor which addresses a text file is mapped to the text reader. You can not extend this built-in mapping, however, you can name your custom Reader class in a citation anchor with the reader style key.

Author:
Christian Bauer

Field Summary
protected  Map<String,Class<? extends Reader>> READER_SUFFIX_MAP
           
 
Constructor Summary
protected AbstractProcessor()
           
 
Method Summary
protected  CitationAnchor[] findCitationAnchors(org.teleal.common.xhtml.XHTMLElement start, String type)
           
protected  CitationAnchor[] findCitationAnchors(org.teleal.common.xhtml.XHTML input, String type)
           
 org.teleal.common.xhtml.XHTMLParser getParser()
           
 Reader getReader(CitationAnchor citation)
           
 XPath getXPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.teleal.lemma.processor.Processor
process
 

Field Detail

READER_SUFFIX_MAP

protected final Map<String,Class<? extends Reader>> READER_SUFFIX_MAP
Constructor Detail

AbstractProcessor

protected AbstractProcessor()
Method Detail

getParser

public org.teleal.common.xhtml.XHTMLParser getParser()

getXPath

public XPath getXPath()

getReader

public Reader getReader(CitationAnchor citation)

findCitationAnchors

protected CitationAnchor[] findCitationAnchors(org.teleal.common.xhtml.XHTML input,
                                               String type)

findCitationAnchors

protected CitationAnchor[] findCitationAnchors(org.teleal.common.xhtml.XHTMLElement start,
                                               String type)


Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.