|
|||||||||
| 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.ic.doc.automed.wrappers.XMLSchemaWrapper
public class XMLSchemaWrapper
| Field Summary | |
|---|---|
static java.lang.String |
driverString
|
| Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
|---|
am, awf, debug, driver, emptyKeyProtection, emptyKeys, optionKeyProtection, optionKeys, password, protocol, s, url, username |
| Constructor Summary | |
|---|---|
XMLSchemaWrapper()
Creates a new, empty instance of XMLSchemaWrapper |
|
XMLSchemaWrapper(AccessMethod am,
java.lang.String password)
This constructor is used when querying the schema |
|
| Method Summary | |
|---|---|
protected void |
connect()
Check that the XML file exists |
void |
createXSDOMRepresentation(java.lang.String uri)
Create an internal representation of the XML Schema. |
boolean |
deleteIQL(ASG asg)
|
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 |
executeXMLSchemaQuery(ASG ASGquery)
Given an IQL query, this method queries the XML file using DOM, then returns the answer in ASG format. |
AutoMedWrapperFactory |
getAutoMedWrapperFactory()
Return the AutoMedWrapperFactory currently associated with this wrapper. |
protected AutoMedWrapperFactory |
getDefaultWrapperFactory()
Return the default AutoMedWrapperFactory that is used to
generate Schema instances from information in a data sources |
Document |
getDoc()
Return the XSDOM document |
static java.lang.String |
getDriver()
The name of the driver string that identifies this wrapper |
java.lang.String |
getProtocolName()
The name of the Protocol that this wrapper uses |
java.lang.String |
getUri()
|
uk.ac.ic.doc.automed.wrappers.XMLInfo |
getXMLInfo()
Return the xmlInfo object for this schema instance |
boolean |
insertIQL(ASG aSG)
Execute an IQL insert on the datasource. |
boolean |
isXMLDoc()
Was the original document read in an XML document or just a Schema document |
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)
This should be called once per schema file, to configure the repository. |
| Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapper |
|---|
atDebugLevel, cacheWrapper, getAccessMethod, getAutoMedWrapper, getAutoMedWrapper, getDrivers, getOption, getOptionKeyProtection, getOptionKeys, getProtocol, getQueryParser, getSchema, getSchema, 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 |
| Field Detail |
|---|
public static final java.lang.String driverString
| Constructor Detail |
|---|
public XMLSchemaWrapper()
public XMLSchemaWrapper(AccessMethod am,
java.lang.String password)
throws DataSourceException
DataSourceException| Method Detail |
|---|
public java.lang.String getUri()
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
AccessMethod of
the XMLSchemaWrapper returned here.
schemaName - is the name of the Schema to create in the
repository to represent the data source.awf - is an XMLSchemaWrapperFactory instance configured to model
the source schema in the desired manner. This may be left null,
in which case an XMLSchemaWrapperFactory with default settings will be
created.
IntegrityException
DataSourceException
protected void connect()
throws DataSourceException
connect in class AutoMedWrapperDataSourceException - if unable to connect to the data source
public void createXSDOMRepresentation(java.lang.String uri)
throws java.lang.Exception
java.lang.Exceptionpublic boolean deleteIQL(ASG asg)
deleteIQL in class AutoMedWrapper
public ASG executeIQL(ASG q)
throws DataSourceException
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
DataSourceExceptionpublic AutoMedResult executeLocalQuery(AutoMedQuery amq)
AutoMedWrapper
executeLocalQuery in class AutoMedWrapperpublic ASG executeXMLSchemaQuery(ASG ASGquery)
ASGquery - the IQL query in ASG format
public boolean isXMLDoc()
public Document getDoc()
public uk.ac.ic.doc.automed.wrappers.XMLInfo getXMLInfo()
public static java.lang.String getDriver()
public AutoMedWrapperFactory getAutoMedWrapperFactory()
AutoMedWrapper
getAutoMedWrapperFactory in class AutoMedWrapperprotected AutoMedWrapperFactory getDefaultWrapperFactory()
AutoMedWrapperAutoMedWrapperFactory that is used to
generate Schema instances from information in a data sources
getDefaultWrapperFactory in class AutoMedWrapperpublic java.lang.String getProtocolName()
AutoMedWrapperProtocol that this wrapper uses
getProtocolName in class AutoMedWrapperpublic boolean insertIQL(ASG aSG)
AutoMedWrapper
insertIQL in class AutoMedWrapperaSG - is the ASG representation of an IQL
query of the form
sub [t1, ..., tn] s
where:The semantics and execution of the insert request will depend on the data source e.g. for a relational database it could be translated into a series of INSERT requests within a single transaction, which may fail or succeeed as a whole (and thus return False or True respectively from the insertIQL method). For a non-transactional repository like the HDM or XML flat files, we may choose to allow partial updates e.g. some of a set of tuples are inserted, while some already exist or violate some constraint or another.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||