VOTableUtil
Class ObjectFactory

java.lang.Object
  |
  +--com.tbf.xml.XmlObjectFactory
        |
        +--VOTableUtil.ObjectFactory
All Implemented Interfaces:
java.lang.Cloneable

public class ObjectFactory
extends com.tbf.xml.XmlObjectFactory

This class provides methods to create instances of the objects in this class library (project).

See Also:
XmlObjectFactory

Field Summary
protected static java.util.Hashtable _default_dbmap
           
protected static ObjectFactory _default_factory
           
protected static java.util.Hashtable _default_map
           
 
Fields inherited from class com.tbf.xml.XmlObjectFactory
_class_loader, _dbmap, _default_reload_modified_classes, _last_exception, _map, _reload_modified_classes, _saved_parser
 
Constructor Summary
protected ObjectFactory()
          Create an instance of this ObjectFactory with no bindings set.
 
Method Summary
static void clearDefaultFactoryLastError()
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.clearLastError().
static void clearDefaultFactoryLastException()
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.clearLastException().
static java.util.Vector createList(java.sql.ResultSet rs)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getList(java.sql.ResultSet).
static java.util.Vector createList(com.tbf.xml.XmlElement xml)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getList(XmlElement).
static com.tbf.xml.XmlObject createObject(java.io.File f)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(java.io.File).
static com.tbf.xml.XmlObject createObject(java.io.InputStream in)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(java.io.InputStream).
static com.tbf.xml.XmlDbObject createObject(java.sql.ResultSet rs)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(java.sql.ResultSet).
static com.tbf.xml.XmlObject createObject(java.lang.String filename)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(String).
static com.tbf.xml.XmlObject createObject(java.lang.String name, com.tbf.xml.XmlElement xml)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(String, XmlElement).
static com.tbf.xml.XmlObject createObject(com.tbf.xml.XmlElement xml)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(XmlElement).
static com.tbf.xml.XmlObject createObjectFromString(java.lang.String xml)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstanceFromString(String).
static com.tbf.xml.XmlObject createObjectFromUrl(java.lang.String url)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstanceFromUrl(String).
static ObjectFactory getDefaultFactory()
          Get the default ObjectFactory instance.
static java.lang.String getDefaultFactoryLastError()
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getLastError().
static java.lang.Exception getDefaultFactoryLastException()
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getLastException().
static ObjectFactory getInstance()
          Creates an instance of this ObjectFactory and populates its node to class name and column to class name maps with the defaults.
static void setDefaultFactoryXmlBinding(java.lang.String name, java.lang.String class_name)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.setXmlBinding(String, String).
static void setDefaultFactoryXmlBinding(java.lang.String name, com.tbf.xml.XmlObjectFactory factory)
          Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.setXmlBinding(String, XmlObjectFactory).
 
Methods inherited from class com.tbf.xml.XmlObjectFactory
appendError, clearLastError, clone, dumpLicense, getActivationKey, getBuildNumber, getClassForName, getClassForResultSet, getDbBinding, getDefaultReloadModifiedClasses, getExpirationDate, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceFromString, getInstanceFromUrl, getLastError, getLastException, getLicenseNetworkString, getLicenseType, getList, getList, getParser, getRegistrationCode, getReloadModifiedClasses, getXmlBinding, main, merge, merge, removeDbBinding, removeXmlBinding, resetClassLoader, saveParser, setDbBinding, setDbBinding, setDbMap, setDefaultReloadModifiedClasses, setLastError, setLastException, setReloadModifiedClasses, setXmlBinding, setXmlBinding, setXmlMap, unmarshal, unmarshal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_default_map

protected static java.util.Hashtable _default_map

_default_dbmap

protected static java.util.Hashtable _default_dbmap

_default_factory

protected static ObjectFactory _default_factory
Constructor Detail

ObjectFactory

protected ObjectFactory()
Create an instance of this ObjectFactory with no bindings set.
Method Detail

getDefaultFactory

public static ObjectFactory getDefaultFactory()
Get the default ObjectFactory instance.

getInstance

public static ObjectFactory getInstance()
Creates an instance of this ObjectFactory and populates its node to class name and column to class name maps with the defaults.

getDefaultFactoryLastError

public static java.lang.String getDefaultFactoryLastError()
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getLastError().

Get last error reported by the default ObjectFactory instance for this particular ObjectFactory. The default factory is used by all the static createObject methods in this class.
Returns:
the last error reported by the default ObjectFactory instance for this particular ObjectFactory
See Also:
getDefaultFactoryLastException()

clearDefaultFactoryLastError

public static void clearDefaultFactoryLastError()
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.clearLastError().

Clear the default factory last error message.

getDefaultFactoryLastException

public static java.lang.Exception getDefaultFactoryLastException()
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getLastException().

Get last exception reported by the default ObjectFactory instance for this particular ObjectFactory. The default factory is used by all the static createObject methods in this class.
Returns:
the last exception reported by the default ObjectFactory instance for this particular ObjectFactory
See Also:
getDefaultFactoryLastError()

clearDefaultFactoryLastException

public static void clearDefaultFactoryLastException()
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.clearLastException().

Clear the default factory last exception.

setDefaultFactoryXmlBinding

public static void setDefaultFactoryXmlBinding(java.lang.String name,
                                               java.lang.String class_name)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.setXmlBinding(String, String).

Set the XML name to class name binding on the default ObjectFactory instance.
Parameters:
name - the name of the binding to get
class_name - the class name that the XML name is to be bound to

setDefaultFactoryXmlBinding

public static void setDefaultFactoryXmlBinding(java.lang.String name,
                                               com.tbf.xml.XmlObjectFactory factory)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.setXmlBinding(String, XmlObjectFactory).

Set the XML name to XmlObjectFactory binding on the default ObjectFactory instance.
Parameters:
name - the name of the binding to get
factory - the XmlObjectFactory that the XML name is to be bound to

createObject

public static com.tbf.xml.XmlObject createObject(java.lang.String name,
                                                 com.tbf.xml.XmlElement xml)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(String, XmlElement).

Create an instance of the specified class name and populate it with the specified XML data.
Parameters:
name - the class name of the object to create
xml - the XmlElement (tree) containg the data for the created object
Returns:
the created and populated object

createObject

public static com.tbf.xml.XmlObject createObject(java.io.InputStream in)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(java.io.InputStream).

Create an instance of the class specified in the InputStream populate it with the XML data on that stream.
Parameters:
in - the InputStream containg the data to create and populate an XmlObject
Returns:
the created and populated object

createObjectFromString

public static com.tbf.xml.XmlObject createObjectFromString(java.lang.String xml)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstanceFromString(String).

Create an instance of the class from the XML string.
Parameters:
xml - the String containing the XML data to create and populate an XmlObject
Returns:
the created and populated object

createObjectFromUrl

public static com.tbf.xml.XmlObject createObjectFromUrl(java.lang.String url)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstanceFromUrl(String).

Create an instance of the class from the XML file pointed to by the provided URL string.
Parameters:
url - the URL to open and read to create and populate an XmlObject
Returns:
the created and populated object

createObject

public static com.tbf.xml.XmlObject createObject(com.tbf.xml.XmlElement xml)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(XmlElement).

Create an instance of the class specified in the XML and populate it with that XML data.
Parameters:
xml - the XmlElement (tree) containg the data for the created object
Returns:
the created and populated object

createObject

public static com.tbf.xml.XmlObject createObject(java.io.File f)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(java.io.File).

Create and populate an instance of the class specified in the XML document file.
Parameters:
f - the File to open and use to create and populate an XmlObject
Returns:
the created and populated object

createObject

public static com.tbf.xml.XmlObject createObject(java.lang.String filename)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(String).

Create and populate an instance of the class specified in the XML filename.
Parameters:
filename - the filename to open and use to create and populate an XmlObject
Returns:
the created and populated object

createList

public static java.util.Vector createList(com.tbf.xml.XmlElement xml)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getList(XmlElement).

Create and populate a Vector of objects from the passed in XML tree.
Parameters:
xml - the XmlElement (tree) containg the data for the created list.
Returns:
the created and populated list (Vector)

createObject

public static com.tbf.xml.XmlDbObject createObject(java.sql.ResultSet rs)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getInstance(java.sql.ResultSet).

Create and populate an instance of a XmlDbObject based on the table name contained in the ResultSet.
Parameters:
rs - the ResultSet containg the data to create and populate an XmlDbObject
Returns:
the created and populated object

createList

public static java.util.Vector createList(java.sql.ResultSet rs)
Deprecated. will be removed in a future release. Use com.tbf.xml.XmlObjectFactory.getList(java.sql.ResultSet).

Create a Vector and populate it with instances of XmlDbObjects based on the table name contained in the ResultSet.
Parameters:
rs - the ResultSet containg the data to create and populate an XmlDbObject
Returns:
a Vector containg the created and populated XmlDbObjects