|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--uk.org.ogsadai.client.databrowser.DBModel
Model for the DBClient
application.
Acts as the model in the MVC pattern. It is accessed by controllers, and in turn updates views when its state changes.
In this case the model holds lists of registries and their associated factories, and updates registered observers when these lists change. It also handles the launching of queries, and notifies registered observers of the results of the queries.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.util.Vector |
mDataServices
|
Fields inherited from class java.util.Observable |
|
Constructor Summary | |
DBModel()
|
Method Summary | |
void |
addDataService(java.lang.String url,
DBProgressModel progressModel)
Adds a data service to the current list |
java.util.Vector |
getDataResourceIDs()
Gets the resource IDs for all available data resources. |
java.util.Vector |
getDataServices()
Gets the list of currently accessed data services. |
java.util.Vector |
getDataServiceURLs()
Gets the URLs for all the currently accessed data services. |
void |
removeDataService(DBDataService service)
Removes a data service from the currently accessible list and removes its associated resources. |
void |
retrieveSchema(DBProgressModel model,
DBDataResource service)
Retrieves the schema from the data resource and informs all observers. |
void |
runJoin(DBProgressModel pm,
DBJoinParameter parameters)
Runs a join. |
void |
updateObservers(java.lang.Object obj)
Updates any Views which have registered themselves as observers of the model |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private java.util.Vector mDataServices
Constructor Detail |
public DBModel()
Method Detail |
public void updateObservers(java.lang.Object obj)
obj
- The object passed on to the observerspublic void addDataService(java.lang.String url, DBProgressModel progressModel) throws java.lang.Exception
url
- The URL of the data service to be addedprogressModel
- Follows the progress
java.lang.Exception
public void removeDataService(DBDataService service)
service
- The data service to remove.public java.util.Vector getDataServices()
DBDataService
.public java.util.Vector getDataServiceURLs()
String
.public java.util.Vector getDataResourceIDs()
String
.public void runJoin(DBProgressModel pm, DBJoinParameter parameters) throws java.lang.Exception
pm
- The progress monitorparameters
- The join parameters
java.lang.Exception
public void retrieveSchema(DBProgressModel model, DBDataResource service) throws java.lang.Exception
model
- Progress model (unused)service
- The service and data resource from which to retrieve the
database schema.
java.lang.Exception
- if there was a problem
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |