|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.apache.cocoon.transformation.LuceneIndexTransformer
A lucene index creation transformer.
See LuceneIndexTransformer documentation on the Cocoon Wiki.
TODO: Write more documentation.
Field Summary | |
static String |
ANALYZER_CLASSNAME_CONFIG
|
static String |
ANALYZER_CLASSNAME_DEFAULT
|
static String |
ANALYZER_CLASSNAME_PARAMETER
|
static String |
CDATA
|
static String |
DIRECTORY_CONFIG
|
static String |
DIRECTORY_DEFAULT
|
static String |
DIRECTORY_PARAMETER
|
static String |
LUCENE_DOCUMENT_ELEMENT
|
static String |
LUCENE_DOCUMENT_URL_ATTRIBUTE
|
static String |
LUCENE_ELAPSED_TIME_ATTRIBUTE
|
static String |
LUCENE_ELEMENT_ATTR_STORE_VALUE
|
static String |
LUCENE_ELEMENT_ATTR_TO_TEXT_ATTRIBUTE
|
static String |
LUCENE_QUERY_ANALYZER_ATTRIBUTE
|
static String |
LUCENE_QUERY_CREATE_ATTRIBUTE
|
static String |
LUCENE_QUERY_DIRECTORY_ATTRIBUTE
|
static String |
LUCENE_QUERY_ELEMENT
|
static String |
LUCENE_QUERY_MERGE_FACTOR_ATTRIBUTE
|
static String |
LUCENE_URI
|
static String |
MERGE_FACTOR_CONFIG
|
static int |
MERGE_FACTOR_DEFAULT
|
static String |
MERGE_FACTOR_PARAMETER
|
protected File |
workDir
|
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
Constructor Summary | |
LuceneIndexTransformer()
|
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data. |
void |
configure(Configuration conf)
Configure the transformer. |
void |
contextualize(Context context)
Contextualize this class |
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Receive notification of the end of an element. |
void |
endPrefixMapping(String prefix)
End the scope of a prefix-URI mapping. |
Serializable |
getKey()
Generate the unique key. |
SourceValidity |
getValidity()
Generate the validity object. |
void |
recycle()
Recycle the producer by removing references, and resetting handlers to null (empty) implementations. |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters parameters)
Setup the transformer. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Receive notification of the beginning of an element. |
void |
startPrefixMapping(String prefix,
String uri)
Begin the scope of a prefix-URI Namespace mapping. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
comment, endCDATA, endDTD, endEntity, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startEntity |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
Field Detail |
public static final String ANALYZER_CLASSNAME_CONFIG
public static final String ANALYZER_CLASSNAME_PARAMETER
public static final String ANALYZER_CLASSNAME_DEFAULT
public static final String DIRECTORY_CONFIG
public static final String DIRECTORY_PARAMETER
public static final String DIRECTORY_DEFAULT
public static final String MERGE_FACTOR_CONFIG
public static final String MERGE_FACTOR_PARAMETER
public static final int MERGE_FACTOR_DEFAULT
public static final String LUCENE_URI
public static final String LUCENE_QUERY_ELEMENT
public static final String LUCENE_QUERY_ANALYZER_ATTRIBUTE
public static final String LUCENE_QUERY_DIRECTORY_ATTRIBUTE
public static final String LUCENE_QUERY_CREATE_ATTRIBUTE
public static final String LUCENE_QUERY_MERGE_FACTOR_ATTRIBUTE
public static final String LUCENE_DOCUMENT_ELEMENT
public static final String LUCENE_DOCUMENT_URL_ATTRIBUTE
public static final String LUCENE_ELEMENT_ATTR_TO_TEXT_ATTRIBUTE
public static final String LUCENE_ELEMENT_ATTR_STORE_VALUE
public static final String LUCENE_ELAPSED_TIME_ATTRIBUTE
public static final String CDATA
protected File workDir
Constructor Detail |
public LuceneIndexTransformer()
Method Detail |
public void configure(Configuration conf) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws ProcessingException, SAXException, IOException
<map:transform>
element in the sitemap.
These parameters are optional:
If no parameters are specified here then the defaults are
supplied by the component configuration.
Any parameters specified here may be over-ridden by attributes
of the lucene:index element in the input document.
setup
in interface SitemapModelComponent
resolver
- The SourceResolver
to find resources within your context.objectModel
- A java.util.Map
that contains the request and session information.src
- The value of the "src" attribute in the sitemap.parameters
- The sitemap parameters passed into your component.
ProcessingException
- if there is any other unexpected problem.
IOException
- if there is a problem reading files.
SAXException
- if there is a problem reading a SAX stream.public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void recycle()
AbstractXMLProducer
recycle
in interface Recyclable
recycle
in class AbstractXMLProducer
public Serializable getKey()
getKey
in interface CacheableProcessingComponent
public SourceValidity getValidity()
getValidity
in interface CacheableProcessingComponent
null
if the
component is currently not cacheable.public void startDocument() throws SAXException
AbstractXMLPipe
startDocument
in interface ContentHandler
startDocument
in class AbstractXMLPipe
SAXException
public void endDocument() throws SAXException
AbstractXMLPipe
endDocument
in interface ContentHandler
endDocument
in class AbstractXMLPipe
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class AbstractXMLPipe
prefix
- The Namespace prefix being declared.uri
- The Namespace URI the prefix is mapped to.
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class AbstractXMLPipe
prefix
- The prefix that was being mapping.
SAXException
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
AbstractXMLPipe
startElement
in interface ContentHandler
startElement
in class AbstractXMLPipe
namespaceURI
- The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName
- The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.atts
- The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
AbstractXMLPipe
endElement
in interface ContentHandler
endElement
in class AbstractXMLPipe
namespaceURI
- The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.qName
- The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
AbstractXMLPipe
characters
in interface ContentHandler
characters
in class AbstractXMLPipe
ch
- The characters from the XML document.start
- The start position in the array.length
- The number of characters to read from the array.
SAXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |