com.epam.xml.mapper
Class XMLInstanceBuilder<T>

java.lang.Object
  extended by com.epam.xml.mapper.XMLInstanceBuilder<T>

public final class XMLInstanceBuilder<T>
extends Object

User: Volodymyr_Biloshkurskyi@epam.com Date: Jul 21, 2009 : 5:44:12 PM


Constructor Summary
XMLInstanceBuilder()
           
 
Method Summary
 void endDocument()
          On end document.
 void endElement(String nodeName)
          Ends element.
protected  ReflectDataStorage getReflectDataStorage(Class _class)
           
 T getRootObject()
          Gets root Object.
 Object lookup(String nodeName, Attributes attributes)
          Finds instance by nodeName.
 void setAttribute(Object instance, String attributeName, String attributeValue)
          Sets attribute.
 void setAttribute(String attributeName, String attributeValue)
          Sets attribute.
 void setGamut(int gamut)
           
 void setRootClass(Class source)
          Sets a root class.
 void setRootObject(T rootObject, boolean replaceData)
          Set root Object.
 void setValue(String value)
          Sets the value.
 void startDocument()
          Starts document.
 void startElement(String elementName)
          Starts element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLInstanceBuilder

public XMLInstanceBuilder()
Method Detail

setGamut

public void setGamut(int gamut)

lookup

public Object lookup(String nodeName,
                     Attributes attributes)
Finds instance by nodeName.

Parameters:
nodeName -
attributes -

setAttribute

public void setAttribute(String attributeName,
                         String attributeValue)
Sets attribute.

Parameters:
attributeName -
attributeValue -
Throws:
RuntimeException - if occurred

setAttribute

public void setAttribute(Object instance,
                         String attributeName,
                         String attributeValue)
Sets attribute.

Parameters:
attributeName -
attributeValue -
Throws:
RuntimeException - if occurred

setValue

public void setValue(String value)
Sets the value.

Parameters:
value - the value
Throws:
RuntimeException - if occurred

startDocument

public void startDocument()
Starts document.


startElement

public void startElement(String elementName)
Starts element.


endElement

public void endElement(String nodeName)
Ends element.

Parameters:
nodeName -
Throws:
RuntimeException - if occurred

endDocument

public void endDocument()
On end document.


setRootClass

public void setRootClass(Class source)
Sets a root class.


getRootObject

public final T getRootObject()
Gets root Object.


setRootObject

public void setRootObject(T rootObject,
                          boolean replaceData)
Set root Object.

Parameters:
rootObject -

getReflectDataStorage

protected final ReflectDataStorage getReflectDataStorage(Class _class)


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.