com.norconex.importer.filter
Class AbstractOnMatchFilter

java.lang.Object
  extended by com.norconex.importer.filter.AbstractOnMatchFilter
All Implemented Interfaces:
IOnMatchFilter, Serializable
Direct Known Subclasses:
RegexMetadataFilter

public abstract class AbstractOnMatchFilter
extends Object
implements IOnMatchFilter, Serializable

Convenience base class for implementing filters offering the include/exclude "onmatch" option. Default behavior on match is to include.

Author:
Pascal Essiembre
See Also:
Serialized Form

Constructor Summary
AbstractOnMatchFilter()
           
 
Method Summary
 boolean equals(Object obj)
           
 OnMatch getOnMatch()
          Gets the the on match action (exclude or include).
 int hashCode()
           
protected  void loadFromXML(XMLConfiguration xml)
          Convenience method for subclasses to load the "onMatch" attribute from an XML file when XMLConfiguration is used.
protected  void saveToXML(XMLStreamWriter writer)
          Convenience method for subclasses to save the "onMatch" attribute to an XML file when XMLConfiguration is used.
 void setOnMatch(OnMatch onMatch)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractOnMatchFilter

public AbstractOnMatchFilter()
Method Detail

getOnMatch

public OnMatch getOnMatch()
Description copied from interface: IOnMatchFilter
Gets the the on match action (exclude or include).

Specified by:
getOnMatch in interface IOnMatchFilter
Returns:
on match (exclude or include)

setOnMatch

public final void setOnMatch(OnMatch onMatch)

loadFromXML

protected final void loadFromXML(XMLConfiguration xml)
Convenience method for subclasses to load the "onMatch" attribute from an XML file when XMLConfiguration is used.

Parameters:
xml - XML configuration

saveToXML

protected void saveToXML(XMLStreamWriter writer)
                  throws XMLStreamException
Convenience method for subclasses to save the "onMatch" attribute to an XML file when XMLConfiguration is used.

Parameters:
writer - XML stream writer
Throws:
XMLStreamException - problem saving extra content types

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2009-2013 Norconex Inc.. All Rights Reserved.