org.ceryle.util.search
Class DocumentFactory

java.lang.Object
  extended by org.ceryle.util.search.DocumentFactory
Direct Known Subclasses:
XNodeDocumentFactory

public class DocumentFactory
extends Object

A factory for creating Lucene Documents based on file system contents.

Since:
JDK1.4
Version:
$Id: DocumentFactory.java,v 1.7 2007-06-15 12:10:03 altheim Exp $
Author:
Murray Altheim

Field Summary
static String FIELD_CONTENT
          The token identifier for the Document content field.
static String FIELD_MODIFIED
          The token identifier for the Document modification date field.
static String FIELD_SYSTEMID
          The token identifier for the Document system identifier (path) field.
static String FIELD_TITLE
          The token identifier for the Document title field.
 
Constructor Summary
protected DocumentFactory()
           
 
Method Summary
static org.apache.lucene.document.Document createDocument(File file)
          Creates a Document for a File.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_TITLE

public static final String FIELD_TITLE
The token identifier for the Document title field. This field is equivalent to DC.Title, is called "title" and is searchable.

See Also:
Constant Field Values

FIELD_CONTENT

public static final String FIELD_CONTENT
The token identifier for the Document content field. This is the main document body and is searchable without a field designator.

See Also:
Constant Field Values

FIELD_SYSTEMID

public static final String FIELD_SYSTEMID
The token identifier for the Document system identifier (path) field. This field is equivalent to DC.Identifier and is searchable.

See Also:
Constant Field Values

FIELD_MODIFIED

public static final String FIELD_MODIFIED
The token identifier for the Document modification date field. This field is called "modified" and is searchable.

See Also:
Constant Field Values
Constructor Detail

DocumentFactory

protected DocumentFactory()
Method Detail

createDocument

public static org.apache.lucene.document.Document createDocument(File file)
                                                          throws SearchException
Creates a Document for a File.

The document has three fields:



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.