org.jbind.xml.instance.builder
Class DataBuilder

java.lang.Object
  extended byorg.jbind.xml.instance.builder.DataBuilder
All Implemented Interfaces:
IDataBuilder

public class DataBuilder
extends java.lang.Object
implements IDataBuilder


Constructor Summary
DataBuilder(boolean aUseBuiltInClassesOnly)
           
 
Method Summary
 void endElement(IElementImpl anElement, ILocation aLocation, IConstraintViolations aViolations)
          Creates a data object for the element.
 void initialize()
          Initializes the value builder.
 void signalText(IImplContainer aContainer, java.lang.String aText, ILocation aLocation, IConstraintViolations aViolations)
          Signals textual content.
 void startElement(IElementImpl anElement, IConstraintViolations aViolations)
          Starts an element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBuilder

public DataBuilder(boolean aUseBuiltInClassesOnly)
Method Detail

initialize

public void initialize()
Description copied from interface: IDataBuilder
Initializes the value builder. Called by the data builder before a new data document is built.

Specified by:
initialize in interface IDataBuilder

startElement

public void startElement(IElementImpl anElement,
                         IConstraintViolations aViolations)
                  throws XmlException
Description copied from interface: IDataBuilder
Starts an element. The provided element (implementation) has not yet received its content.

Specified by:
startElement in interface IDataBuilder
Parameters:
anElement - (required).
aViolations - (required).
Throws:
XmlException - Raised if the element could not be started. The value builder must not be called until the element has ended. (The corresponding endElement call must also not be done.)

endElement

public void endElement(IElementImpl anElement,
                       ILocation aLocation,
                       IConstraintViolations aViolations)
                throws XmlException
Creates a data object for the element. The data object can only be created after the element ended because in case of an element that has a union type the actual type of the data object to be instantiated depends on the textual content of the element.

Specified by:
endElement in interface IDataBuilder
Parameters:
anElement - (required).
aLocation - (required). The location where the element ended.
aViolations - (required).
Throws:
XmlException - Raised if the data object could not be created.

signalText

public void signalText(IImplContainer aContainer,
                       java.lang.String aText,
                       ILocation aLocation,
                       IConstraintViolations aViolations)
Description copied from interface: IDataBuilder
Signals textual content.

Specified by:
signalText in interface IDataBuilder
Parameters:
aContainer - (required).
aText - (required).
aLocation - (required). The location where the text started.
aViolations - (required).