Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jxbeans.transformation
Class Pruner  view Pruner download Pruner.java

java.lang.Object
  extended byorg.jxbeans.AbstractJXBean
      extended byorg.jxbeans.AbstractDocumentSource
          extended byorg.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

Field Summary
private  java.lang.String expression
           
private  boolean prune
           
 
Fields inherited from class org.jxbeans.AbstractDocumentSource
listeners
 
Fields inherited from class org.jxbeans.AbstractJXBean
 
Constructor Summary
Pruner()
           
 
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 org.jxbeans.AbstractDocumentSource
addDocumentReadyListener, forwardDocument, forwardDocument, getDocumentReadyListeners, logDocument, removeDocumentReadyListener
 
Methods inherited from class org.jxbeans.AbstractJXBean
getName, logErrorAndRaiseException, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expression

private java.lang.String expression

prune

private boolean prune
Constructor Detail

Pruner

public Pruner()
Method Detail

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