java.lang.Object
org.jxbeans.AbstractJXBean
org.jxbeans.AbstractDocumentSource
org.jxbeans.transformation.Pruner
- All Implemented Interfaces:
- org.jxbeans.DocumentReadyListener, org.jxbeans.DocumentSource, java.util.EventListener, java.io.Serializable
- public class Pruner
- extends org.jxbeans.AbstractDocumentSource
- implements org.jxbeans.DocumentReadyListener
The Pruner JXBeans is used to remove part of the XML document before
passing it along to its DocumentReadyListeners. This JXBeans can be
configured to either cut out the element (and its children)
represented by an XPath expression, or cut our everything except
the element (and its children) represented by an XPath expression.
- Since:
- 1.0
- Version:
- 1.0
|
Method Summary |
void |
documentReady(org.jxbeans.DocumentReadyEvent anEvent)
Classes implementing this method are expected to process the
document contained in the DocumentReadyEvent in some fashion
specific to the class implementing this interface. |
java.lang.String |
getExpression()
Returns the XPath expression that will be used to select an
element from the incoming document. |
boolean |
getPrune()
|
void |
setExpression(java.lang.String anExpression)
Sets the XPath expression that will be used to select an element
from the incoming document. |
void |
setPrune(boolean aFlag)
Sets whether the Pruner removes the element(s) indicated
by the XPath expression. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expression
private java.lang.String expression
prune
private boolean prune
Pruner
public Pruner()
documentReady
public void documentReady(org.jxbeans.DocumentReadyEvent anEvent)
throws org.jxbeans.JXBeanException
- Description copied from interface:
org.jxbeans.DocumentReadyListener
- Classes implementing this method are expected to process the
document contained in the
DocumentReadyEvent in some fashion
specific to the class implementing this interface.
- Specified by:
documentReady in interface org.jxbeans.DocumentReadyListener
setExpression
public void setExpression(java.lang.String anExpression)
- Sets the XPath expression that will be used to select an element
from the incoming document.
- Since:
- 1.0
getExpression
public java.lang.String getExpression()
- Returns the XPath expression that will be used to select an
element from the incoming document.
- Since:
- 1.0
setPrune
public void setPrune(boolean aFlag)
- Sets whether the Pruner removes the element(s) indicated
by the XPath expression. If true, the element(s) referred
to by the XPath expression will be removed from from the document.
If false, the opposite will happen, the (single) element
referred to by the XPath expression will remain, and the rest of
the document will be removed.
- Since:
- 1.0
getPrune
public boolean getPrune()
- Since:
- 1.0