|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.wrappers.AutoMedWrapper
uk.ac.bbk.dcs.automed.xml.wrappers.XMLWrapper
public abstract class XMLWrapper
XMLWrapper class is a wrapper class for the AutoMed Repository. It acts as a mediator between IQL and XML files in the AutoMed Repository. It queries the XML files by transforming the IQL queries it is given into XPath searches, then transforms the results back into IQL. Allowed queries:
NODE QUERIES: Elements: <<elementUID>>, returns a list of element instance UIDs that correspond to the input element schema UID.
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
logger
|
protected java.util.ArrayList |
resultList
|
protected org.w3c.dom.Document |
schemaDoc
|
protected org.w3c.dom.Document |
schemaUIDDoc
|
| 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 | |
|---|---|
static org.w3c.dom.Document |
assignCIDs(org.w3c.dom.Document schemaUIDDoc)
Assigns UIDs to the schema document supplied. |
protected abstract ASG |
compositeQuery(ASG query)
|
protected void |
connect()
Use the connection details held with this wrapper to connect to the data source. |
protected abstract ASG |
elementAttributeQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
|
protected ASG |
elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
|
protected abstract ASG |
elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2,
int order)
|
protected ASG |
elementPCDataQuery(java.lang.String searchNode)
|
protected abstract ASG |
elementPCDataQuery(java.lang.String searchNode1,
int order)
|
protected abstract ASG |
elementQuery(java.lang.String searchNode)
|
ASG |
executeIQL(ASG q)
Execute an IQL query on the datasource. |
AutoMedResult |
executeLocalQuery(AutoMedQuery amq)
Execute a query in the datasource's native query language, and obtain a result in an AutoMedResult class |
ASG |
executeXMLQuery(ASG ASGquery)
Given an IQL query, this method queries the XML file, then returns the answer in ASG format. |
org.w3c.dom.Document |
getSchemaDoc()
|
java.lang.String |
getSchemaName()
|
org.w3c.dom.Document |
getSchemaUIDDoc()
|
void |
getSODefinition(QuerySubGoal qsg)
An abstract method used by #getSOQuality(String schemeDef). |
java.lang.String |
getURI()
|
Schema |
getXMLDSS()
|
protected void |
initialiseWrapper(AccessMethod am,
java.lang.String password)
|
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)
|
static AutoMedWrapper |
selectNewAutoMedWrapper(java.lang.String username,
java.lang.String password,
Protocol protocol,
java.lang.String driver,
java.lang.String url,
java.lang.String schemaName,
AutoMedWrapperFactory awf)
|
protected abstract ASG |
textQuery()
|
java.lang.String |
xpathForAttributeQuery(org.w3c.dom.Document d,
java.lang.String elemCID,
java.lang.String attribute)
|
java.lang.String |
xpathForElementQuery(org.w3c.dom.Document schemaUIDDoc,
java.lang.String elemCID)
|
java.lang.String |
xpathForTextQuery(org.w3c.dom.Document schemaUIDDoc,
java.lang.String elemCID)
|
| Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
|---|
atDebugLevel, cacheWrapper, deleteIQL, executeIQL, getAccessMethod, getAutoMedWrapper, getAutoMedWrapper, getAutoMedWrapperFactory, getDefaultWrapperFactory, getDrivers, getOption, getOptionKeyProtection, getOptionKeys, getProtocol, getProtocolName, getQueryCache, getQueryCache, getQueryParser, getSchema, getSchema, getSODefinition, insertIQL, newAutoMedSchema, newAutoMedWrapper, newAutoMedWrapper, registerWrapper, selectNewAutoMedWrapper, setDebugLevel, setOption, updateCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
protected org.w3c.dom.Document schemaDoc
protected org.w3c.dom.Document schemaUIDDoc
protected java.util.ArrayList resultList
| Method Detail |
|---|
protected void initialiseWrapper(AccessMethod am,
java.lang.String password)
throws DataSourceException,
IntegrityException
DataSourceException
IntegrityException
public static AutoMedWrapper selectNewAutoMedWrapper(java.lang.String username,
java.lang.String password,
Protocol protocol,
java.lang.String driver,
java.lang.String url,
java.lang.String schemaName,
AutoMedWrapperFactory awf)
throws IntegrityException,
DataSourceException
IntegrityException
DataSourceException
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
IntegrityException
DataSourceException
protected void connect()
throws DataSourceException
AutoMedWrapper
connect in class AutoMedWrapperDataSourceException - if unable to connect to the data sourcepublic final Schema getXMLDSS()
public final org.w3c.dom.Document getSchemaDoc()
throws XMLNotFoundException
XMLNotFoundException
public final org.w3c.dom.Document getSchemaUIDDoc()
throws XMLNotFoundException
XMLNotFoundException
public final java.lang.String getSchemaName()
throws XMLNotFoundException
XMLNotFoundException
public final java.lang.String getURI()
throws XMLNotFoundException
XMLNotFoundException
public final ASG executeIQL(ASG q)
throws DataSourceException,
NotFoundException
AutoMedWrapper
executeIQL in class AutoMedWrapperq - An IQL query held in an ASG which complies with
the limitations of what this wrapper is able to process
ASG containing the results of the query
DataSourceException
NotFoundExceptionpublic final AutoMedResult executeLocalQuery(AutoMedQuery amq)
AutoMedWrapper
executeLocalQuery in class AutoMedWrapper
public final ASG executeXMLQuery(ASG ASGquery)
throws TranslationException,
NotFoundException
ASGquery - the IQL query in ASG format
TranslationException
NotFoundException
QProcException
public java.lang.String xpathForElementQuery(org.w3c.dom.Document schemaUIDDoc,
java.lang.String elemCID)
throws NotFoundException
NotFoundException
public java.lang.String xpathForAttributeQuery(org.w3c.dom.Document d,
java.lang.String elemCID,
java.lang.String attribute)
throws TranslationException
TranslationException
public java.lang.String xpathForTextQuery(org.w3c.dom.Document schemaUIDDoc,
java.lang.String elemCID)
throws TranslationException
TranslationException
protected abstract ASG textQuery()
throws TranslationException,
NotFoundException
XMLException
TranslationException
NotFoundException
protected abstract ASG elementQuery(java.lang.String searchNode)
throws TranslationException,
NotFoundException
TranslationException
NotFoundException
protected final ASG elementPCDataQuery(java.lang.String searchNode)
throws TranslationException,
NotFoundException
TranslationException
NotFoundException
protected abstract ASG elementPCDataQuery(java.lang.String searchNode1,
int order)
throws TranslationException,
NotFoundException
TranslationException
NotFoundException
protected abstract ASG elementAttributeQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
throws TranslationException,
NotFoundException
TranslationException
NotFoundException
protected final ASG elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2)
throws TranslationException,
NotFoundException
TranslationException
NotFoundException
protected abstract ASG elementElementQuery(java.lang.String searchNode1,
java.lang.String searchNode2,
int order)
throws TranslationException,
NotFoundException
TranslationException
NotFoundException
protected abstract ASG compositeQuery(ASG query)
throws TranslationException,
NotFoundException
TranslationException
NotFoundExceptionpublic static org.w3c.dom.Document assignCIDs(org.w3c.dom.Document schemaUIDDoc)
schemaDoc - the DOM XMLDSS schema without CIDs
public void getSODefinition(QuerySubGoal qsg)
throws DataSourceException
AutoMedWrapper#getSOQuality(String schemeDef). This method
must be implemented by all sub-classes
getSODefinition in class AutoMedWrapperDataSourceException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||