org.mmbase.util.xml
Class ApplicationWriter

java.lang.Object
  extended byorg.mmbase.util.xml.DocumentReader
      extended byorg.mmbase.util.xml.DocumentWriter
          extended byorg.mmbase.util.xml.ApplicationWriter

public class ApplicationWriter
extends DocumentWriter

Version:
$Id: ApplicationWriter.java,v 1.4 2006/03/28 17:49:36 daniel Exp $
Author:
DAniel Ockeloen
Warning: No Java Documentation Available.

Field Summary
protected  MMBase mmbase
           
protected  ApplicationReader reader
           
 
Fields inherited from class org.mmbase.util.xml.DocumentReader
document, DTD_ERROR, DTD_ERROR_1_0, FILENOTFOUND, PUBLIC_ID_ERROR, PUBLIC_ID_ERROR_1_0
 
Constructor Summary
ApplicationWriter(ApplicationReader reader, MMBase mmbase)
          Constructs the document writer.
 
Method Summary
protected  void addAllowedRelationList(Element root)
           
protected  void addContextSourceList(Element root)
           
protected  void addDataSourceList(Element root)
           
protected  void addNeededBuilderList(Element root)
           
protected  void addNeededRelDefList(Element root)
           
protected  void addRelationSourceList(Element root)
           
protected  void addRequirements(Element root)
           
protected  void generate()
          Generates the document.
 void writeToPath(String targetPath, Logger logger)
          Generates the documents for this application and store it as a set of files in the given path.
 
Methods inherited from class org.mmbase.util.xml.DocumentWriter
addComment, addComment, addComment, addContentElement, generateDocument, getDocument, getMessage, getMessage, getMessage, getMessage, getMessageRetriever, includeComments, setIncludeComments, write, writeToFile, writeToStream, writeToString
 
Methods inherited from class org.mmbase.util.xml.DocumentReader
appendChild, getAttribute, getChildElements, getChildElements, getChildElements, getChildElements, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getElementAttributeValue, getElementAttributeValue, getElementByPath, getElementByPath, getElementName, getElementValue, getElementValue, getNodeTextValue, getRootElement, getSystemId, hasAttribute, main, registerPublicIDs, setNodeTextValue, setSystemId, toDocument, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected ApplicationReader reader

mmbase

protected MMBase mmbase
Constructor Detail

ApplicationWriter

public ApplicationWriter(ApplicationReader reader,
                         MMBase mmbase)
                  throws DOMException
Constructs the document writer. The constructor calls its super to create a basic document, based on the application document type.

Parameters:
reader - the reader for the original application
mmbase - the mmbase instance to get the application data from
Method Detail

generate

protected void generate()
                 throws DOMException
Generates the document. Can only be called once.

Specified by:
generate in class DocumentWriter
Throws:
DOMException - when an error occurred during generation

addRequirements

protected void addRequirements(Element root)

addNeededBuilderList

protected void addNeededBuilderList(Element root)

addNeededRelDefList

protected void addNeededRelDefList(Element root)

addAllowedRelationList

protected void addAllowedRelationList(Element root)

addDataSourceList

protected void addDataSourceList(Element root)

addRelationSourceList

protected void addRelationSourceList(Element root)

addContextSourceList

protected void addContextSourceList(Element root)

writeToPath

public void writeToPath(String targetPath,
                        Logger logger)
                 throws IOException,
                        TransformerException,
                        SearchQueryException
Generates the documents for this application and store it as a set of files in the given path.

Parameters:
targetPath - the filepath (directory) where the configuration is to be stored
logger - This thing must receive the errors
Throws:
TransformerException - if one or more documents are malformed
IOException - if one or more files cannot be written
SearchQueryException - if data could not be obtained from the database


MMBase build 1.8.1.20060716