org.apache.abdera.util.filter
Class CompoundParseFilter

java.lang.Object
  extended by org.apache.abdera.util.filter.AbstractParseFilter
      extended by org.apache.abdera.util.filter.CompoundParseFilter
All Implemented Interfaces:
Serializable, Cloneable, ParseFilter

public class CompoundParseFilter
extends AbstractParseFilter
implements ParseFilter

A simple compound parse filter that allows us to apply multiple parse filters to a single parse operation.

 CompoundParseFilter filter =
     new CompoundParseFilter(CompoundParseFilter.Condition.ACCEPTABLE_TO_ALL, new SafeContentWhiteListParseFilter(),
                             new MyWhiteListParseFilter(), new MySomeOtherKindOfParseFilter());
 options.setParseFilter(filter);
 

See Also:
Serialized Form

Nested Class Summary
static class CompoundParseFilter.Condition
           
 
Field Summary
protected  CompoundParseFilter.Condition condition
           
protected  ParseFilter[] filters
           
 
Fields inherited from class org.apache.abdera.util.filter.AbstractParseFilter
flags
 
Constructor Summary
CompoundParseFilter(CompoundParseFilter.Condition condition, ParseFilter... filters)
           
CompoundParseFilter(ParseFilter... filters)
           
 
Method Summary
 boolean acceptable(QName qname)
          Returns true if elements with the given QName are acceptable
 boolean acceptable(QName qname, QName attribute)
          Returns true if attributes with the given qname appearing on elements with the given qname are acceptable
 Object clone()
          Clone this ParseFilter
 
Methods inherited from class org.apache.abdera.util.filter.AbstractParseFilter
getIgnoreComments, getIgnoreProcessingInstructions, getIgnoreWhitespace, setIgnoreComments, setIgnoreProcessingInstructions, setIgnoreWhitespace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.filter.ParseFilter
getIgnoreComments, getIgnoreProcessingInstructions, getIgnoreWhitespace, setIgnoreComments, setIgnoreProcessingInstructions, setIgnoreWhitespace
 

Field Detail

condition

protected final CompoundParseFilter.Condition condition

filters

protected final ParseFilter[] filters
Constructor Detail

CompoundParseFilter

public CompoundParseFilter(CompoundParseFilter.Condition condition,
                           ParseFilter... filters)

CompoundParseFilter

public CompoundParseFilter(ParseFilter... filters)
Method Detail

acceptable

public boolean acceptable(QName qname)
Description copied from interface: ParseFilter
Returns true if elements with the given QName are acceptable

Specified by:
acceptable in interface ParseFilter

acceptable

public boolean acceptable(QName qname,
                          QName attribute)
Description copied from interface: ParseFilter
Returns true if attributes with the given qname appearing on elements with the given qname are acceptable

Specified by:
acceptable in interface ParseFilter

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from interface: ParseFilter
Clone this ParseFilter

Specified by:
clone in interface ParseFilter
Overrides:
clone in class AbstractParseFilter
Throws:
CloneNotSupportedException


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.