fr.paris.lutece.plugins.jcr.service.search
Class IndexerNodeAction

java.lang.Object
  extended by fr.paris.lutece.plugins.jcr.service.search.IndexerNodeAction
All Implemented Interfaces:
INodeAction<org.apache.lucene.document.Document,Collection<org.apache.lucene.document.Document>>

public class IndexerNodeAction
extends Object
implements INodeAction<org.apache.lucene.document.Document,Collection<org.apache.lucene.document.Document>>

Implementation of INodeAction for indexing the nodes of a JCR It stores results using TreeSet and specific Comparator


Constructor Summary
IndexerNodeAction(Comparator<org.apache.lucene.document.Document> nodeComparator, String strPluginName, AdminWorkspace adminWorkspace, String strRole)
          Default constructor
 
Method Summary
 Collection<org.apache.lucene.document.Document> createCollection()
          Creates the resulting collection
 org.apache.lucene.document.Document doAction(IRepositoryFile file)
          Creates a lucene Document using the JCR file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexerNodeAction

public IndexerNodeAction(Comparator<org.apache.lucene.document.Document> nodeComparator,
                         String strPluginName,
                         AdminWorkspace adminWorkspace,
                         String strRole)
Default constructor

Parameters:
nodeComparator - the comparator used to store the results in the collection
strPluginName - the plugin name to retrieve Spring context
adminWorkspace - the adminWorkspace to work on
Method Detail

createCollection

public Collection<org.apache.lucene.document.Document> createCollection()
Description copied from interface: INodeAction
Creates the resulting collection

Specified by:
createCollection in interface INodeAction<org.apache.lucene.document.Document,Collection<org.apache.lucene.document.Document>>
Returns:
a collection of document
See Also:
INodeAction.createCollection()

doAction

public org.apache.lucene.document.Document doAction(IRepositoryFile file)
Creates a lucene Document using the JCR file

Specified by:
doAction in interface INodeAction<org.apache.lucene.document.Document,Collection<org.apache.lucene.document.Document>>
Parameters:
file - the file to index
Returns:
a Document or null if this node should not be indexed
See Also:
INodeAction.doAction(fr.paris.lutece.plugins.jcr.business.IRepositoryFile)


Copyright © 2014 Mairie de Paris. All Rights Reserved.