java.lang.Object
org.jxbeans.AbstractJXBean
org.jxbeans.AbstractDocumentSource
org.jxbeans.utilities.JXBeanModelRunner
- All Implemented Interfaces:
- org.jxbeans.DocumentSource, java.io.Serializable
- public class JXBeanModelRunner
- extends org.jxbeans.AbstractDocumentSource
The JXBeanModelRunner JXBean will execute another JXBeanModel.
This JXBean provides the means of creating JXBean "sub-processes"
or "sub-routines". This JXBean works this way:
- If the model's
DocumentGenerator is the SimpleDocumentGenerator,
this bean will use the incoming Document to set the document for
the SimpleDocumentGenerator.
- Finally, if the model has a final
DocumentReadyListener and is a SimpleDocumentListener, this
bean will behave as follows:
- If the
parentElementExpression property has been set,
the resulting document will be inserted under the element
referred to by the parentElementExpression.
- If the
parentElementExpression property is null, the
document resulting from running the model will be sent to
the DocumentReadyListeners of this bean.
The source of the JXBean model can be set in one of six ways:
JXBeanModel
- JDOM
Document
Reader
File
- file name (as a
String)
URL
The precedence of usage is:
JXBeanModel
- JDOM
Document (if the JXBeanModel is null)
Reader (if the Document is null)
File (if the Reader is null)
- file name (as a
String) (if the File is null)
URL (if the file name is null)
- Since:
- 1.0
- Version:
- 1.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.log4j.Category log
runtime
private transient org.jxbeans.JXBeanRuntime runtime
model
private transient org.jxbeans.JXBeanModel model
document
private transient org.jdom.Document document
reader
private transient java.io.Reader reader
file
private java.io.File file
fileName
private java.lang.String fileName
url
private java.net.URL url
parentElementExpression
private java.lang.String parentElementExpression
JXBeanModelRunner
public JXBeanModelRunner()
documentReady
public void documentReady(org.jxbeans.DocumentReadyEvent anEvent)
throws org.jxbeans.JXBeanException
setParentElementExpression
public void setParentElementExpression(java.lang.String anXPathExpression)
- Sets the XPath expression that resolves to a location in the
incoming document where the resulting document from the
JXBeanModel execution (if any) will be inserted. The default
is null, which means that the document will not be inserted
into the incoming document, it will be forwarded to this bean's
listeners on its own.
- Since:
- 1.0
getParentElementExpression
public java.lang.String getParentElementExpression()
- Since:
- 1.0
setModel
public void setModel(org.jxbeans.JXBeanModel aModel)
- Sets the JXBean model.
- Since:
- 1.0
getModel
public org.jxbeans.JXBeanModel getModel()
- Since:
- 1.0
setModelDocument
public void setModelDocument(org.jdom.Document aDocument)
- Sets the Document that represents a JXBean model.
- Since:
- 1.0
getModelDocument
public org.jdom.Document getModelDocument()
- Since:
- 1.0
setModelReader
public void setModelReader(java.io.Reader aReader)
- Sets the Reader from which this bean will load a JXBean model.
- Since:
- 1.0
getModelReader
public java.io.Reader getModelReader()
- Since:
- 1.0
setModelFile
public void setModelFile(java.io.File aFile)
- Sets the File from which this bean will load a JXBean model.
- Since:
- 1.0
getModelFile
public java.io.File getModelFile()
- Since:
- 1.0
setModelFileName
public void setModelFileName(java.lang.String aFileName)
- Sets the file name from which this bean will load a JXBean model.
- Since:
- 1.0
getModelFileName
public java.lang.String getModelFileName()
- Since:
- 1.0
setModelURL
public void setModelURL(java.net.URL aURL)
- Sets the URL from which this bean will load a JXBean model.
- Since:
- 1.0
getModelURL
public java.net.URL getModelURL()
- Since:
- 1.0