|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxtc.driver.XTCconnection
public class XTCconnection
Nested Class Summary | |
---|---|
(package private) class |
XTCconnection.ResponseThread
|
Field Summary | |
---|---|
private XTCconnectionID |
connectionID
|
private String |
currentDirectoryPath
|
private String |
host
|
private int |
isolationLevel
|
static int |
ISOLATIONLEVEL_COMMITTED
|
static int |
ISOLATIONLEVEL_NONE
|
static int |
ISOLATIONLEVEL_REPEATABLE
|
static int |
ISOLATIONLEVEL_SERIALIZABLE
|
static int |
ISOLATIONLEVEL_UNCOMMITTED
|
private int |
lockDepth
|
static int |
LOCKDEPTH_MAX
|
private int |
maxQueryTokens
|
private int |
port
|
private XTCconnection.ResponseThread |
responseThread
|
private boolean |
singleStatementCommit
|
private XTCtransaction |
transaction
|
private XTCapiRmi |
xtcApiRmi
|
private XTCdomRmi |
xtcDomRmi
|
private XTCsaxRmi |
xtcSaxRmi
|
Constructor Summary | |
---|---|
XTCconnection(String host,
int port,
XTCconnectionID connectionID,
XTCapiRmi xtcApiRmi)
Do not invoke this method directly. |
Method Summary | |
---|---|
void |
beginWork(String transactionName)
Starts a new transaction and keeps the transaction context until method commitWork or rollbackWork is invoked. |
void |
beginWork(String transactionName,
boolean logged)
Starts a new transaction and keeps the transaction context until method commitWork or rollbackWork is invoked. |
void |
changeDirectory(String newDirectory)
Changes the current working directory. |
void |
close()
Closes the database connection. |
void |
commitWork()
Commits the currently running transaction or throws an XTCexception if no transaction is currently running. |
void |
createDirectory(String directory)
Creates a directory in the database. |
String |
createIndexes(String storedDocumentPath,
File indexDefinitionFile)
Creates indexes for the given document. |
void |
delete(String name)
Deletes a document. |
void |
deleteXmlStats(String storedXmlDocument)
|
void |
estimateXPath(String storedXmlDocument,
String expression)
|
String |
executeQuery(String query)
Executes a clp command. |
Node |
executeXPath(Document document,
String xpathExpression)
Executes an XPath expression on the given document. |
XTCxqueryResult |
executeXQuery(Document document,
String xquery,
boolean materialize,
boolean updateable)
Executes an XQuery expression on the given document. |
XTCxqueryResult |
executeXQuery(String xquery,
boolean materialize,
boolean updateable)
Executes an XQuery expression. |
void |
getBlob(String storedBlob,
String destFilename)
Loads the storedBlob from the database and writes it into a new file named destFilename. |
String |
getCurrentDirectory()
Returns the current working directory. |
Document |
getDocument(String storedDocument)
Returns the document for the given document name as a DOM Document node. |
void |
getDocument(String storedDocument,
String destFilename)
Loads a the storedDocument from the server and writes it into a new File of name destFilename. |
private void |
getDocumentViaGetSaxNodes(String storedDocument,
String destFilename)
|
private StringBuffer |
getIndention(int size)
|
int |
getIsolationLevel()
Returns the currently set isolation level. |
int |
getLockDepth()
Returns the currently set lock depth. |
int |
getTransactionID()
Returns the ID of the currently running transaction in this connection. |
boolean |
isInTransaction()
Returns if this connection is currently working within a transaction or not. |
String |
listDirectory()
Lists the contents of the current working directory. |
String |
listIndexes(String storedDocumentPath)
Returns a String containing a summary of all indexes available for the given document. |
private void |
printNodeList(ArrayList<XTCnode> list)
|
void |
putBlob(File localFile,
String destBlob)
Stores a blob contained in the given localFile into the database. |
void |
putCollection(File localDirectory,
String destDirectory,
boolean storeElementless)
Puts a collection residing in the localDirectory into the destDirectory on the server. |
void |
putDocument(File localFile,
String destDocument,
boolean storeElementless)
Puts the local file as destDocument in the database. |
void |
putServerCollection(File localDirectory,
String destDirectory,
boolean storeElementless)
Puts a collection already residing on the server into the database. |
void |
putServerDocument(String serverFileName,
String destDocument,
boolean storeElementless)
Puts the given document already residing on the server machine into the database. |
void |
removeDirectory(String directory)
Removes a directory from the database. |
void |
rename(String oldName,
String newName)
Renames a document in the database. |
void |
renameDirectory(String oldDirectory,
String newDirectory)
Renames a directory from the database. |
void |
rollbackWork()
Aborts the currently running transaction or throws an XTCexception if no transaction is currently running. |
double |
runXmlStats(String storedXmlDocument)
|
double |
runXmlStats(String storedXmlDocument,
String histogramType)
|
void |
saxParse(Document document,
ContentHandler contentHandler)
Issues a SAX parse on the given document with the given contentHandler. |
void |
setIsolationLevel(int isolationLevel)
Sets the new isolation level. |
void |
setLockDepth(int lockDepth)
Sets the lock depth. |
private String |
storeTempFile(File localFile)
|
private void |
testHook(String storedDocument)
|
void |
viewXmlStats(String storedXmlDocument)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ISOLATIONLEVEL_NONE
public static final int ISOLATIONLEVEL_UNCOMMITTED
public static final int ISOLATIONLEVEL_COMMITTED
public static final int ISOLATIONLEVEL_REPEATABLE
public static final int ISOLATIONLEVEL_SERIALIZABLE
public static final int LOCKDEPTH_MAX
private int isolationLevel
private int lockDepth
private String host
private int port
private XTCconnectionID connectionID
private XTCtransaction transaction
private boolean singleStatementCommit
private String currentDirectoryPath
private XTCapiRmi xtcApiRmi
private XTCdomRmi xtcDomRmi
private XTCsaxRmi xtcSaxRmi
private XTCconnection.ResponseThread responseThread
private final int maxQueryTokens
Constructor Detail |
---|
XTCconnection(String host, int port, XTCconnectionID connectionID, XTCapiRmi xtcApiRmi) throws XTCexception
XTCexception
Method Detail |
---|
public void setIsolationLevel(int isolationLevel) throws XTCexception
isolationLevel
- The new isolation level for the next transaction.
XTCexception
public int getIsolationLevel()
public void setLockDepth(int lockDepth) throws XTCexception
lockDepth
- The new lock depth.
XTCexception
public int getLockDepth()
public int getTransactionID()
public boolean isInTransaction()
public void beginWork(String transactionName) throws XTCexception
transactionName
-
XTCexception
public void beginWork(String transactionName, boolean logged) throws XTCexception
transactionName
- A name with which the transaction appears in the server's transaction list.logged
- sets the log-mode of this transaction
XTCexception
public void commitWork() throws XTCexception
XTCexception
public void rollbackWork() throws XTCexception
XTCexception
public double runXmlStats(String storedXmlDocument, String histogramType) throws XTCexception
XTCexception
public double runXmlStats(String storedXmlDocument) throws XTCexception
XTCexception
public void viewXmlStats(String storedXmlDocument) throws XTCexception
XTCexception
public void deleteXmlStats(String storedXmlDocument) throws XTCexception
XTCexception
public void estimateXPath(String storedXmlDocument, String expression) throws XTCexception
XTCexception
public Node executeXPath(Document document, String xpathExpression) throws DOMException
DOMException
public XTCxqueryResult executeXQuery(Document document, String xquery, boolean materialize, boolean updateable) throws DOMException
document
- xquery
- materialize
- updateable
-
DOMException
public XTCxqueryResult executeXQuery(String xquery, boolean materialize, boolean updateable) throws DOMException
xquery
- materialize
- updateable
-
DOMException
public Document getDocument(String storedDocument) throws XTCexception
storedDocument
-
XTCexception
public void putDocument(File localFile, String destDocument, boolean storeElementless) throws XTCexception
XTCexception
public String listIndexes(String storedDocumentPath) throws XTCexception
storedDocumentPath
-
XTCexception
public String createIndexes(String storedDocumentPath, File indexDefinitionFile) throws XTCexception
storedDocumentPath
- indexDefinitionFile
-
XTCexception
public void putServerDocument(String serverFileName, String destDocument, boolean storeElementless) throws XTCexception
XTCexception
public void putCollection(File localDirectory, String destDirectory, boolean storeElementless) throws XTCexception
localDirectory
- destDirectory
- storeElementless
-
XTCexception
public void putServerCollection(File localDirectory, String destDirectory, boolean storeElementless) throws XTCexception
localDirectory
- destDirectory
- storeElementless
-
XTCexception
public void putBlob(File localFile, String destBlob) throws XTCexception
localFile
- destBlob
-
XTCexception
public void getDocument(String storedDocument, String destFilename) throws XTCexception
storedDocument
- destFilename
-
XTCexception
private void testHook(String storedDocument) throws XTCexception
XTCexception
private void getDocumentViaGetSaxNodes(String storedDocument, String destFilename) throws XTCexception
XTCexception
private void printNodeList(ArrayList<XTCnode> list)
private StringBuffer getIndention(int size)
public void getBlob(String storedBlob, String destFilename) throws XTCexception
storedBlob
- destFilename
-
XTCexception
public void rename(String oldName, String newName) throws XTCexception
oldName
- newName
-
XTCexception
public void delete(String name) throws XTCexception
name
-
XTCexception
public void createDirectory(String directory) throws XTCexception
directory
-
XTCexception
public void removeDirectory(String directory) throws XTCexception
directory
-
XTCexception
public void renameDirectory(String oldDirectory, String newDirectory) throws XTCexception
oldDirectory
- newDirectory
-
XTCexception
public void changeDirectory(String newDirectory) throws XTCexception
newDirectory
-
XTCexception
public String getCurrentDirectory()
public String listDirectory() throws XTCexception
XTCexception
public void close()
private String storeTempFile(File localFile) throws XTCexception
XTCexception
public String executeQuery(String query) throws XTCexception
query
-
XTCexception
public void saxParse(Document document, ContentHandler contentHandler) throws XTCexception
document
- contentHandler
-
XTCexception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |