org.mmbase.util.xml.applicationdata
Class ApplicationWriter
java.lang.Object
org.mmbase.util.xml.DocumentReader
org.mmbase.util.xml.DocumentWriter
org.mmbase.util.xml.applicationdata.ApplicationWriter
public class ApplicationWriter
- extends DocumentWriter
- Version:
- $Id: ApplicationWriter.java 34900 2009-05-01 16:29:42Z michiel $
- Author:
- Daniel Ockeloen
- Javadoc:
| 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, getNodeTextValue, getRootElement, getSystemId, hasAttribute, main, registerPublicIDs, setNodeTextValue, setPrefix, setSystemId, toDocument, validate, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reader
protected ApplicationReader reader
mmbase
protected MMBase mmbase
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 applicationmmbase - the mmbase instance to get the application data from
- Throws:
DOMException - When failed to parse xml or write
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,
SAXException,
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 storedlogger - This thing must receive the errors
- Throws:
SAXException - 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
writeApplicationToFile
public boolean writeApplicationToFile(String filepath,
String path)
writeBuilderToFile
public boolean writeBuilderToFile(String filepath,
String path)
MMBase 2.0-SNAPSHOT - null