|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.comarquage.util.search.XslXalanExtension
public class XslXalanExtension
Give extended functions to help to construct an index by XSL parsing
Functions must be declared in XSL source file with (it's an example):
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axslt="http://xml.apache.org/xslt"
xmlns:lucene="http://www.lutece.fr/plugins/comarquage/lucene"
extension-element-prefixes="lucene"
>
<axslt:component prefix="lucene"
functions="startIndexer,startDocument,addText,endDocument,endIndexer">
<axslt:script lang="javaclass"
src="fr.paris.lutece.plugins.comarquage.util.Test"/>
</axslt:component>
And must be used like:
<xsl:value-of select="lucene:startIndexer('indexDir', true())"/>
| Constructor Summary | |
|---|---|
XslXalanExtension()
Public constructor Reflection |
|
| Method Summary | |
|---|---|
java.lang.Boolean |
addKeyword(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
Add a new keyword attribute to the document (a keyword attribute is store, indexed and not tokenized) |
java.lang.Boolean |
addKeywords(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValues,
java.lang.String separators)
Add a new keywords attributes to the document (a keyword attribute is store, indexed and not tokenized) |
java.lang.Boolean |
addText(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
Add a new text attribute to the document (a text attribute is store, indexed and tokenized) |
java.lang.Boolean |
addUnIndexed(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
Add a new undexed attribute to the document (a undexed attribute is store, no indexed and tokenized) |
java.lang.Boolean |
addUnStored(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
Add a new unstored (indexed) attribute to the document (a unstored attribute is no stored, indexed and tokenized) |
java.lang.Boolean |
endDocument(org.apache.xalan.extensions.ExpressionContext context)
Add a document to index |
java.lang.Boolean |
endIndexer(org.apache.xalan.extensions.ExpressionContext context)
Stop (close) the indexer |
java.lang.Boolean |
optimize(org.apache.xalan.extensions.ExpressionContext context)
Optimize the index directory |
java.lang.Boolean |
startDocument(org.apache.xalan.extensions.ExpressionContext context)
Start a new Lucene document |
java.lang.Boolean |
startIndexer(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strPath,
java.lang.Boolean bCreate)
Start Lucene indexer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XslXalanExtension()
| Method Detail |
|---|
public java.lang.Boolean startIndexer(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strPath,
java.lang.Boolean bCreate)
context - The node context of Xalan executionstrPath - The path to directory indexbCreate - The directory must be create?
true means "All is ok")public java.lang.Boolean optimize(org.apache.xalan.extensions.ExpressionContext context)
context - The node context of Xalan execution
true means "All is ok")public java.lang.Boolean endIndexer(org.apache.xalan.extensions.ExpressionContext context)
context - The node context of Xalan execution
true means "All is ok")public java.lang.Boolean startDocument(org.apache.xalan.extensions.ExpressionContext context)
context - The node context of Xalan execution
true means "All is ok")
public java.lang.Boolean addText(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
context - The node context of Xalan executionstrKey - Lucene attribute namestrValue - Text value
true means "All is ok")
public java.lang.Boolean addKeyword(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
context - The node context of Xalan executionstrKey - Lucene attribute namestrValue - Keyword value
true means "All is ok")
public java.lang.Boolean addKeywords(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValues,
java.lang.String separators)
context - The node context of Xalan executionstrKey - Lucene attribute namestrValues - Keywords value (separate by separators char)separators - The separators of key words (for use with StringTokenizer)
true means "All is ok")
public java.lang.Boolean addUnIndexed(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
context - The node context of Xalan executionstrKey - Lucene attribute namestrValue - Text value
true means "All is ok")
public java.lang.Boolean addUnStored(org.apache.xalan.extensions.ExpressionContext context,
java.lang.String strKey,
java.lang.String strValue)
context - The node context of Xalan executionstrKey - Lucene attribute namestrValue - Text value
true means "All is ok")public java.lang.Boolean endDocument(org.apache.xalan.extensions.ExpressionContext context)
context - The node context of Xalan execution
true means "All is ok")
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||