uk.ac.bbk.dcs.automed.xml.wrappers
Class SAXWrapper
java.lang.Object
uk.ac.ic.doc.automed.wrappers.AutoMedWrapper
uk.ac.bbk.dcs.automed.xml.wrappers.XMLWrapper
uk.ac.bbk.dcs.automed.xml.wrappers.SAXWrapper
public class SAXWrapper
- extends XMLWrapper
A lower level wrapper that conforms to the XMLWrapper class. The SAXWrapper class uses SAX and DOM.
The SAXWrapper creates a copy of the XML data source locally in order to query it.
The SAXWrapper holds the schema in memory using DOM.
- Author:
- Lucas Zamboulis
| Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
am, awf, debug, driver, emptyKeyProtection, emptyKeys, optionKeyProtection, optionKeys, password, s, url, username |
|
Method Summary |
protected ASG |
elementAttributeQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
|
protected ASG |
elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
|
protected ASG |
elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2,
int order)
Nodes are compared based on elementName:count, not their whole UID |
protected ASG |
elementPCDataQuery(java.lang.String searchNode)
|
protected ASG |
elementPCDataQuery(java.lang.String searchNode,
int order)
|
protected ASG |
elementQuery(java.lang.String searchNode)
|
protected AutoMedWrapperFactory |
getDefaultWrapperFactory()
Returns a new instance of the default wrapper factory for this wrapper |
java.lang.String |
getProtocolName()
The name of the Protocolin the repository used to represent JDBC connections. |
static AutoMedWrapper |
newAutoMedWrapper(java.lang.String username,
java.lang.String password,
java.lang.String driver,
java.lang.String url,
java.lang.String schemaName,
AutoMedWrapperFactory awf)
|
protected ASG |
textQuery()
|
| Methods inherited from class uk.ac.bbk.dcs.automed.xml.wrappers.XMLWrapper |
connect, executeIQL, executeLocalQuery, executeXMLQuery, getSchemaDoc, getSchemaName, getSchemaUIDDoc, getURI, getXMLDSS, UIDGetAttNameFromAttUID, UIDGetElementName, UIDGetElementName, UIDGetElementNameFromAttUID, UIDGetSchemaUIDFromInstanceUID, UIDGetSchemaUIDFromInstanceUID |
| Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
atDebugLevel, cacheWrapper, deleteIQL, getAccessMethod, getAutoMedWrapper, getAutoMedWrapper, getAutoMedWrapperFactory, getDrivers, getOption, getOptionKeyProtection, getOptionKeys, getProtocol, getQueryParser, getSchema, getSchema, insertIQL, newAutoMedSchema, newAutoMedWrapper, newAutoMedWrapper, registerWrapper, selectNewAutoMedWrapper, selectNewAutoMedWrapper, setDebugLevel, setOption |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAXWrapper
public SAXWrapper(AccessMethod am,
java.lang.String password)
throws NotFoundException,
DataSourceException,
java.io.IOException,
org.xml.sax.SAXException
- Throws:
NotFoundException
DataSourceException
java.io.IOException
org.xml.sax.SAXException
newAutoMedWrapper
public static AutoMedWrapper newAutoMedWrapper(java.lang.String username,
java.lang.String password,
java.lang.String driver,
java.lang.String url,
java.lang.String schemaName,
AutoMedWrapperFactory awf)
throws IntegrityException,
DataSourceException
- Throws:
IntegrityException
DataSourceException
textQuery
protected final ASG textQuery()
- Specified by:
textQuery in class XMLWrapper
- Returns:
- all PCData and CData nodes
elementQuery
protected final ASG elementQuery(java.lang.String searchNode)
- Specified by:
elementQuery in class XMLWrapper
- Parameters:
searchNode - the tag of the element (not its UID)
- Returns:
- ASG with the result elements
elementAttributeQuery
protected final ASG elementAttributeQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
- Specified by:
elementAttributeQuery in class XMLWrapper
elementElementQuery
protected final ASG elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2,
int order)
- Nodes are compared based on elementName:count, not their whole UID
- Specified by:
elementElementQuery in class XMLWrapper
- Parameters:
searchNode1 - parent elementsearchNode2 - child elementorder - the order of the child element in its parent's nodelist, including PCData nodes. If -1 then order is unimportant
- Returns:
elementPCDataQuery
protected final ASG elementPCDataQuery(java.lang.String searchNode,
int order)
- Specified by:
elementPCDataQuery in class XMLWrapper
elementElementQuery
protected final ASG elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
- Specified by:
elementElementQuery in class XMLWrapper
elementPCDataQuery
protected final ASG elementPCDataQuery(java.lang.String searchNode)
- Specified by:
elementPCDataQuery in class XMLWrapper
getProtocolName
public java.lang.String getProtocolName()
- The name of the
Protocolin the repository used to represent JDBC connections.
- Specified by:
getProtocolName in class AutoMedWrapper
getDefaultWrapperFactory
protected final AutoMedWrapperFactory getDefaultWrapperFactory()
- Returns a new instance of the default wrapper factory for this wrapper
- Specified by:
getDefaultWrapperFactory in class AutoMedWrapper