Inheritance diagram for org::jdom::filter::ContentFilter:

Public Member Functions | |
| ContentFilter () | |
| ContentFilter (boolean allVisible) | |
| ContentFilter (int mask) | |
| int | getFilterMask () |
| void | setFilterMask (int mask) |
| void | setDefaultMask () |
| void | setDocumentContent () |
| void | setElementContent () |
| void | setElementVisible (boolean visible) |
| void | setCDATAVisible (boolean visible) |
| void | setTextVisible (boolean visible) |
| void | setCommentVisible (boolean visible) |
| void | setPIVisible (boolean visible) |
| void | setEntityRefVisible (boolean visible) |
| boolean | matches (Object obj) |
| boolean | equals (Object obj) |
Static Public Attributes | |
| static final int | ELEMENT = 1 |
| static final int | CDATA = 2 |
| static final int | TEXT = 4 |
| static final int | COMMENT = 8 |
| static final int | PI = 16 |
| static final int | ENTITYREF = 32 |
| static final int | DOCUMENT = 64 |
Protected Attributes | |
| int | filterMask |
ContentFilter is a general purpose Filter representing all legal JDOM objects and allows the ability to set and unset the visiblity of these objects. Filtering is accomplished by way of a filtering mask in which each bit represents whether a JDOM object is visible or not.For example to view all Text and CDATA nodes in the content of element x.
Filter filter = new ContentFilter(ContentFilter.TEXT |
ContentFilter.CDATA);
List content = x.getContent(filter);
For those who don't like bit-masking, set methods are provided as an alternative. For example to allow everything except Comment nodes.
Filter filter = new ContentFilter();
filter.setCommentVisible(false);
List content = x.getContent(filter);
The default is to allow all valid JDOM objects.
| org::jdom::filter::ContentFilter::ContentFilter | ( | ) | [inline] |
Default constructor that allows any legal JDOM objects.
| org::jdom::filter::ContentFilter::ContentFilter | ( | boolean | allVisible | ) | [inline] |
Set whether all JDOM objects are visible or not.
| allVisible | true all JDOM objects are visible, false all JDOM objects are hidden. |
| org::jdom::filter::ContentFilter::ContentFilter | ( | int | mask | ) | [inline] |
Filter out JDOM objects according to a filtering mask.
| mask | Mask of JDOM objects to allow. |
| int org::jdom::filter::ContentFilter::getFilterMask | ( | ) | [inline] |
Return current filtering mask.
| void org::jdom::filter::ContentFilter::setFilterMask | ( | int | mask | ) | [inline] |
Set filtering mask.
| void org::jdom::filter::ContentFilter::setDefaultMask | ( | ) | [inline] |
Set this filter to allow all legal JDOM objects.
| void org::jdom::filter::ContentFilter::setDocumentContent | ( | ) | [inline] |
Set filter to match only JDOM objects that are legal document content.
| void org::jdom::filter::ContentFilter::setElementContent | ( | ) | [inline] |
Set filter to match only JDOM objects that are legal element content.
| void org::jdom::filter::ContentFilter::setElementVisible | ( | boolean | visible | ) | [inline] |
Set visiblity of Element objects.
| visible | whether Elements are visible, true if yes, false if not |
| void org::jdom::filter::ContentFilter::setCDATAVisible | ( | boolean | visible | ) | [inline] |
| void org::jdom::filter::ContentFilter::setTextVisible | ( | boolean | visible | ) | [inline] |
| void org::jdom::filter::ContentFilter::setCommentVisible | ( | boolean | visible | ) | [inline] |
Set visiblity of Comment objects.
| visible | whether Comments are visible, true if yes, false if not |
| void org::jdom::filter::ContentFilter::setPIVisible | ( | boolean | visible | ) | [inline] |
Set visiblity of ProcessingInstruction objects.
| visible | whether ProcessingInstructions are visible, true if yes, false if not |
| void org::jdom::filter::ContentFilter::setEntityRefVisible | ( | boolean | visible | ) | [inline] |
Set visiblity of EntityRef objects.
| visible | whether EntityRefs are visible, true if yes, false if not |
| boolean org::jdom::filter::ContentFilter::matches | ( | Object | obj | ) | [inline] |
Check to see if the object matches according to the filter mask.
| obj | The object to verify. |
true if the objected matched a predfined set of rules. Implements org::jdom::filter::Filter.
| boolean org::jdom::filter::ContentFilter::equals | ( | Object | obj | ) | [inline] |
Returns true if object is instance of ContentFilter and has the same filtering mask as this one.
true if the Filters are equal
final int org::jdom::filter::ContentFilter::ELEMENT = 1 [static] |
Mask for JDOM Element objects
final int org::jdom::filter::ContentFilter::CDATA = 2 [static] |
Mask for JDOM CDATA objects
final int org::jdom::filter::ContentFilter::TEXT = 4 [static] |
Mask for JDOM Text objects
final int org::jdom::filter::ContentFilter::COMMENT = 8 [static] |
Mask for JDOM Comment objects
final int org::jdom::filter::ContentFilter::PI = 16 [static] |
Mask for JDOM ProcessingInstruction objects
final int org::jdom::filter::ContentFilter::ENTITYREF = 32 [static] |
Mask for JDOM EntityRef objects
final int org::jdom::filter::ContentFilter::DOCUMENT = 64 [static] |
Mask for JDOM Document object
int org::jdom::filter::ContentFilter::filterMask [protected] |
The JDOM object mask
1.5.1