Class Bind
java.lang.Object
|
+----Bind
- public class Bind
- extends Object
Decides at runtime which class created by the xmltool.classgen
module is to be used using reflection feature of Java
and instantiates an object of that class and calls appropriate
methods on it to save the parsed data from the XmlBrowser class
into the object and to store the object into the POET
database.
-
Bind(String)
- Connects to the database when the root element is being first parsed
-
saveValues()
- Calls the loader class to set the values in the object
-
setValues(String, String[], boolean)
- Method that sets the value of an object depending on input from XML document
Bind
public Bind(String string) throws ODMGException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
- Connects to the database when the root element is being first parsed
- Parameters:
- string - Name of root element
- Throws: ODMGException
- cant save data
- Throws: InvocationTargetException
- cant instantiate object
- Throws: IllegalAccessException
- cant access object
- Throws: IllegalArgumentException
- arguments incorrect for the method
- Throws: ClassNotFoundException
- class not found
- Throws: InstantiationException
- cant instantiate object
setValues
public void setValues(String string,
String str[],
boolean consider) throws ODMGException, InvocationTargetException, IllegalAccessException
- Method that sets the value of an object depending on input from XML document
- Parameters:
- string - Value of the top element in the path expression
- str - An array of values in case this is a collection type of element
- consider - To check which type of value is inputted
- Throws: ODMGException
- cant save data
- Throws: InvocationTargetException
- cant instantiate object
- Throws: IllegalAccessException
- cant access object
saveValues
public void saveValues() throws ODMGException, InvocationTargetException, IllegalAccessException
- Calls the loader class to set the values in the object
- Throws: ODMGException
- cant save data
- Throws: InvocationTargetException
- cant instantiate object
- Throws: IllegalAccessException
- cant access object