|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xquark.bridge.XQBridge
Objects of this class encapsulate a JDBC connection and provide access to both
the XQuery and insertion capabilities of the XQBridge.
Objects of this class are thread-safe and can be reused multiple times.
However, as they encapsulate a JDBC connection, it is recommended to use
different objects with different JDBC connections for different threads.
Constructor Summary | |
XQBridge(java.sql.Connection jdbcConn)
Deprecated. prevents the use of an external or internal data source. |
|
XQBridge(java.sql.Connection jdbcConn,
java.lang.String confURI)
Deprecated. prevents the use of an external or internal data source. |
|
XQBridge(javax.sql.DataSource dataSource)
Constructor to use with a JDBC data source. |
|
XQBridge(javax.sql.DataSource dataSource,
java.io.File confFile)
Constructor to use with a JDBC data source and an extractor configuration file. |
|
XQBridge(java.io.File confFile)
Constructor to use with an extractor configuration file. |
|
XQBridge(java.lang.String URI)
Constructor to use with a configuration file URL or a JNDI name referencing a JDBC datasource instance. |
|
XQBridge(java.lang.String url,
java.lang.String userName,
java.lang.String password)
Construction to use when JDBC connection parameters are available. |
Method Summary | |
void |
close()
Closes the extractor and the underlying resources among which the internal JDBC data source except if it was passed at construction time. |
java.lang.ClassLoader |
getClassLoader()
Returns the class loader used for loading drivers, mappings and user generators. |
java.sql.Connection |
getConnection()
Deprecated. This method is linked to the deprecated constructor XQBridge(Connection, String) . |
Mapping |
getMapping(org.xml.sax.InputSource source)
Deprecated. Prefer the string methods because they do not create a problem for resolving relative URIs in mapping file schemaLocation attribute. |
Mapping |
getMapping(org.xml.sax.InputSource source,
boolean reload)
Deprecated. Prefer the string methods because they do not create a problem for resolving relative URIs in mapping file schemaLocation attribute. |
Mapping |
getMapping(java.lang.String fileURI)
Creates a mapping object containing the processed version of the specified mapping file. |
Mapping |
getMapping(java.lang.String fileURI,
boolean reload)
Creates a mapping object containing the processed version of the specified mapping file. |
ExtractorConnection |
getXMLConnection()
Returns an extractor XML/DBC connection that can be used to execute XQuery statements over the database. |
void |
loadSchema(org.xml.sax.InputSource source)
Loads an XML schema in memory. |
void |
resetMappings(boolean resetSchemas)
Empties the mappings cache. |
void |
setClassLoader(java.lang.ClassLoader loader)
Set the class loader used for loading drivers, mappings and user generators. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XQBridge(java.lang.String URI)
URI
- either the configuration file URL, or a JNDI reference that
MUST be prefixed with the "jndi:" string to be recognized as
this.public XQBridge(java.io.File confFile)
public XQBridge(javax.sql.DataSource dataSource)
XMLDBCException
- API exceptionpublic XQBridge(javax.sql.DataSource dataSource, java.io.File confFile)
XMLDBCException
- API exceptionpublic XQBridge(java.lang.String url, java.lang.String userName, java.lang.String password)
password
- the password for the login name.
XMLDBCException
- API exceptionpublic XQBridge(java.sql.Connection jdbcConn)
XMLDBCException
- API exceptionpublic XQBridge(java.sql.Connection jdbcConn, java.lang.String confURI)
XMLDBCException
- API exceptionMethod Detail |
public java.sql.Connection getConnection() throws XMLDBCException
XQBridge(Connection, String)
.
XMLDBCException
public ExtractorConnection getXMLConnection() throws XMLDBCException
XMLDBCException
public void close() throws XMLDBCException
XMLDBCException
- API exceptionpublic void setClassLoader(java.lang.ClassLoader loader)
loader
- ClassLoaderpublic java.lang.ClassLoader getClassLoader()
public Mapping getMapping(org.xml.sax.InputSource source) throws XMLDBCException
source
- a SAX input source encapsulating the mapping file.
XMLDBCException
- if an error occured while loading the mapping file. The underlying exception provides the
root cause for the exceptionpublic Mapping getMapping(org.xml.sax.InputSource source, boolean reload) throws XMLDBCException
source
- a SAX input source encapsulating the mapping file.reload
- true if the mapping file must be reloaded even if found in the cache.
XMLDBCException
- if an error occured while loading the mapping file. The underlying exception provides the
root cause for the exceptionpublic Mapping getMapping(java.lang.String fileURI) throws XMLDBCException
fileURI
- the URI of the mapping file.
XMLDBCException
- if an error occured while loading the mapping file. The underlying exception provides the
root cause for the exceptionpublic Mapping getMapping(java.lang.String fileURI, boolean reload) throws XMLDBCException
fileURI
- the URI of the mapping file.reload
- true if the mapping file must be reloaded even if found in the cache.
XMLDBCException
- if an error occured while loading the mapping file. The underlying exception provides the
root cause for the exceptionpublic void loadSchema(org.xml.sax.InputSource source) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void resetMappings(boolean resetSchemas)
resetSchemas
- if the schema cache must be cleared as well
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |