fr.paris.lutece.plugins.calendar.modules.document.service.search
Class DocumentCalendarIndexer

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

public class DocumentCalendarIndexer
extends java.lang.Object
implements fr.paris.lutece.portal.service.search.SearchIndexer


Constructor Summary
DocumentCalendarIndexer()
           
 
Method Summary
 java.lang.String getDescription()
          Returns the indexer service description
static org.apache.lucene.document.Document getDocument(fr.paris.lutece.plugins.document.business.Document document, java.lang.String strRole, fr.paris.lutece.plugins.calendar.business.Event occurrence, java.lang.String strAgenda, java.lang.String strOccurrenceUrl)
          Builds a document which will be used by Lucene during the indexing of the pages of the site with the following fields : summary, uid, url, contents, title and description.
 java.util.List<org.apache.lucene.document.Document> getDocuments(java.lang.String strDocument)
          Get the calendar document
 java.util.List<java.lang.String> getListType()
          Defined by Calendar indexer.
 java.lang.String getName()
          Returns the indexer service name
 java.lang.String getSpecificSearchAppUrl()
          Defined by Calendar indexer.
 java.lang.String getVersion()
          Returns the indexer service version
 void indexDocuments()
          Index all documents
 void indexSubject(fr.paris.lutece.plugins.document.business.Document document, java.lang.String sRoleKey, fr.paris.lutece.plugins.calendar.business.OccurrenceEvent occurrence, java.lang.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
 

Constructor Detail

DocumentCalendarIndexer

public DocumentCalendarIndexer()
Method Detail

indexDocuments

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

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

indexSubject

public void indexSubject(fr.paris.lutece.plugins.document.business.Document document,
                         java.lang.String sRoleKey,
                         fr.paris.lutece.plugins.calendar.business.OccurrenceEvent occurrence,
                         java.lang.String strAgenda)
                  throws java.io.IOException,
                         java.lang.InterruptedException
Recursive method for indexing a calendar event

Parameters:
faq - the faq linked to the subject
subject - the subject
Throws:
java.io.IOException - I/O Exception
java.lang.InterruptedException - interruptedException

getDocuments

public java.util.List<org.apache.lucene.document.Document> getDocuments(java.lang.String strDocument)
                                                                 throws java.io.IOException,
                                                                        java.lang.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:
java.io.IOException - the exception
java.lang.InterruptedException - the exception
fr.paris.lutece.portal.service.message.SiteMessageException - the exception

getName

public java.lang.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 java.lang.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 java.lang.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

getDocument

public static org.apache.lucene.document.Document getDocument(fr.paris.lutece.plugins.document.business.Document document,
                                                              java.lang.String strRole,
                                                              fr.paris.lutece.plugins.calendar.business.Event occurrence,
                                                              java.lang.String strAgenda,
                                                              java.lang.String strOccurrenceUrl)
                                                       throws java.io.IOException,
                                                              java.lang.InterruptedException
Builds a document which will be used by Lucene during the indexing of the pages of the site with the following fields : summary, uid, url, contents, title and description.

Parameters:
document - the document to index
strUrl - the url of the documents
strRole - the lutece role of the page associate to the document
strPortletDocumentId - the document id concatened to the id portlet with a & in the middle
Returns:
the built Document
Throws:
java.io.IOException - The IO Exception
java.lang.InterruptedException - The InterruptedException

getListType

public java.util.List<java.lang.String> getListType()
Defined by Calendar indexer.

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

getSpecificSearchAppUrl

public java.lang.String getSpecificSearchAppUrl()
Defined by Calendar indexer.

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


Copyright © 2011 Mairie de Paris. All Rights Reserved.