de.fraunhofer.ipsi.ipsixq.api.impl
Class XQAbstractDataSource

java.lang.Object
  extended by de.fraunhofer.ipsi.ipsixq.api.impl.XQAbstractDataFactory
      extended by de.fraunhofer.ipsi.ipsixq.api.impl.XQAbstractDataSource
All Implemented Interfaces:
XQDataFactory, XQDatasource
Direct Known Subclasses:
IPSIXQDataSource

public abstract class XQAbstractDataSource
extends XQAbstractDataFactory
implements XQDatasource

Author:
Michael Stark

Constructor Summary
XQAbstractDataSource()
           
 
Method Summary
 XQConnection getConnection()
          Attempts to create a connection to an XML datasource.
 XQConnection getConnection(java.sql.Connection con)
          Attempts to create a connection to the XML datasource using an existing JDBC connection.
 XQConnection getConnection(java.lang.String username, java.lang.String passwd)
          Attempts to establish a connection to an XML datasource.
 int getLoginTimeout()
          Gets the maximum time in seconds that this datasource can wait while attempting to connect to a database.
 java.io.PrintWriter getLogWriter()
          Retrieves the log writer for this XQDataSource object.
 java.lang.String getProperty(java.lang.String name)
          Returns the current value of the named property if set, else null.
 java.lang.String[] getSupportedPropertyNames()
          Returns an array containing the property names supported by this XQDataSource.
 void setCommonHandler(XQCommonHandler hdlr)
          Sets the default common handler to be used for converting items to and from Java objects in the setObject and getObject methods on an item.
 void setLoginTimeout(int seconds)
          Sets the maximum time in seconds that this datasource will wait while attempting to connect to a database.
 void setLogWriter(java.io.PrintWriter out)
          Sets the log writer for this XQDataSource object to the given java.io.PrintWriter object.
 void setProperties(java.util.Properties props)
          Sets the data source properties from the specified Properties instance.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the named property to the specified value.
 
Methods inherited from class de.fraunhofer.ipsi.ipsixq.api.impl.XQAbstractDataFactory
createCachedSequence, createCachedSequence, createItem, createItemFromByte, createItemFromDate, createItemFromInt, createItemFromLong, createItemFromString, createItemType, createItemType, createSequenceType, createSequenceType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.xquery.XQDataFactory
createCachedSequence, createCachedSequence, createItem, createItemFromByte, createItemFromDate, createItemFromInt, createItemFromLong, createItemFromString, createItemType, createItemType, createSequenceType, createSequenceType
 

Constructor Detail

XQAbstractDataSource

public XQAbstractDataSource()
Method Detail

getConnection

public XQConnection getConnection()
                           throws XQException
Description copied from interface: XQDatasource
Attempts to create a connection to an XML datasource.

Specified by:
getConnection in interface XQDatasource
Throws:
XQException

getConnection

public XQConnection getConnection(java.sql.Connection con)
                           throws XQException
Description copied from interface: XQDatasource
Attempts to create a connection to the XML datasource using an existing JDBC connection.

Specified by:
getConnection in interface XQDatasource
Throws:
XQException

getConnection

public XQConnection getConnection(java.lang.String username,
                                  java.lang.String passwd)
                           throws XQException
Description copied from interface: XQDatasource
Attempts to establish a connection to an XML datasource.

Specified by:
getConnection in interface XQDatasource
Throws:
XQException

getLoginTimeout

public int getLoginTimeout()
                    throws XQException
Description copied from interface: XQDatasource
Gets the maximum time in seconds that this datasource can wait while attempting to connect to a database.

Specified by:
getLoginTimeout in interface XQDatasource
Throws:
XQException

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws XQException
Description copied from interface: XQDatasource
Retrieves the log writer for this XQDataSource object.

Specified by:
getLogWriter in interface XQDatasource
Throws:
XQException

getProperty

public java.lang.String getProperty(java.lang.String name)
                             throws XQException
Description copied from interface: XQDatasource
Returns the current value of the named property if set, else null.

Specified by:
getProperty in interface XQDatasource
Throws:
XQException

getSupportedPropertyNames

public java.lang.String[] getSupportedPropertyNames()
Description copied from interface: XQDatasource
Returns an array containing the property names supported by this XQDataSource.

Specified by:
getSupportedPropertyNames in interface XQDatasource

setCommonHandler

public void setCommonHandler(XQCommonHandler hdlr)
                      throws XQException
Description copied from interface: XQDatasource
Sets the default common handler to be used for converting items to and from Java objects in the setObject and getObject methods on an item.

Specified by:
setCommonHandler in interface XQDatasource
Throws:
XQException

setLoginTimeout

public void setLoginTimeout(int seconds)
                     throws XQException
Description copied from interface: XQDatasource
Sets the maximum time in seconds that this datasource will wait while attempting to connect to a database.

Specified by:
setLoginTimeout in interface XQDatasource
Throws:
XQException

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws XQException
Description copied from interface: XQDatasource
Sets the log writer for this XQDataSource object to the given java.io.PrintWriter object.

Specified by:
setLogWriter in interface XQDatasource
Throws:
XQException

setProperties

public void setProperties(java.util.Properties props)
                   throws XQException
Description copied from interface: XQDatasource
Sets the data source properties from the specified Properties instance.

Specified by:
setProperties in interface XQDatasource
Throws:
XQException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
                 throws XQException
Description copied from interface: XQDatasource
Sets the named property to the specified value.

Specified by:
setProperty in interface XQDatasource
Throws:
XQException