org.mmbase.util
Class XMLContextDepthWriterII
java.lang.Object
|
+--org.mmbase.util.XMLContextDepthWriterII
- public class XMLContextDepthWriterII
- extends java.lang.Object
This class is used to write (export) a selection of nodes to xml format.
The nodes to export are read from a XML context file, which specifies the
startnode and depth to which to parse.
The current version of this class combines a number of methods which we want to split - or at least share -
with a seperate class for handling contexts.
Note that because of it's static nature, no object instance need be made (in fact, none CAN be made) of this class.
To use this class in stead of the old XMLContextDepthWriter, replace the following lines in
util/XMLApplicationWriter.java:
XMLContextDepthWriter.writeContext(app,capp,targetpath,mmb,resultmsgs);
XMLContextDepthWriter.writeContextXML(capp,targetpath+"/"+(String)bset.get("path"));
with:
in writeDateSources :
XMLContextDepthWriterII.writeContext(app,capp,targetpath,mmb,resultmsgs);
in writeContextSources :
XMLContextDepthWriterII.writeContextXML(capp,targetpath+"/"+(String)bset.get("path"));
- Version:
- 08-11-2000
- Author:
- Daniel Ockeloen, Jacco de Groot, Pierre van Rooden
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLContextDepthWriterII
public XMLContextDepthWriterII()
writeContext
public static boolean writeContext(XMLApplicationReader app,
XMLContextDepthReader capp,
java.lang.String targetpath,
MMBase mmb,
java.util.Vector resultmsgs)
- Writes an application's nodes, according to that application's contexts, to a path.
The files written are stored in a subdirectory (named after the application), and contain the datasource (xml) files for
both datanodes and relation nodes.
- Parameters:
app - A XMLApplicationReader initialised to read the application's description (xml) file
This object is used to retrieve what builder and relations are needed, and in which files data should be stored.capp - A XMLContextDepthReader initialised to read the application's context file
This object is used to retrieve information regarding search depth and starting nodes for
the search tree whoch determines what nodes are part of this application.targetpath - The path where to save the applicationmmb - Reference to the MMbase processormodule. Used to retrieve the nodes to write.resultmsgs - Storage for messages which can be displayed to the user.
writeContextXML
public static boolean writeContextXML(XMLContextDepthReader capp,
java.lang.String filename)
MMBase 2001