org.apache.abdera.util.filter
Class CompoundParseFilter
java.lang.Object
org.apache.abdera.util.filter.AbstractParseFilter
org.apache.abdera.util.filter.CompoundParseFilter
- All Implemented Interfaces:
- java.lang.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);
Method Summary |
boolean |
acceptable(javax.xml.namespace.QName qname)
Returns true if elements with the given QName are acceptable |
boolean |
acceptable(javax.xml.namespace.QName qname,
javax.xml.namespace.QName attribute)
Returns true if attributes with the given qname appearing on elements
with the given qname are acceptable |
java.lang.Object |
clone()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
condition
protected final CompoundParseFilter.Condition condition
filters
protected final ParseFilter[] filters
CompoundParseFilter
public CompoundParseFilter(CompoundParseFilter.Condition condition,
ParseFilter... filters)
CompoundParseFilter
public CompoundParseFilter(ParseFilter... filters)
acceptable
public boolean acceptable(javax.xml.namespace.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(javax.xml.namespace.QName qname,
javax.xml.namespace.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 java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface ParseFilter
- Overrides:
clone
in class AbstractParseFilter
- Throws:
java.lang.CloneNotSupportedException