|
|||||||||||
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 instanceMethod Detail |
public boolean isModified()
public Vobject getObject(VorbaId id)
IClientDocument
getObject
in interface IClientDocument
id
-
public Vobject[] getObjects(VorbaId[] ids)
IClientDocument
getObjects
in interface IClientDocument
ids
-
protected void updateDocumentRoots()
public VAMSAS[] getVamsasRoots()
IClientDocument
getVamsasRoots
in interface IClientDocument
public void setVamsasRoots(VAMSAS[] newroots)
setVamsasRoots
in interface IClientDocument
newroots
- org.vamsas.IClientDocument.setVamsasRoots
public void addVamsasRoot(VAMSAS newroot)
IClientDocument
addVamsasRoot
in interface IClientDocument
newroot
- public VorbaId[] registerObjects(Vobject[] unregistered)
IClientDocument
registerObjects
in interface IClientDocument
unregistered
- array of unregistered objects.
public VorbaId registerObject(Vobject unregistered)
IClientDocument
registerObject
in interface IClientDocument
unregistered
- unregistered vamsas Vobject
public IClientAppdata getClientAppdata()
IClientDocument
getClientAppdata
in interface IClientDocument
protected VamsasDocument getVamsasDocument()
protected VamsasArchiveReader getVamsasArchiveReader()
protected boolean updateSessionDocument() throws java.io.IOException
java.io.IOException
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
public 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 |