org.apache.abdera.util.filter
Class WhiteListParseFilter

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

public class WhiteListParseFilter
extends AbstractListParseFilter

WhiteList Implementation of ParseFilter. Only the QNames listed will be considered acceptable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.abdera.util.filter.AbstractParseFilter
flags
 
Constructor Summary
WhiteListParseFilter()
           
WhiteListParseFilter(boolean listAttributesExplicitly)
          If listAttributesExplicity == true, attributes MUST be whitelisted independently of the elements on which they appear, otherwise, all attributes will automatically be considered acceptable if the containing element is considered acceptable.
 
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
 
Methods inherited from class org.apache.abdera.util.filter.AbstractListParseFilter
add, add, clone, contains, contains
 
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
 

Constructor Detail

WhiteListParseFilter

public WhiteListParseFilter()

WhiteListParseFilter

public WhiteListParseFilter(boolean listAttributesExplicitly)
If listAttributesExplicity == true, attributes MUST be whitelisted independently of the elements on which they appear, otherwise, all attributes will automatically be considered acceptable if the containing element is considered acceptable.

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
Specified by:
acceptable in class AbstractListParseFilter

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
Specified by:
acceptable in class AbstractListParseFilter


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