|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectuk.ac.vamsas.client.ClientDocument
uk.ac.vamsas.client.simpleclient.ClientDocument
Maintains a collection of vamsas objects, appdatas and states, and provides api for a SimpleClient's client. TODO: test and migrate ArchiveClient.getAppData methods to here and retest in ExampleApplication
| Field Summary | |
protected VamsasArchive |
iohandler
|
protected SimpleClient |
sclient
|
| Fields inherited from class uk.ac.vamsas.client.ClientDocument |
vamsasObjects, vorbafactory |
| Constructor Summary | |
protected |
ClientDocument(VamsasDocument doc,
VamsasArchive docHandler,
IdFactory Factory,
SimpleClient sclient)
prepare Application-side dataset from the vamsas Document iohandler |
| Method Summary | |
void |
addVamsasRoot(VAMSAS newroot)
Adds a new VAMSAS root entry TODO: decide on same InvalidVamsasObject exceptions. |
protected void |
finalize()
|
IClientAppdata |
getClientAppdata()
Get instance of Client and User specific vamsas document data access interface. |
Vobject |
getObject(VorbaId id)
Get a single Vobject. |
Vobject[] |
getObjects(VorbaId[] ids)
Get a list of objects. |
java.util.Vector |
getUpdatedObjects()
|
protected VamsasArchiveReader |
getVamsasArchiveReader()
returns the read-only IO interface for the vamsas document Jar file |
protected VamsasDocument |
getVamsasDocument()
access the vamsas document |
VAMSAS[] |
getVamsasRoots()
Returns all root objects in document. |
boolean |
isInvalidModification()
if this is set the document will never be written back to the session unless the corruption is fixed. |
boolean |
isModified()
Public method for internal use by SimpleClient. |
VorbaId |
registerObject(Vobject unregistered)
Returns an Vobject with a valid VorbaId, and provenance element. |
VorbaId[] |
registerObjects(Vobject[] unregistered)
Returns an array of objects, each with a valid VorbaId (and completed provenance entry). |
void |
setInvalidModification(boolean invalidModification)
set if the client has corrupted the Vamsas Document structure somehow. |
void |
setVamsasRoots(VAMSAS[] newroots)
update the document with new roots. |
protected void |
updateDocumentRoots()
|
protected boolean |
updateSessionDocument()
called by vamsas api to write updated document to session |
| Methods inherited from class uk.ac.vamsas.client.ClientDocument |
_registerObject |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected SimpleClient sclient
protected VamsasArchive iohandler
| Constructor Detail |
protected ClientDocument(VamsasDocument doc,
VamsasArchive docHandler,
IdFactory Factory,
SimpleClient sclient)
doc - - the datasetdocHandler - - the sessionFile IO handlerFactory - - the source of current and new vorbaIdssclient - - the simpleclient instance| Method Detail |
public boolean isModified()
public Vobject getObject(VorbaId id)
IClientDocument
getObject in interface IClientDocumentid -
public Vobject[] getObjects(VorbaId[] ids)
IClientDocument
getObjects in interface IClientDocumentids -
protected void updateDocumentRoots()
public VAMSAS[] getVamsasRoots()
IClientDocument
getVamsasRoots in interface IClientDocumentpublic void setVamsasRoots(VAMSAS[] newroots)
setVamsasRoots in interface IClientDocumentnewroots - org.vamsas.IClientDocument.setVamsasRootspublic void addVamsasRoot(VAMSAS newroot)
IClientDocument
addVamsasRoot in interface IClientDocumentnewroot - public VorbaId[] registerObjects(Vobject[] unregistered)
IClientDocument
registerObjects in interface IClientDocumentunregistered - array of unregistered objects.
public VorbaId registerObject(Vobject unregistered)
IClientDocument
registerObject in interface IClientDocumentunregistered - unregistered vamsas Vobject
public IClientAppdata getClientAppdata()
IClientDocument
getClientAppdata in interface IClientDocumentprotected VamsasDocument getVamsasDocument()
protected VamsasArchiveReader getVamsasArchiveReader()
protected boolean updateSessionDocument()
throws java.io.IOException
java.io.IOException
protected void finalize()
throws java.lang.Throwable
java.lang.Throwablepublic java.util.Vector getUpdatedObjects()
public boolean isInvalidModification()
public void setInvalidModification(boolean invalidModification)
invalidModification - the invalidModification to set
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||