From 35705585bd17903407fdcbd561b9bc5ae5bcd0b0 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 14 Mar 2006 17:59:32 +0000 Subject: [PATCH] reprioritising TODOs and LATERs and fixing documentation typos. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@176 be28352e-c001-0410-b1a7-c7978e42abec --- src/org/vamsas/client/ClientDocument.java | 4 ++-- src/org/vamsas/client/Events.java | 6 +++--- src/org/vamsas/client/IClient.java | 16 ++++++++-------- src/org/vamsas/client/simpleclient/ClientDocument.java | 2 +- .../client/simpleclient/EventGeneratorThread.java | 3 ++- src/org/vamsas/client/simpleclient/SimpleClient.java | 5 +++-- src/org/vamsas/client/simpleclient/VamsasSession.java | 2 +- 7 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/org/vamsas/client/ClientDocument.java b/src/org/vamsas/client/ClientDocument.java index 177539d..0dbdcfd 100644 --- a/src/org/vamsas/client/ClientDocument.java +++ b/src/org/vamsas/client/ClientDocument.java @@ -36,8 +36,8 @@ public abstract class ClientDocument implements IClientDocument { unregistered.__vorba = vorbafactory; else if (unregistered.__vorba!=vorbafactory) { - // TODO: LATER: decide if this is allowed - it isn't for the moment. - log.error("Attempt to overwrite info in a registered vorba object! - Implementation fix needed."); + // LATER: decide if this is allowed - it isn't for the moment. + log.error("Attempt to overwrite info in a registered vorba object (under a different IVorgaIdFactory) ! - Implementation fix needed."); return null; } else { // probably didn't need to call registerObject. diff --git a/src/org/vamsas/client/Events.java b/src/org/vamsas/client/Events.java index babd39c..8f6b69d 100644 --- a/src/org/vamsas/client/Events.java +++ b/src/org/vamsas/client/Events.java @@ -16,8 +16,8 @@ public class Events { /** * Generated when a new vamsas document is created (perhaps from some existing * Vamsas data) so an application may do its own data space initialization. - * TODO: decide if this is called when an app is connected to a stored - * session... + * Raised for a new application connecting to a vamsas document + * which contains no existing data for that application. */ public static final String DOCUMENT_CREATE = "org.vamsas.client.events.documentCreateEvent"; @@ -54,7 +54,7 @@ public class Events { * Generated by Vorba stub for the sole remaining client, after the penultimate * client makes a call to finalizeClient(). It is only raised if the session has been modifies since the * last call to storeDocument() by any application. - * TODO: LATER: copies of a document should be on a per-user basis for multi-user sessions. + * LATER: copies of a document should be on a per-user basis for multi-user sessions. * Sequence is as follows : 1. All other vamsas clients have * called finalizeClient() 2. Final living client monitors closures, and * realises that it is last. 3. Final client generates event to prompt diff --git a/src/org/vamsas/client/IClient.java b/src/org/vamsas/client/IClient.java index a8d122e..51367c9 100644 --- a/src/org/vamsas/client/IClient.java +++ b/src/org/vamsas/client/IClient.java @@ -13,8 +13,8 @@ import java.io.IOException; * created by an IClientFactory instance for a particular session, * user, and application handle. * (it's VORBA, not CORBA!) - * TODO: add exceptions for timeouts raised when there are problems accessing session data (because another application is hogging it). - * TODO: LATER: think about situations when two applications both want a ClientDocument at the same time - can one have read-only access (and be told that another is about to update) + * LATER: add exceptions for timeouts raised when there are problems accessing session data (because another application is hogging it). + * LATER: think about situations when two applications both want a ClientDocument at the same time - can one have read-only access (and be told that another is about to update) */ public interface IClient { @@ -22,9 +22,9 @@ public interface IClient { /** * Self-documenting/describing info for the application to present * to the user. - * TODO: formalise this for describing VAMSAS system, a particular + * LATER: formalise this for describing VAMSAS system, a particular * Vorba client agent, and a particular session. - * @returns string like VamsasClient v.1.1.1 (GPL) and whatever + * @return string like VamsasClient v.1.1.1 (GPL) and whatever */ public String getAbout(); @@ -61,7 +61,7 @@ public interface IClient { * 'RequestToCloseDocument' events from the Vorba * agent in the latter case and so prompt the user * to save the session locally. - * TODO: pick a better name ? + * LATER: pick a better name ? */ public void finalizeClient(); /** @@ -97,7 +97,7 @@ public interface IClient { * Any application may call importDocument to merge a stored * vamsasDocument into the current session. * Note: use a IClientFactory's implementation to make sessions out of vamsas documnts - * TODO: LATER: VAMSAS: The IClient implementation will handle all ID 'relocations' + * LATER: VAMSAS: The IClient implementation will handle all ID 'relocations' * @param location */ public void importDocument(java.io.File location); @@ -107,7 +107,7 @@ public interface IClient { * values for EventChain. * The EventChain value is passed as the * propertyName in the java.bean.PropertyChangeEvent - * TODO: extend class to form own vamsas Event/Listener model. + * LATER: extend class to form own vamsas Event/Listener model. * @param EventChain Name of event. Blank/null registers handler for all events. * @param evt - event handler function. */ @@ -125,7 +125,7 @@ public interface IClient { * Exceptions are raised for any failures. Any stateful calls to the session prior to * this will result in an implicit call to joinSession - if that results in an exception * then the VamsasClient should raise an Error. - * TODO: create VAMSAS exception hierarchy (in a language agnostic manner) + * LATER: create VAMSAS exception hierarchy (in a language agnostic manner) */ public void joinSession() throws Exception; } diff --git a/src/org/vamsas/client/simpleclient/ClientDocument.java b/src/org/vamsas/client/simpleclient/ClientDocument.java index 7394188..a6bb78c 100644 --- a/src/org/vamsas/client/simpleclient/ClientDocument.java +++ b/src/org/vamsas/client/simpleclient/ClientDocument.java @@ -127,7 +127,7 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements // easy - just check if anything has changed and do provenance object oldversion = getObject(newroots[i].getVorbaId()); if (oldversion instanceof VAMSAS) { - // TODO: appropriate merging behaviour when two clients have + // LATER: appropriate merging behaviour when two clients have // modified the same registered object independently if (newroots[i].get__last_hash() != newroots[i].hashCode()) { // client has modified this object since last retrieval. diff --git a/src/org/vamsas/client/simpleclient/EventGeneratorThread.java b/src/org/vamsas/client/simpleclient/EventGeneratorThread.java index a643ae1..2a1db1f 100644 --- a/src/org/vamsas/client/simpleclient/EventGeneratorThread.java +++ b/src/org/vamsas/client/simpleclient/EventGeneratorThread.java @@ -180,13 +180,14 @@ public class EventGeneratorThread extends Thread implements Runnable { * Call blocks whilst other apps do any appData finalizing * and then returns (after locking the vamsasDocument in the session) * @return Lock for session.vamArchive + * @param STORE_WAIT indicates how lock the call will block for when nothing appears to be happening to the session. */ protected Lock want_to_store() { log.debug("Waiting for other apps to do FinalizeApp handling."); try { session.addStoreDocumentRequest(client.getClientHandle(), client.getUserHandle()); } catch (Exception e) { - log.warn("Whilst writing StoreDocumentRequest for ("+client.getClientHandle().getClientUrn()+" "+client.getUserHandle(), + log.warn("Whilst writing StoreDocumentRequest for "+client.getClientHandle().getClientUrn()+" "+client.getUserHandle(), e); log.info("trying to continue."); } diff --git a/src/org/vamsas/client/simpleclient/SimpleClient.java b/src/org/vamsas/client/simpleclient/SimpleClient.java index 2f8103b..43779dd 100644 --- a/src/org/vamsas/client/simpleclient/SimpleClient.java +++ b/src/org/vamsas/client/simpleclient/SimpleClient.java @@ -92,7 +92,7 @@ public class SimpleClient implements IClient { /* * (non-Javadoc) - * TODO: LATER: check that build substitution variables are correct + * LATER: check that build substitution variables are correct * @see org.vamsas.client.IClient#getAbout() */ public String getAbout() { @@ -195,10 +195,11 @@ public class SimpleClient implements IClient { VamsasArchive va = null; try { + // TODO: bail out if it takes too long to get the lock ? va = _session.getVamsasDocument(); } catch (IOException e) { - throw new IOException("Failed to get kock on session document"); + throw new IOException("Failed to get lock on session document"); } VamsasDocument doc=null; IdFactory vorba = null; diff --git a/src/org/vamsas/client/simpleclient/VamsasSession.java b/src/org/vamsas/client/simpleclient/VamsasSession.java index 0750903..1424ee8 100644 --- a/src/org/vamsas/client/simpleclient/VamsasSession.java +++ b/src/org/vamsas/client/simpleclient/VamsasSession.java @@ -205,7 +205,7 @@ public class VamsasSession { log.debug("Transferring vamsas data from "+archive+" to session:"+vamArchive.sessionFile); SessionFile xtantdoc = new SessionFile(archive); vamArchive.updateFrom(null, xtantdoc); - // TODO: LATER: decide if session archive provenance should be updated to reflect access. + // LATER: decide if session archive provenance should be updated to reflect access. // TODO: soon! do a proper import objects from external file log.debug("Transfer complete."); } -- 1.7.10.2