org.mmbase.util.xml
Class BuilderWriter

java.lang.Object
  |
  +--org.mmbase.util.xml.DocumentWriter
        |
        +--org.mmbase.util.xml.BuilderWriter

public class BuilderWriter
extends DocumentWriter

Class for creating builder configuration documents. Use this class to create a DOM document for a given builder. The document can then be used internally or serialized using a number of utility methods. This writer takes extension of builders (inheritance) into account.

Since:
MMBase-1.6
Version:
$Id: BuilderWriter.java,v 1.9.2.4 2003/04/11 09:29:24 pierre Exp $
Author:
Pierre van Rooden

Fields inherited from class org.mmbase.util.xml.DocumentWriter
document
 
Constructor Summary
BuilderWriter(MMObjectBuilder builder)
          Constructs the document writer.
 
Method Summary
protected  void generate()
          Generates the document.
 boolean getExpandBuilder()
          Gets whether the builder will expand when writing.
 void setExpandBuilder(boolean value)
          Sets whether the builder will expand when writing.
 
Methods inherited from class org.mmbase.util.xml.DocumentWriter
addComment, addComment, addComment, addContentElement, generateDocument, getDocument, getIncludeComments, getMessage, getMessage, getMessage, getMessage, getMessageRetriever, setIncludeComments, write, writeToFile, writeToStream, writeToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuilderWriter

public BuilderWriter(MMObjectBuilder builder)
              throws org.w3c.dom.DOMException
Constructs the document writer. The constructor calls its super to create a basic document, based on the builder document type.
Parameters:
builder - the builder for which to create an XML document.
Method Detail

generate

protected void generate()
                 throws org.w3c.dom.DOMException
Generates the document. Can only be called once.
Overrides:
generate in class DocumentWriter
Throws:
org.w3c.dom.DOMException - when an error occurred during generation

setExpandBuilder

public void setExpandBuilder(boolean value)
Sets whether the builder will expand when writing. Expanding means that all data of a builder is written, including non-overriden data from parent builders.
Parameters:
value - if true, the buidler will expand

getExpandBuilder

public boolean getExpandBuilder()
Gets whether the builder will expand when writing. Expanding means that all data of a builder is written, including non-overriden data from parent builders.
Returns:
if true, the buidler will expand


MMBase build 1.6.5.20030923