|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.bridge.util.xml.Generator
public class Generator
Uses the XML functions from the bridge to construct a DOM document representing MMBase data structures.
| Field Summary | |
|---|---|
static String |
NAMESPACE
|
| Constructor Summary | |
|---|---|
Generator(Document doc)
|
|
Generator(DocumentBuilder documentBuilder)
|
|
Generator(DocumentBuilder documentBuilder,
Cloud cloud)
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. |
|
| Method Summary | |
|---|---|
void |
add(List<? extends Node> nodes)
Adds a whole MMBase bridge NodeList to the DOM Document. |
Element |
add(Node node)
Adds one Node to a DOM Document. |
Element |
add(Node node,
Field fieldDefinition)
Adds a field to the DOM Document. |
Element |
add(Relation relation)
Adds one Relation to a DOM Document. |
protected Element |
createElement(String name)
|
protected String |
getAttribute(Element element,
String name)
|
long |
getCost()
Returns an estimation on how long it took to construct the document. |
Document |
getDocument()
Returns the working DOM document. |
int |
getSize()
The number of presented MMBase nodes in the document. |
boolean |
isNamespaceAware()
|
protected void |
setAttribute(Element element,
String name,
String value)
|
void |
setNamespaceAware(boolean n)
If namespace aware, element are created with the namespace http://www.mmbase.org/objects, otherwise, without namespace. |
String |
toString()
Returns the document as a String. |
String |
toString(boolean ident)
Returns the document as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NAMESPACE
| Constructor Detail |
|---|
public Generator(DocumentBuilder documentBuilder,
Cloud cloud)
documentBuilder - The DocumentBuilder which will be used to create the Document.cloud - The cloud from which the data will be.DocumentReader.getDocumentBuilder()public Generator(DocumentBuilder documentBuilder)
public Generator(Document doc)
| Method Detail |
|---|
public long getCost()
public int getSize()
public Document getDocument()
public void setNamespaceAware(boolean n)
public boolean isNamespaceAware()
protected Element createElement(String name)
protected final void setAttribute(Element element,
String name,
String value)
protected final String getAttribute(Element element,
String name)
public String toString()
toString in class Objectpublic String toString(boolean ident)
ident - if the string has to be idented
public Element add(Node node,
Field fieldDefinition)
node - An MMbase bridge Node.fieldDefinition - An MMBase bridge Field.public Element add(Node node)
node - An MMBase bridge Node.public Element add(Relation relation)
relation - An MMBase bridge Node.public void add(List<? extends Node> nodes)
nodes - An MMBase bridge NodeList.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||