edu.uky.rch.ept.data
Class DataSourceDriver

java.lang.Object
  extended byedu.uky.rch.ept.data.DataSourceDriver
All Implemented Interfaces:
ICollectionAccessMethods, IConcurrentXMLAccessMethods, IDataAccessMethods, IDataSourceDriver, IDTDAccessMethods, IGenericResourceAccessMethods, IImageAccessMethods, ITextAccessMethods, IXMLAccessMethods
Direct Known Subclasses:
FileSystemXPathEngine

public abstract class DataSourceDriver
extends Object
implements IDataSourceDriver

Abstract base implementation for ARCHway datasource drivers.

This class should be subclassed by clients wishing to define new datasource drivers. The name of the subclass should be given as the "class" attribute in a data source driver extension contributed to the workbench's datasource driver extension point (named "edu.uky.rch.ept.data.dataSourceDriverExtensions"). For example, the plug-in's XML markup might contain:

 <extension point="edu.uky.rch.ept.data.dataSourceDriverExtensions">
 	<dataSourceDriver id="edu.uky.rch.ept.data.filesystem"
             name="ARCHway Data Source for accessing File Systems"
             class="edu.uky.rch.ept.data.filesystem.FileSystemDriver"
             protocol="file">
     	</dataSourceDriver>
 </extension>
 

where edu.uky.rch.ept.data.filesystem.FileSystemDriver is the name of the DataSourceDriver subclass.

Subclasses must implement all the methods that are inherited from the IDataAccessMethods Interface.

Subclasses may extend or reimplement the following methods as required:

Author:
Sandeep Bodapati

Field Summary
 
Fields inherited from interface edu.uky.rch.ept.data.IDataAccessMethods
EOF, RT_DOCUMENT, RT_NODELIST, RT_STRINGS
 
Constructor Summary
DataSourceDriver()
          Instantiates the driver.
 
Method Summary
 String getName()
          Returns the descriptive name of the driver
 String getProtocolIdentifier()
          Returns the protocol identifier string that this driver is associated with.
 String getWizardPageClass()
          Returns the name of the class which implements the wizard page for this driver.
 void setName(String name)
          Sets the name of the datasource driver
 void setProtocolIdentifier(String protocolIdentifier)
          Sets the protocol identifier string for this driver.
 void setWizardPageClass(String wizardPageClass)
          Sets the wizard page associated with this driver.
protected  String stripProtocolFromAddress(String address)
           
 String toString()
          Returns a description of the datasource driver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.uky.rch.ept.data.IDataSourceDriver
getAddressSelector
 
Methods inherited from interface edu.uky.rch.ept.data.ITextAccessMethods
getText, insertText, replaceText, storeText
 
Methods inherited from interface edu.uky.rch.ept.data.IDTDAccessMethods
getDTD, storeDTD
 
Methods inherited from interface edu.uky.rch.ept.data.IImageAccessMethods
getImage, storeImage
 
Methods inherited from interface edu.uky.rch.ept.data.ICollectionAccessMethods
createCollection, deleteCollection, getCollectionContents, isCollection, scanCollection
 
Methods inherited from interface edu.uky.rch.ept.data.IXMLAccessMethods
deleteXML, getXML, getXMLDocument, insertXML, queryXML, replaceXML, replaceXMLContent, storeXML, storeXML
 
Methods inherited from interface edu.uky.rch.ept.data.IConcurrentXMLAccessMethods
deleteCXML, getCXML, insertCXML, queryCXML, replaceCXML, replaceCXMLContent, storeCXML
 
Methods inherited from interface edu.uky.rch.ept.data.IGenericResourceAccessMethods
canRead, canWrite, deleteResource, getInputStream, getOutputStream, getOutputStream, renameResource, storeResource
 

Constructor Detail

DataSourceDriver

public DataSourceDriver()
Instantiates the driver.

Method Detail

setProtocolIdentifier

public void setProtocolIdentifier(String protocolIdentifier)
Description copied from interface: IDataSourceDriver
Sets the protocol identifier string for this driver.

Specified by:
setProtocolIdentifier in interface IDataSourceDriver
Parameters:
protocolIdentifier - a string which identifies the protocol implemented by this driver. eg: http, db, etc.

getProtocolIdentifier

public String getProtocolIdentifier()
Description copied from interface: IDataSourceDriver
Returns the protocol identifier string that this driver is associated with.

Specified by:
getProtocolIdentifier in interface IDataSourceDriver
Returns:
the protocol identifier string

stripProtocolFromAddress

protected String stripProtocolFromAddress(String address)
                                   throws MalformedAddressException,
                                          UnknownProtocolException
Throws:
MalformedAddressException
UnknownProtocolException

setName

public void setName(String name)
Description copied from interface: IDataSourceDriver
Sets the name of the datasource driver

Specified by:
setName in interface IDataSourceDriver
Parameters:
name - descriptive name for the driver

getName

public String getName()
Description copied from interface: IDataSourceDriver
Returns the descriptive name of the driver

Specified by:
getName in interface IDataSourceDriver
Returns:
name of the driver

toString

public String toString()
Description copied from interface: IDataSourceDriver
Returns a description of the datasource driver

Specified by:
toString in interface IDataSourceDriver

getWizardPageClass

public String getWizardPageClass()
Description copied from interface: IDataSourceDriver
Returns the name of the class which implements the wizard page for this driver.

Specified by:
getWizardPageClass in interface IDataSourceDriver
Returns:
name of a subclass of NewRepositoryWizardPage or null if none is associated

setWizardPageClass

public void setWizardPageClass(String wizardPageClass)
Description copied from interface: IDataSourceDriver
Sets the wizard page associated with this driver.

Specified by:
setWizardPageClass in interface IDataSourceDriver
Parameters:
wizardPageClass - name of a class which extends NewRepositoryWizardPage