|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.util.xml.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 | |
Element |
add(Node node)
Adds one Node to a DOM Document. |
Element |
add(Node node,
Field fieldDefinition)
Adds a field to the DOM Document. |
void |
add(NodeList nodes)
Adds a whole MMBase bridge NodeList to the DOM Document. |
Element |
add(Relation relation)
Adds one Relation to a DOM Document. |
void |
add(RelationList relations)
Adds a list of Relation to the DOM Document. |
protected Element |
createElement(String name)
|
protected String |
getAttribute(Element element,
String name)
|
Document |
getDocument()
Returns the working DOM document. |
protected Element |
getElementById(Node n,
String id)
|
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 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()
public 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(NodeList nodes)
nodes - An MMBase bridge NodeList.public void add(RelationList relations)
relations - An MMBase bridge RelationList
protected Element getElementById(Node n,
String id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||