/************************************************************************** /* The DocumentFactory interface defines methods for the creation of /* Lucene Documents. /* /* Copyright (c) 2003-2004 by Bernhard Bablok (mail@bablokb.de) /* /* This library is free software; you can redistribute it and/or modify /* it under the terms of the GNU Lesser General Public License as published /* by the Free Software Foundation; either version 2 of the License or /* (at your option) any later version. /* /* This library is distributed in the hope that it will be useful, but /* WITHOUT ANY WARRANTY; without even the implied warranty of /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* GNU Lesser General Public License for more details. /* /* You should have received a copy of the GNU Lesser General Public License /* along with this library; see the file COPYING.LESSER. If not, write to /* the Free Software Foundation Inc., 59 Temple Place - Suite 330, /* Boston, MA 02111-1307 USA /**************************************************************************/ package de.bablokb.luala.lib; import java.io.*; import org.apache.lucene.document.*; /** The DocumentFactory interface defines methods for the creation of Lucene Documents. @version $Revision: 1.5 $ @author $Author: bablokb $ */ public interface DocumentFactory { //////////////////////////////////////////////////////////////////////////// /** Constant for the PATH-field key.. */ public static final String PATH = "path"; //////////////////////////////////////////////////////////////////////////// /** Constant for the URI-field key.. */ public static final String URI = "uri"; //////////////////////////////////////////////////////////////////////////// /** Constant for the DATE_MOD-field key.. */ public static final String DATE_MOD = "date-modified"; //////////////////////////////////////////////////////////////////////////// /** Constant for the DATE_CREATED-field key.. */ public static final String DATE_CREATED = "date-created"; //////////////////////////////////////////////////////////////////////////// /** Constant for the CONTENT-field key. */ public static final String CONTENT = "contents"; //////////////////////////////////////////////////////////////////////////// /** Constant for the TYPE-field key. */ public static final String TYPE = "type"; //////////////////////////////////////////////////////////////////////////// /** Constant for the Author-field key. */ public static final String AUTHOR = "author"; //////////////////////////////////////////////////////////////////////////// /** Constant for the Title-field key. */ public static final String TITLE = "title"; //////////////////////////////////////////////////////////////////////////// /** Constant for the SUBJECT-field key. */ public static final String SUBJECT = "subject"; //////////////////////////////////////////////////////////////////////////// /** Constant for the Summary-field key. */ public static final String SUMMARY = "summary"; //////////////////////////////////////////////////////////////////////////// /** Constant for the KEYWORDS-field key. */ public static final String KEYWORDS = "keywords"; //////////////////////////////////////////////////////////////////////////// /** Create a Lucene-Document. @param name The name (filename, url) of the document. @return A {@link org.apache.lucene.document.Document} @throws FactoryException */ public Document createDocument(String name) throws FactoryException; //////////////////////////////////////////////////////////////////////////// /** Set the type-field of the document. @param doc The document */ public void setType(Document doc); }