com.bowstreet.util
Class JSON2XMLHandlerImpl

java.lang.Object
  extended by com.bowstreet.util.JSON2XMLHandlerImpl
All Implemented Interfaces:
JSON2XMLHandler

public class JSON2XMLHandlerImpl
extends java.lang.Object
implements JSON2XMLHandler

Implementation of JSON2XMLHandler, which is used by the default JSON to XML conversion processing.


Constructor Summary
JSON2XMLHandlerImpl()
           
 
Method Summary
 void beginArray(IXml parent)
          Called at the beginning of processing a JSON Array.
 void beginData(IXml parent, java.lang.String value)
          Called to add a text value to the specified parent element.
 IXml beginDocument()
          Called at the beginning of the JSON to XML conversion.
 IXml beginElement(IXml parent, java.lang.String name)
          Called to add a new child element to the specified parent.
 void endArray(IXml parent)
          Called at the end of processing a JSON Array.
 void endData(IXml parent)
          Called at the end of data creation.
 void endDocument(IXml document)
          Called at the end of the JSON to XML conversion.
 void endElement(IXml element)
          Called at the end of element creation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSON2XMLHandlerImpl

public JSON2XMLHandlerImpl()
Method Detail

beginArray

public void beginArray(IXml parent)
Called at the beginning of processing a JSON Array. This does no processing, but can be overridden to provide additional processing.

Specified by:
beginArray in interface JSON2XMLHandler
Parameters:
parent - The parent element of the array.

beginData

public void beginData(IXml parent,
                      java.lang.String value)
Called to add a text value to the specified parent element.

Specified by:
beginData in interface JSON2XMLHandler
Parameters:
parent - The parent which to add the data to.
value - The text value to be added.

beginDocument

public IXml beginDocument()
Called at the beginning of the JSON to XML conversion.
This method creates a new IXml element named must "Results".

Specified by:
beginDocument in interface JSON2XMLHandler
Returns:
A new IXml element.

beginElement

public IXml beginElement(IXml parent,
                         java.lang.String name)
Called to add a new child element to the specified parent.
This method creates a new IXml element using the specified name.

Specified by:
beginElement in interface JSON2XMLHandler
Parameters:
parent - The parent which to add the new element to.
Returns:
A new IXml element.

endArray

public void endArray(IXml parent)
Called at the end of processing a JSON Array. This does no processing, but can be overridden to provide additional processing.

Specified by:
endArray in interface JSON2XMLHandler
Parameters:
parent - The parent element of the array.

endData

public void endData(IXml parent)
Called at the end of data creation. This does no processing, but can be overridden to provide additional processing.

Specified by:
endData in interface JSON2XMLHandler
Parameters:
element - The element that data was added to.

endDocument

public void endDocument(IXml document)
Called at the end of the JSON to XML conversion.
This does no processing, but can be overridden to provide additional processing.

Specified by:
endDocument in interface JSON2XMLHandler
Parameters:
document - The document root IXml element.

endElement

public void endElement(IXml element)
Called at the end of element creation. This does no processing, but can be overridden to provide additional processing.

Specified by:
endElement in interface JSON2XMLHandler
Parameters:
element - The element that was created.


Copyright © 2009 IBM. All Rights Reserved.