| java.lang.Object org.mmbase.bridge.util.xml.Generator
Generator | public class Generator (Code) | | Uses the XML functions from the bridge to construct a DOM document representing MMBase data structures.
author: Michiel Meeuwissen author: Eduard Witteveen version: $Id: Generator.java,v 1.48 2007/04/09 19:10:27 michiel Exp $ since: MMBase-1.6 |
Generator | public Generator(DocumentBuilder documentBuilder, Cloud cloud)(Code) | | To create documents representing structures from the cloud, it
needs a documentBuilder, to contruct the DOM Document, and the
cloud from which the data to be inserted will come from.
Parameters: documentBuilder - The DocumentBuilder which will be used to create the Document. Parameters: cloud - The cloud from which the data will be. See Also: org.mmbase.util.xml.DocumentReader.getDocumentBuilder |
add | public Element add(org.mmbase.bridge.Node node, Field fieldDefinition)(Code) | | Adds a field to the DOM Document. This means that there will
also be added a Node if this is necessary.
Parameters: node - An MMbase bridge Node. Parameters: fieldDefinition - An MMBase bridge Field. |
add | public Element add(Relation relation)(Code) | | Adds one Relation to a DOM Document.
Parameters: relation - An MMBase bridge Node. |
add | public void add(List<? extends org.mmbase.bridge.Node> nodes)(Code) | | Adds a whole MMBase bridge NodeList to the DOM Document.
Parameters: nodes - An MMBase bridge NodeList. |
getCost | public long getCost()(Code) | | Returns an estimation on how long it took to construct the document.
a duration in nanoseconds. since: MMBase-1.9 |
getDocument | public Document getDocument()(Code) | | Returns the working DOM document.
The document, build with the operations done on the generator class |
getSize | public int getSize()(Code) | | The number of presented MMBase nodes in the document.
since: MMBase-1.9 |
isNamespaceAware | public boolean isNamespaceAware()(Code) | | since: MMBase-1.8 |
setNamespaceAware | public void setNamespaceAware(boolean n)(Code) | | If namespace aware, element are created with the namespace http://www.mmbase.org/objects,
otherwise, without namespace.
since: MMBase-1.8 |
toString | public String toString()(Code) | | Returns the document as a String.
the xml generated as an string |
toString | public String toString(boolean ident)(Code) | | Returns the document as a String.
Parameters: ident - if the string has to be idented the generated xml as a (formatted) string |
|
|