net.grcomputing.opencms.search.lucene
Interface I_DocumentFactory

All Known Implementing Classes:
BodylessDocument, JspDocument, PageDocument, PlainDocument, TaggedPlainDocument

public interface I_DocumentFactory

All implementations of OpenCMS Document-building classes must implement this interface.

This interface provides a framework for building Documents in a way that they can be used within OpenCMS. Documents are used by the Lucene search engine to build intelligent representations of data. Documents vary from source to source (e.g. there is a different Document representation for a Page than for a JSP), and extensions to the core document types for OpenCMS might require a new Document factory.

Make sure your implementation is thread safe. No attempt is made to synchronized hits to the Document method. ALSO, the Document methods may be called any number of times on one instance of the object.

Author:
Matt Butcher mbutcher@grcomputing.net
See Also:
http://grcomputing.net

Method Summary
 Document Document(CmsObject cmso, CmsFile f)
          Takes a CmsFile instance and builds a Lucene Document suitable for index generation.
 Document Document(CmsObject cmso, CmsFile f, java.util.HashMap params)
          Takes a CmsFile instance and builds a Lucene Document suitable for index generation.
 

Method Detail

Document

public Document Document(CmsObject cmso,
                         CmsFile f)
                  throws CmsException
Takes a CmsFile instance and builds a Lucene Document suitable for index generation.

Throws:
CmsException - it cannot work with the CmsFile or CmsObject.

Document

public Document Document(CmsObject cmso,
                         CmsFile f,
                         java.util.HashMap params)
                  throws CmsException
Takes a CmsFile instance and builds a Lucene Document suitable for index generation. Allows extra parameters to be passed in via the params HashMap.

Throws:
CmsException - it cannot work with the CmsFile or CmsObject.


Copyright © 2003 Matt Butcher of Global Resources for Computing. Reporoduction and modification of this documents are allowed as in accordance with the GPL v2. Refer to COPYING.txt for information on acceptible use