|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.xml.applicationdata.NodeWriter
public class NodeWriter
Utility class for writing xml files for data- and relation sources, suppied by an application export class. Does not support or export dtd information.
| Constructor Summary | |
|---|---|
NodeWriter(MMBase mmb,
Logger logger,
String directory,
String builderName,
boolean isRelationNode)
Constructor, opens the initial xml file and writes a header. |
|
| Method Summary | |
|---|---|
void |
done()
Writes a footer to the xml file, and closes the file. |
(package private) static boolean |
saveFile(String filename,
byte[] value)
Stores binary data in a file |
void |
write(MMObjectNode node)
Writes a node (object) to the datasource file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
NodeWriter(MMBase mmb,
Logger logger,
String directory,
String builderName,
boolean isRelationNode)
mmb - MMBase object for retrieving type informationlogger - place to log results.directory - the directory to write the files to (including the
trailing slash).buildername - name of the builder to exportisRelationNode - if true, the source to write is a relationsource.
Otherwise, a datasource is written.| Method Detail |
|---|
public void write(MMObjectNode node)
node - The object to store.public void done()
static boolean saveFile(String filename,
byte[] value)
filename - path of the file to store the datavalue - binary data to store (byte array)
true if the write was succesful, false if an exception occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||