|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xquark.xml.xdbc.DefaultReadOnlyXMLConnection
org.xquark.mediator.MediatorConnection
This class implements the interface that represents a connection with
a specific XML data source. Within the context of an XMLConnection,
XQuery or XPath statements are executed and XML results are returned.
This interface is used by both read-only connections and storage
connections, which require access to a larger set of interfaces, such
as interfaces representing XML collections and documents.
Classes providing read-only access to XML data sources can avoid
implementing the optional interfaces for XML storage management,
by deriving from the abstract class DefautReadOnlyXMLConnection.
Field Summary |
Fields inherited from interface org.xquark.xml.xdbc.XMLConnection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE, XPATH_STRING_TYPE, XQUERY_STRING_TYPE |
Method Summary | |
void |
close()
To close the current data source connection. |
XMLStatement |
createStatement()
Creates a statement object for sending XQuery (query type by default) statements to the data source. |
XMLStatement |
createStatement(short queryType)
Creates a statement object for sending XQuery or XPath (according to the specified type) statements to the data source. |
Mediator |
getMediator()
|
XMLDataSourceMetaData |
getMetaData()
Gets the metadata regarding this connection's data source. |
XMLDataSourceMetaData |
getMetaData(boolean refresh)
Gets the metadata regarding this connection's data source. |
java.lang.String |
getURL()
To get the current URL of this connection. |
java.lang.String |
getUserName()
To get the current user name. |
boolean |
isClosed()
To know the connection state (opened or closed). |
void |
loadModule(java.lang.String moduleURL)
|
void |
loadSchema(org.xml.sax.InputSource source)
|
PreparedXMLStatement |
prepareStatement(java.lang.String query)
Creates a prepared statement object for sending parameterized XQuery (query type by default) statements to the data source. |
void |
setBaseURI(java.lang.String baseURI)
Sets the base URI for documents. |
Methods inherited from class org.xquark.xml.xdbc.DefaultReadOnlyXMLConnection |
commit, createCollection, createCollectionConfig, deleteAllCollections, deleteCollection, getAutoCommit, getCollection, getTransactionIsolation, isReadOnly, renameCollection, rollback, setAutoCommit, setReadOnly, setTransactionIsolation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xquark.xml.xdbc.XMLConnection |
commit, createCollection, createCollectionConfig, deleteAllCollections, deleteCollection, getAutoCommit, getCollection, getTransactionIsolation, isReadOnly, renameCollection, rollback, setAutoCommit, setReadOnly, setTransactionIsolation |
Method Detail |
public Mediator getMediator()
public void close() throws XMLDBCException
close
in interface XMLConnection
XMLDBCException
- if a data source access error occurs.public boolean isClosed() throws XMLDBCException
isClosed
in interface XMLConnection
XMLDBCException
- if a data source access error occurs.public XMLDataSourceMetaData getMetaData() throws XMLDBCException
getMetaData
in interface XMLConnection
XMLDBCException
- if a data source access error occurs.public XMLDataSourceMetaData getMetaData(boolean refresh) throws XMLDBCException
getMetaData
in interface XMLConnection
refresh
- when it is true, reload metadata.
XMLDBCException
- if a data source access error occurs.public java.lang.String getUserName() throws XMLDBCException
getUserName
in interface XMLConnection
XMLDBCException
- if a data source access error occurs.public java.lang.String getURL() throws XMLDBCException
getURL
in interface XMLConnection
XMLDBCException
- if a data source access error occurs.public XMLStatement createStatement() throws XMLDBCException
createStatement
in interface XMLConnection
XMLDBCException
- if a data source access error occurs.public XMLStatement createStatement(short queryType) throws XMLDBCException
createStatement
in interface XMLConnection
queryType
- the type of query for this statement (see constants in this interface).
XMLDBCException
- if a data source access error occurs.public PreparedXMLStatement prepareStatement(java.lang.String query) throws XMLDBCException, XMLDBCNotSupportedException
prepareStatement
in interface XMLConnection
query
- a parameterized XQuery.
XMLDBCException
- if a data source access error occurs.
XMLDBCNotSupportedException
- if the method is not supported.public void loadModule(java.lang.String moduleURL) throws XMLDBCException
XMLDBCException
public void loadSchema(org.xml.sax.InputSource source) throws org.xml.sax.SAXException, XMLDBCException
org.xml.sax.SAXException
XMLDBCException
public void setBaseURI(java.lang.String baseURI)
XMLConnection
setBaseURI
in interface XMLConnection
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |