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

Quick Search    Search Deep

org.jxbeans.input
Class SimpleDocumentGenerator  view SimpleDocumentGenerator download SimpleDocumentGenerator.java

java.lang.Object
  extended byorg.jxbeans.AbstractJXBean
      extended byorg.jxbeans.AbstractDocumentSource
          extended byorg.jxbeans.input.SimpleDocumentGenerator
All Implemented Interfaces:
org.jxbeans.DocumentGenerator, org.jxbeans.DocumentSource, java.io.Serializable

public class SimpleDocumentGenerator
extends org.jxbeans.AbstractDocumentSource
implements org.jxbeans.DocumentGenerator

The SimpleDocumentGenerator class provides a very simple implementation of the DocumentGenerator interface. Specifically, objects of this class can be used if the document to be process has already been generated by some other means in the hosting application. Alternatively, if there is no real starting document, an object of this class can be used to generate a simple, empty document to get a model going.

Since:
1.0
Version:
1.0

Field Summary
private  org.jdom.Document document
           
private  java.lang.String rootElementName
           
 
Fields inherited from class org.jxbeans.AbstractDocumentSource
listeners
 
Fields inherited from class org.jxbeans.AbstractJXBean
 
Constructor Summary
SimpleDocumentGenerator()
           
 
Method Summary
 void generateDocument()
          Classes implementing this method are expected to generate a DocumentReadyEvent and notify this object's DocumentReadyListeners.
 org.jdom.Document getDocument()
           
 java.lang.String getRootElementName()
           
 void setDocument(org.jdom.Document aDocument)
          Sets the Document that this bean will "generate".
 void setRootElementName(java.lang.String aRootElementName)
          Sets the root element name to be used in generating a document.
 
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
 
Methods inherited from interface org.jxbeans.DocumentSource
addDocumentReadyListener, removeDocumentReadyListener
 

Field Detail

rootElementName

private java.lang.String rootElementName

document

private transient org.jdom.Document document
Constructor Detail

SimpleDocumentGenerator

public SimpleDocumentGenerator()
Method Detail

generateDocument

public void generateDocument()
                      throws org.jxbeans.JXBeanException
Description copied from interface: org.jxbeans.DocumentGenerator
Classes implementing this method are expected to generate a DocumentReadyEvent and notify this object's DocumentReadyListeners.

Specified by:
generateDocument in interface org.jxbeans.DocumentGenerator

setRootElementName

public void setRootElementName(java.lang.String aRootElementName)
Sets the root element name to be used in generating a document.

Since:
1.0

getRootElementName

public java.lang.String getRootElementName()
Since:
1.0

setDocument

public void setDocument(org.jdom.Document aDocument)
Sets the Document that this bean will "generate". If this is set, the rootElementName property is ignored.

Since:
1.0

getDocument

public org.jdom.Document getDocument()
Since:
1.0