uk.apl.jxc.filter
Class XMLFilterCriteria

java.lang.Object
  extended by uk.apl.jxc.filter.XMLFilterCriteria

public class XMLFilterCriteria
extends java.lang.Object

Encapsulates a criteria to be applied when filtering an XML document.

Author:
Andrew Leigh

Nested Class Summary
static class XMLFilterCriteria.Action
          Enumeration of criteria actions.
 
Constructor Summary
XMLFilterCriteria(java.lang.String elementName, XMLFilterCriteria.Action action)
          Creates a new XMLFilterCriteria that will either retain or omit elements based upon their name.
XMLFilterCriteria(java.lang.String elementName, XMLFilterCriteria.Action action, java.lang.String condition)
          Creates a new XMLFilterCriteria that will either retain or omit elements based upon an XPath condition.
 
Method Summary
 XMLFilterCriteria.Action getAction()
          Returns the criteria Action.
 java.lang.String getCondition()
          Returns the XPath condition to be applied filtering.
 java.lang.String getElementName()
          Returns the name of the element to which the criteria applies.
 void setAction(XMLFilterCriteria.Action action)
          Sets the criteria Action.
 void setCondition(java.lang.String condition)
          Sets the XPath condition to be applied when filtering.
 void setElementName(java.lang.String elementName)
          Sets the name of the element to which the criteria applies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFilterCriteria

public XMLFilterCriteria(java.lang.String elementName,
                         XMLFilterCriteria.Action action)
Creates a new XMLFilterCriteria that will either retain or omit elements based upon their name.

Parameters:
elementName - name of the XML element to which the criteria applies
action - the filter action (RETAIN or OMIT)

XMLFilterCriteria

public XMLFilterCriteria(java.lang.String elementName,
                         XMLFilterCriteria.Action action,
                         java.lang.String condition)
Creates a new XMLFilterCriteria that will either retain or omit elements based upon an XPath condition.

Parameters:
elementName - name of the XML element to which the criteria applies
action - the filter action (RETAIN or OMIT)
condition - the XPath condition
Method Detail

getElementName

public java.lang.String getElementName()
Returns the name of the element to which the criteria applies.

Returns:
the elementName name of element

setElementName

public void setElementName(java.lang.String elementName)
Sets the name of the element to which the criteria applies.

Parameters:
elementName - the elementName to set

getAction

public XMLFilterCriteria.Action getAction()
Returns the criteria Action.

Returns:
the criteria action
See Also:
XMLFilterCriteria.Action

setAction

public void setAction(XMLFilterCriteria.Action action)
Sets the criteria Action.

Parameters:
action - the action to set
See Also:
XMLFilterCriteria.Action

getCondition

public java.lang.String getCondition()
Returns the XPath condition to be applied filtering.

Returns:
the XPath condition

setCondition

public void setCondition(java.lang.String condition)
Sets the XPath condition to be applied when filtering.

Parameters:
condition - the XPath condition to set


Copyright 2010 Andrew Leigh. All Rights Reserved.