net.grcomputing.opencms.search.lucene
Class PageDocument
java.lang.Object
|
+--net.grcomputing.opencms.search.lucene.PageDocument
- All Implemented Interfaces:
- I_DocumentConstants, I_DocumentFactory
- public class PageDocument
- extends java.lang.Object
- implements I_DocumentConstants, I_DocumentFactory
This class serves as a document factory for OpenCMS resources. It produces
Lucene Document objects that contain the correct fields for indexing OpenCMS
resources. Unlike some of the other Lucene implementations, this one is
highly coupled with the OpenCMS API - thereby taking advantage of properties
security settings, etc.
Essentially, the main purpose of this method is to provide factories for
Document instances that are specific to the types of resources in OpenCMS.
For instance, we know that a Page will have a name, a title, and probably
description and keywords. We also know that it is an XML document with HTML
stored in the CDATA section. These bits of information provide information
that we can use to generate an appropriate Document representation.
- Author:
- Matt Butcher mbutcher@grcomputing.net
- See Also:
- http://grcomputing.net
Method Summary |
Document |
Document(CmsObject cmso,
CmsFile f)
Takes a Page instance and builds a Lucene Document suitable for
index generation. |
Document |
Document(CmsObject cmso,
CmsFile f,
java.util.HashMap p)
Takes a Page instance and builds a Lucene Document suitable for
index generation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageDocument
public PageDocument()
Document
public Document Document(CmsObject cmso,
CmsFile f,
java.util.HashMap p)
throws CmsException
- Takes a Page instance and builds a Lucene Document suitable for
index generation.
- Specified by:
Document
in interface I_DocumentFactory
- Throws:
CmsException
- it cannot work with the CmsFile or CmsObject.
Document
public Document Document(CmsObject cmso,
CmsFile f)
throws CmsException
- Takes a Page instance and builds a Lucene Document suitable for
index generation.
- Specified by:
Document
in interface I_DocumentFactory
- 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