tribble.search
Class AbstractDocumentFilter

java.lang.Object
  extended bytribble.search.AbstractDocumentFilter
All Implemented Interfaces:
DocumentFilterI

public abstract class AbstractDocumentFilter
extends java.lang.Object
implements DocumentFilterI

Generic document filter.

This base class is a generic search filter that is contructed from a criteria string. By default, the accept() method always returns true, so it should be overridden in classes that extend this base class, so as to do something meaningful with the search criteria.

Since:
2001-06-19
Version:
$Revision: 1.1 $ $Date: 2001/06/19 23:14:26 $
Author:
David R. Tribble (david@tribble.com).
Copyright ©2001 by David R. Tribble, all rights reserved.
See Also:
DocumentFilterI

Field Summary
protected  java.lang.String m_criteria
          Search criteria.
static int SERIES
          Series number.
 
Constructor Summary
protected AbstractDocumentFilter()
          Default constructor.
  AbstractDocumentFilter(java.lang.String crit)
          Constructor.
 
Method Summary
 boolean accept(DocumentI doc)
          Accept or reject a document entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERIES

public static final int SERIES
Series number.

See Also:
Constant Field Values

m_criteria

protected java.lang.String m_criteria
Search criteria.

Constructor Detail

AbstractDocumentFilter

public AbstractDocumentFilter(java.lang.String crit)
Constructor.

Parameters:
crit - Search criteria. The format and meaning of this string should be defined in classes that extend this base class.
Since:
1.1, 2001-06-19

AbstractDocumentFilter

protected AbstractDocumentFilter()
Default constructor.

Since:
1.1, 2001-06-19
Method Detail

accept

public boolean accept(DocumentI doc)
               throws java.lang.Exception
Accept or reject a document entry.

This method should be overridden in classes that extend this base class, so as to do something meaningful with the search criteria.

Specified by:
accept in interface DocumentFilterI
Parameters:
doc - A document entry.
Returns:
True, always.
Throws:
java.lang.Exception - Thrown if the selection criteria are malformed, or if some other error occurs.
Since:
1.1, 2001-06-19
See Also:
DocumentSearcherI.find(tribble.search.DocumentFilterI)