dk.netarkivet.common.utils.cdx
Class SimpleCDXRecordFilter

java.lang.Object
  extended by dk.netarkivet.common.utils.cdx.SimpleCDXRecordFilter
All Implemented Interfaces:
CDXRecordFilter, java.io.Serializable
Direct Known Subclasses:
ARCFilenameCDXRecordFilter

public abstract class SimpleCDXRecordFilter
extends java.lang.Object
implements CDXRecordFilter

A Simple CDXRecordFilter to be extended. It only implements the filtername method.

See Also:
Serialized Form

Constructor Summary
SimpleCDXRecordFilter(java.lang.String filtername)
           
 
Method Summary
 java.lang.String getFilterName()
           
abstract  boolean process(CDXRecord cdxrec)
          Process one CDXRecord - return true/false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCDXRecordFilter

public SimpleCDXRecordFilter(java.lang.String filtername)
                      throws ArgumentNotValid
Parameters:
filtername - - the name of the filter
Throws:
ArgumentNotValid - If 'filtername' equals null or the empty string
Method Detail

getFilterName

public java.lang.String getFilterName()
Specified by:
getFilterName in interface CDXRecordFilter
Returns:
the filter name

process

public abstract boolean process(CDXRecord cdxrec)
Description copied from interface: CDXRecordFilter
Process one CDXRecord - return true/false.

Specified by:
process in interface CDXRecordFilter
Parameters:
cdxrec - the CDXRecord to be processed.
Returns:
true or false on whether the processed CDXRecord is "valid" according to this filter implementation. true means this CDXRecord is valid!