uk.ac.bbk.dcs.automed.xml.wrappers
Class NXDBWrapper

java.lang.Object
  extended by uk.ac.ic.doc.automed.wrappers.AutoMedWrapper
      extended by uk.ac.bbk.dcs.automed.xml.wrappers.XMLWrapper
          extended by uk.ac.bbk.dcs.automed.xml.wrappers.NXDBWrapper
All Implemented Interfaces:
CacheUser
Direct Known Subclasses:
EXISTWrapper

public abstract class NXDBWrapper
extends XMLWrapper

Class Task Description

Author:
Lucas Zamboulis

Field Summary
(package private)  org.xmldb.api.base.Collection col
           
private  boolean deepQuery
          If deepQuery is true, then a query on a collection c will be applied to all subcollections of c too Default is true, since this is how the W3C XQuery spec interprets the collection() function
 
Fields inherited from class uk.ac.bbk.dcs.automed.xml.wrappers.XMLWrapper
logger, protocol, resultList, schemaDoc, schemaUIDDoc, sid, sName
 
Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper
am, awf, debug, driver, emptyKeyProtection, emptyKeys, optionKeyProtection, optionKeys, password, s, url, username
 
Constructor Summary
NXDBWrapper()
           
 
Method Summary
protected  ASG compositeQuery(ASG query)
           
protected  ASG elementAttributeQuery(java.lang.String searchNode1, java.lang.String searchNode2)
           
protected  ASG elementElementQuery(java.lang.String searchNode1, java.lang.String searchNode2, int order)
           
protected  ASG elementPCDataQuery(java.lang.String searchNode1, int order)
           
protected  ASG elementQuery(java.lang.String searchNode)
           
(package private) abstract  ASG executeCollectionQuery(java.lang.String query)
           
(package private) abstract  ASG executeEdgeQuery(java.lang.String query, boolean text)
           
(package private) abstract  ASG executeElementQuery(java.lang.String query)
           
(package private) abstract  ASG executeTextQuery(java.lang.String query)
           
 boolean getDeepQuery()
           
 QueryParser getQueryParser(ASG query)
          Return a parser that will accept queries for the wrapper.
(package private) abstract  void insertDocument(org.xmldb.api.base.Collection c, org.w3c.dom.Document d, java.lang.String name)
           
(package private) abstract  void removeDocument(org.xmldb.api.base.Collection c, org.w3c.dom.Document d, java.lang.String name)
           
private  void replace(Cell c)
           
 void setDeepQuery(boolean value)
           
protected  ASG textQuery()
           
 
Methods inherited from class uk.ac.bbk.dcs.automed.xml.wrappers.XMLWrapper
connect, constructElementAttributeQueryResult, constructElementPCDataQueryResult, constructElementQueryResult, constructTextQueryResult, elementElementQuery, elementPCDataQuery, executeIQL, executeIQL, executeLocalQuery, executeXMLQuery, getSchemaDoc, getSchemaName, getSchemaUIDDoc, getURI, getXMLDSS, initialiseWrapper, newAutoMedWrapper, selectNewAutoMedWrapper, setSchemaDoc, setSchemaUIDDoc, setSID, xpathForAttributeQuery, xpathForElementQuery, xpathForElementRelQuery, xpathForTextQuery
 
Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper
atDebugLevel, cacheWrapper, costIQL, deleteIQL, executeIQLIncrementally, executeSourceIQL, getAccessMethod, getAutoMedPeerInstance, getAutoMedWrapper, getAutoMedWrapper, getAutoMedWrapperFactory, getDefaultWrapperFactory, getDrivers, getMetadata, getOption, getOptionKeyProtection, getOptionKeys, getProtocol, getProtocolName, getRange, getSchema, getSchema, getURL, getUserName, insertIQL, newAutoMedSchema, newAutoMedWrapper, newAutoMedWrapper, newAutoMedWrapperInstance, registerWrapper, selectNewAutoMedWrapper, setDebugLevel, setOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

col

org.xmldb.api.base.Collection col

deepQuery

private boolean deepQuery
If deepQuery is true, then a query on a collection c will be applied to all subcollections of c too Default is true, since this is how the W3C XQuery spec interprets the collection() function

Constructor Detail

NXDBWrapper

NXDBWrapper()
Method Detail

getQueryParser

public QueryParser getQueryParser(ASG query)
Description copied from class: AutoMedWrapper
Return a parser that will accept queries for the wrapper. The default parser is Schemes, which accepts only single schemes, with no other IQL operators supported. The SimpleComp parser will allow simple list comprehensions to be passed to the wrapper.

Overrides:
getQueryParser in class AutoMedWrapper

textQuery

protected ASG textQuery()
                 throws TranslationException
Specified by:
textQuery in class XMLWrapper
Returns:
all PCData and CData nodes
Throws:
TranslationException

elementQuery

protected ASG elementQuery(java.lang.String searchNode)
                    throws TranslationException
Specified by:
elementQuery in class XMLWrapper
Throws:
TranslationException

elementPCDataQuery

protected ASG elementPCDataQuery(java.lang.String searchNode1,
                                 int order)
                          throws TranslationException
Specified by:
elementPCDataQuery in class XMLWrapper
Throws:
TranslationException

elementAttributeQuery

protected ASG elementAttributeQuery(java.lang.String searchNode1,
                                    java.lang.String searchNode2)
                             throws TranslationException
Specified by:
elementAttributeQuery in class XMLWrapper
Throws:
TranslationException

elementElementQuery

protected ASG elementElementQuery(java.lang.String searchNode1,
                                  java.lang.String searchNode2,
                                  int order)
                           throws TranslationException
Specified by:
elementElementQuery in class XMLWrapper
Throws:
TranslationException

replace

private void replace(Cell c)

compositeQuery

protected ASG compositeQuery(ASG query)
                      throws TranslationException
Specified by:
compositeQuery in class XMLWrapper
Throws:
TranslationException

executeElementQuery

abstract ASG executeElementQuery(java.lang.String query)
                          throws TranslationException
Throws:
TranslationException

executeTextQuery

abstract ASG executeTextQuery(java.lang.String query)
                       throws TranslationException
Throws:
TranslationException

executeEdgeQuery

abstract ASG executeEdgeQuery(java.lang.String query,
                              boolean text)
                       throws TranslationException
Throws:
TranslationException

executeCollectionQuery

abstract ASG executeCollectionQuery(java.lang.String query)
                             throws TranslationException
Throws:
TranslationException

insertDocument

abstract void insertDocument(org.xmldb.api.base.Collection c,
                             org.w3c.dom.Document d,
                             java.lang.String name)
                      throws XMLException
Throws:
XMLException

removeDocument

abstract void removeDocument(org.xmldb.api.base.Collection c,
                             org.w3c.dom.Document d,
                             java.lang.String name)
                      throws XMLException
Throws:
XMLException

getDeepQuery

public boolean getDeepQuery()

setDeepQuery

public void setDeepQuery(boolean value)