|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.xml.AbstractXmlBuilder
diva.util.xml.CompositeBuilder
public class CompositeBuilder
CompositeBuilder is a non-validating parser that uses other builders to parse and generate XML files from arbitrary collections of objects. (FIXME - more documentation here)
Red |
Field Summary | |
---|---|
private java.util.HashMap |
_builders
Store builder declarations as [tag, (class, builder)] for [class, (class, builder)] aliases. |
static java.lang.String |
BUILDER_DECLS_TAG
Indicates a group of builder declarations |
static java.lang.String |
BUILDER_TAG
Indicates a builder for a recognizer |
static java.lang.String |
CLASS_TAG
Indicates a recognizer class |
static java.lang.String |
DTD_1
The DTD for builder declarations. |
static java.lang.String |
DTD_URL
The URL where the DTD is stored. |
static java.lang.String |
PUBLIC_ID
The public identity of the RCL dtd file. |
static java.lang.String |
TAG_TAG
Indicates the tag of a recognizer |
Constructor Summary | |
---|---|
CompositeBuilder()
|
Method Summary | |
---|---|
void |
addBuilderDecls(java.io.Reader in)
Add all of the builder declarations in the given XML document to the builder map. |
java.lang.Object |
build(XmlElement elt,
java.lang.String type)
Build an object based on the XML element by looking up the appropriate builder and calling that builder on the element. |
private void |
debug(java.lang.String out)
|
XmlElement |
generate(java.lang.Object in)
Build an XML element based on given object by looking up the appropriate builder based on the object's class name and calling that builder's generate method on the object. |
static void |
main(java.lang.String[] args)
Simple test of this class. |
Methods inherited from class diva.util.xml.AbstractXmlBuilder |
---|
getDelegate, setDelegate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PUBLIC_ID
public static final java.lang.String DTD_URL
public static final java.lang.String DTD_1
public static final java.lang.String CLASS_TAG
public static final java.lang.String TAG_TAG
public static final java.lang.String BUILDER_TAG
public static final java.lang.String BUILDER_DECLS_TAG
private java.util.HashMap _builders
Constructor Detail |
---|
public CompositeBuilder()
Method Detail |
---|
public void addBuilderDecls(java.io.Reader in) throws java.lang.Exception
java.lang.Exception
private void debug(java.lang.String out)
public java.lang.Object build(XmlElement elt, java.lang.String type) throws java.lang.Exception
build
in interface XmlBuilder
build
in class AbstractXmlBuilder
java.lang.Exception
public XmlElement generate(java.lang.Object in) throws java.lang.Exception
generate
in interface XmlBuilder
generate
in class AbstractXmlBuilder
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |