fr.paris.lutece.plugins.calendar.service.search
Class CalendarIndexer

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.service.search.CalendarIndexer
All Implemented Interfaces:
fr.paris.lutece.portal.service.search.SearchIndexer

public class CalendarIndexer
extends Object
implements fr.paris.lutece.portal.service.search.SearchIndexer

CalendarIndexer


Field Summary
static String PROPERTY_INDEXER_NAME
           
static String SHORT_NAME
           
 
Constructor Summary
CalendarIndexer()
           
 
Method Summary
 String getDescription()
          Returns the indexer service description
static org.apache.lucene.document.Document getDocument(OccurrenceEvent occurrence, String strRoleKey, String strUrl, String strAgenda)
          Builds a document which will be used by Lucene during the indexing of the calendar list
 List<org.apache.lucene.document.Document> getDocuments(String strDocument)
          Get the calendar document
 List<String> getListType()
          
 String getName()
          Returns the indexer service name
 String getSpecificSearchAppUrl()
          
 String getVersion()
          Returns the indexer service version
 void indexDocuments()
          Index all documents
 void indexSubject(Object oEvent, String sRoleKey, String strAgenda)
          Recursive method for indexing a calendar event
 boolean isEnable()
          Tells whether the service is enable or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_INDEXER_NAME

public static final String PROPERTY_INDEXER_NAME
See Also:
Constant Field Values

SHORT_NAME

public static final String SHORT_NAME
See Also:
Constant Field Values
Constructor Detail

CalendarIndexer

public CalendarIndexer()
Method Detail

indexDocuments

public void indexDocuments()
                    throws IOException,
                           InterruptedException,
                           fr.paris.lutece.portal.service.message.SiteMessageException
Index all documents

Specified by:
indexDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
Throws:
IOException - the exception
InterruptedException - the exception
fr.paris.lutece.portal.service.message.SiteMessageException - the exception

indexSubject

public void indexSubject(Object oEvent,
                         String sRoleKey,
                         String strAgenda)
                  throws IOException,
                         InterruptedException
Recursive method for indexing a calendar event

Throws:
IOException - I/O Exception
InterruptedException - interruptedException

getDocuments

public List<org.apache.lucene.document.Document> getDocuments(String strDocument)
                                                       throws IOException,
                                                              InterruptedException,
                                                              fr.paris.lutece.portal.service.message.SiteMessageException
Get the calendar document

Specified by:
getDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
Parameters:
strDocument - id of the subject to index
Returns:
The list of lucene documents
Throws:
IOException - the exception
InterruptedException - the exception
fr.paris.lutece.portal.service.message.SiteMessageException - the exception

getDocument

public static org.apache.lucene.document.Document getDocument(OccurrenceEvent occurrence,
                                                              String strRoleKey,
                                                              String strUrl,
                                                              String strAgenda)
                                                       throws IOException,
                                                              InterruptedException
Builds a document which will be used by Lucene during the indexing of the calendar list

Parameters:
occurrence - The occurence event
strUrl - the url of the subject
strRoleKey - The role key
strAgenda - the calendar id
Returns:
A Lucene Document containing QuestionAnswer Data
Throws:
IOException - The IO Exception
InterruptedException - The InterruptedException

getName

public String getName()
Returns the indexer service name

Specified by:
getName in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
the indexer service name

getVersion

public String getVersion()
Returns the indexer service version

Specified by:
getVersion in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
the indexer service version

getDescription

public String getDescription()
Returns the indexer service description

Specified by:
getDescription in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
the indexer service description

isEnable

public boolean isEnable()
Tells whether the service is enable or not

Specified by:
isEnable in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
true if enable, otherwise false

getListType

public List<String> getListType()

Specified by:
getListType in interface fr.paris.lutece.portal.service.search.SearchIndexer

getSpecificSearchAppUrl

public String getSpecificSearchAppUrl()

Specified by:
getSpecificSearchAppUrl in interface fr.paris.lutece.portal.service.search.SearchIndexer


Copyright © 2014 Mairie de Paris. All Rights Reserved.