//============================================================================== // DocumentFilter.java //============================================================================== package tribble.repository; import java.lang.Exception; import java.lang.String; /******************************************************************************* * Generic repository document search filter. * *

* A document repository contains document folders, which in turn * contains documents. A repository reader can search for * documents within a repository folder, based on some kind of searching * criteria. This criteria could be implemented as a simple text string, or it * could be a more complex object type such as an expression tree. The criteria * could also be implemented as a document search filter, which is a * subtype that implements this interface. * *

* Subtypes implementing this interface may be passed as parameters to the * {@link RepositoryReader#findDocuments RepositoryReader.findDocuments()} * method. * *

* Note: This requires Java 1.5 or later. * * *

*
Source code:
*
* http://david.tribble.com/src/java/tribble/repository/DocumentFilter.java *
*
Documentation:
*
* http://david.tribble.com/docs/tribble/repository/DocumentFilter.html *
*
* * * @version API 3.0, $Revision: 1.2 $ $Date: 2012/03/17 23:00:39 $ * @since 2008-04-09 * @author David R. Tribble (david@tribble.com)
* Copyright ©2008-2012 by David R. Tribble, all rights reserved.
* Permission is granted to any person or entity except those designated * by the United States Department of State as a terrorist or terrorist * government or agency, to use and distribute this source code provided * that the original copyright notice remains present and unaltered. * * @see RepositoryReader * @see Folder * @see Document */ public interface DocumentFilter { static final String REV = "@(#)tribble/repository/DocumentFilter.java $Revision: 1.2 $ $Date: 2012/03/17 23:00:39 $\n"; // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ // Methods /*************************************************************************** * Accept or reject a document according to this search filter criteria. * * @param doc * A document to compare against the searching criteria. * * @return * True if the document matches the filter criteria, otherwise false. * * @since API 2.0, 2008-04-09 */ public abstract boolean accept(DocType doc); } // End DocumentFilter.java