Package diva.util.xml
Class AbstractXmlBuilder
- java.lang.Object
-
- diva.util.xml.AbstractXmlBuilder
-
- All Implemented Interfaces:
XmlBuilder
- Direct Known Subclasses:
CompositeBuilder
public abstract class AbstractXmlBuilder extends java.lang.Object implements XmlBuilder
An abstract implementation of the XmlBuilder interface that gets and sets a delegate, leaves the build method abstract, and doesn't support the generate method.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Object
build(XmlElement elt, java.lang.String type)
Given an XmlElement, create and return an internal representation of it.XmlElement
generate(java.lang.Object in)
Unable to generate XML by default.XmlBuilder
getDelegate()
Return the delegate set by getDelegate().void
setDelegate(XmlBuilder delegate)
Delegate builders can be used to build/generate for objects that are unknown by the current builder, as might be the case in a hierarchy of heterogeneous objects.
-
-
-
Method Detail
-
build
public abstract java.lang.Object build(XmlElement elt, java.lang.String type) throws java.lang.Exception
Given an XmlElement, create and return an internal representation of it. Implementors should also provide a more type-specific version of this method:public Graph build (XmlElement elt, String type);
- Specified by:
build
in interfaceXmlBuilder
- Throws:
java.lang.Exception
-
setDelegate
public void setDelegate(XmlBuilder delegate)
Delegate builders can be used to build/generate for objects that are unknown by the current builder, as might be the case in a hierarchy of heterogeneous objects.- Specified by:
setDelegate
in interfaceXmlBuilder
- See Also:
CompositeBuilder
-
getDelegate
public XmlBuilder getDelegate()
Return the delegate set by getDelegate().
-
generate
public XmlElement generate(java.lang.Object in) throws java.lang.Exception
Unable to generate XML by default.- Specified by:
generate
in interfaceXmlBuilder
- Throws:
java.lang.UnsupportedOperationException
- Unable to generate XML by defaultjava.lang.Exception
-
-