refactored Client to simpleClient. Implemented many housekeeping functions.
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 22 Sep 2005 21:58:56 +0000 (21:58 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 22 Sep 2005 21:58:56 +0000 (21:58 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@49 be28352e-c001-0410-b1a7-c7978e42abec

.externalToolBuilders/Build VamsasClient [Builder].launch
Build VamsasClient.launch
Core Object Source VamsasClient.launch
src/org/vamsas/client/ClientDocument.java
src/org/vamsas/client/IClientDocument.java
src/org/vamsas/client/IVorbaIdFactory.java
src/org/vamsas/client/SimpleClient.java [moved from src/org/vamsas/client/Client.java with 90% similarity]
src/org/vamsas/client/SimpleClientFactory.java
src/org/vamsas/client/VorbaIdFactory.java

index 011b4ea..7b6e116 100644 (file)
@@ -1,17 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.ui.antsupport.InternalAntRunner"/>
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
 <listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
 </listAttribute>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="/homes/jimp/prj/eclipse/VamsasClient"/>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="/homes/jimp/prj/eclipse/VamsasClient"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="jdk"/>
 <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;4&quot; path=&quot;1&quot; containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk&quot;/&gt;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#10;&lt;memento default=&quot;true&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
@@ -24,8 +27,6 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;2&quot; path=&quot;3&quot; internalArchive=&quot;/VamsasClient/lib/xml-apis.jar&quot;/&gt;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;2&quot; path=&quot;3&quot; internalArchive=&quot;/VamsasClient/tools/commons-logging.jar&quot;/&gt;&#10;"/>
 </listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="jdk"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
 <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;working set&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/VamsasClient/src/org/vamsas/objects&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/VamsasClient/build.xml}"/>
 </launchConfiguration>
index e23a073..637e0d0 100644 (file)
@@ -1,16 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.ui.antsupport.InternalAntRunner"/>
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
 <listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
 </listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="/homes/jimp/prj/eclipse/VamsasClient"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}/."/>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc}"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_BUILD_SCOPE" value="${project}"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.launching.macosx.MacOSXType"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="JVM 1.4.2 (MacOS X Default)"/>
 <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;4&quot; path=&quot;1&quot; containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk&quot;/&gt;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#10;&lt;memento default=&quot;true&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
@@ -23,8 +27,6 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;2&quot; path=&quot;3&quot; internalArchive=&quot;/VamsasClient/lib/xml-apis.jar&quot;/&gt;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;2&quot; path=&quot;3&quot; internalArchive=&quot;/VamsasClient/tools/commons-logging.jar&quot;/&gt;&#10;"/>
 </listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="jdk"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;working set&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/VamsasClient/src/org/vamsas/objects&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;&#10;}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/VamsasClient/build.xml}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;working set&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/VamsasClient/src/org/vamsas/objects&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc}/build.xml"/>
 </launchConfiguration>
index 7958957..a3a94f1 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
 <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.ui.antsupport.InternalAntRunner"/>
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
 <listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
@@ -10,7 +10,9 @@
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="makecoresource,"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.launching.macosx.MacOSXType"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="JVM 1.4.2 (MacOS X Default)"/>
 <listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;4&quot; path=&quot;1&quot; containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk&quot;/&gt;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#10;&lt;memento default=&quot;true&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
@@ -23,8 +25,6 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;2&quot; path=&quot;3&quot; internalArchive=&quot;/VamsasClient/lib/xml-apis.jar&quot;/&gt;&#10;"/>
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry type=&quot;2&quot; path=&quot;3&quot; internalArchive=&quot;/VamsasClient/tools/commons-logging.jar&quot;/&gt;&#10;"/>
 </listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="jdk"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="VamsasClient"/>
 <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; name=&quot;working set&quot; editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/VamsasClient/src/org/vamsas/objects&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/VamsasClient/build.xml}"/>
 </launchConfiguration>
index d3a3886..66eaef0 100644 (file)
@@ -14,26 +14,38 @@ import org.vamsas.objects.core.VamsasDocument;
  */
 public class ClientDocument implements IClientDocument {
   protected IClient vorba;
-
-  protected VamsasDocument doc;
-
+  protected org.vamsas.objects.core.VAMSAS[] roots;
   protected byte[] appData;
 
   /**
    * collection of org.vamsas.client.object references
    */
   protected Hashtable vamsasObjects;
-
+  
   /*
    * (non-Javadoc)
    * 
    * @see org.vamsas.client.IClientDocument#getApplicationData()
    */
 
+  /**
+   * 
+   * @param data
+   * @param doc
+   * @param objects
+   * @param vorba
+   */
+  protected ClientDocument(byte[] data, VAMSAS[] roots, Hashtable objects, IClient vorba) {
+    // TODO Auto-generated constructor stub
+    appData = data;
+    this.roots =roots;
+    vamsasObjects = objects;
+    this.vorba = vorba;
+  }
+
   public byte[] getApplicationData() {
     // Look up client byte stash using client and user handle
-    
-    return null;
+    return appData;
   }
 
   /*
@@ -64,7 +76,6 @@ public class ClientDocument implements IClientDocument {
    */
   public object[] getVamsasRoots() {
     // extract root objects
-    VAMSAS[] roots = doc.getVAMSAS();
     if (roots == null)
       return new VAMSAS[] { new VAMSAS() };
     return roots;
@@ -75,7 +86,6 @@ public class ClientDocument implements IClientDocument {
    */
   public void setVamsasRoots(VAMSAS[] newroots) {
     // extract root objects
-    VAMSAS[] roots = doc.getVAMSAS();
     if (newroots != null) {
       // check newroots for objects that were present in the old document
       // check to see if the 'old' objects have been modified
@@ -100,7 +110,7 @@ public class ClientDocument implements IClientDocument {
             }
           } else {
             throw new Error(
-                "Client error when using setVamsasRoots : The vorbaId for object "
+                "SimpleClient error when using setVamsasRoots : The vorbaId for object "
                     + i
                     + " does not refer to an object of type VAMSAS in the current document!");
           }
@@ -129,11 +139,9 @@ public class ClientDocument implements IClientDocument {
    * @see org.vamsas.client.IClientDocument#registerObject(org.vamsas.client.object)
    */
 public VorbaId registerObject(object unregistered) {
-    VorbaId rtn;
     if (!unregistered.isRegistered())
-      unregistered.VorbaId.(rtn=unregistered.__vorba.makeVorbaId());
-    else
-      return unregistered.getVorbaId();
+      unregistered.setVorbaId(unregistered.__vorba.makeVorbaId());
+    return unregistered.getVorbaId();
   }
   /*
    * (non-Javadoc)
@@ -141,7 +149,12 @@ public VorbaId registerObject(object unregistered) {
    * @see org.vamsas.client.IClientDocument#registerObjects(org.vamsas.client.object[])
    */
   public VorbaId[] registerObjects(object[] unregistered) {
-    // TODO Auto-generated method stub
+    if (unregistered!=null) {
+      VorbaId ids[] = new VorbaId[unregistered.length];
+      for (int i=0,k=unregistered.length; i<k; i++)
+        ids[i]=registerObject(unregistered[i]);
+      return ids;
+    }
     return null;
   }
 
@@ -151,7 +164,6 @@ public VorbaId registerObject(object unregistered) {
    * @see org.vamsas.client.IClientDocument#setApplicationData(byte[])
    */
   public void setApplicationData(byte[] newData) {
-    // TODO Auto-generated method stub
-
+    appData = newData;
   }
 }
index 3c3aeff..89556bb 100644 (file)
@@ -9,7 +9,7 @@ package org.vamsas.client;
 
 /**
  * Defines the API for the Vamsas XML Document 
- * as accessed by a Vamsas Client Application.
+ * as accessed by a Vamsas SimpleClient Application.
  * An instance of this interface is valid for a 
  * particular set of user, session and application 
  * handles.
index 3107378..5463391 100644 (file)
@@ -21,9 +21,9 @@ public interface IVorbaIdFactory {
    */
   public abstract VorbaId makeVorbaId();
 
-  public abstract SessionHandle getSession();
+  public abstract SessionHandle getSessionHandle();
 
-  public abstract ClientHandle getClient();
+  public abstract ClientHandle getClientHandle();
 
-  public abstract UserHandle getUser();
+  public abstract UserHandle getUserHandle();
 }
\ No newline at end of file
similarity index 90%
rename from src/org/vamsas/client/Client.java
rename to src/org/vamsas/client/SimpleClient.java
index 6dd32ce..04f4990 100644 (file)
@@ -29,11 +29,8 @@ import org.vamsas.objects.core.VamsasDocument;
 
 /**
  * @author jimp
- * 
- * TODO To change the template for this generated type comment go to Window -
- * Preferences - Java - Code Style - Code Templates
  */
-public class Client implements IClient {
+public class SimpleClient implements IClient {
 
   UserHandle user = null;
 
@@ -46,8 +43,7 @@ public class Client implements IClient {
    * @see org.vamsas.client.IClient#getAbout()
    */
   public String getAbout() {
-    // TODO Auto-generated method stub
-    return null;
+    return new String("VORBA SimpleClient version $version$ build $build$");
   }
 
   /*
@@ -56,8 +52,7 @@ public class Client implements IClient {
    * @see org.vamsas.client.IClient#getSessionUrn()
    */
   public String getSessionUrn() {
-    // TODO Auto-generated method stub
-    return null;
+    return session.getSessionUrn();
   }
 
   /*
@@ -66,8 +61,7 @@ public class Client implements IClient {
    * @see org.vamsas.client.IClient#getSessionHandle()
    */
   public SessionHandle getSessionHandle() {
-    // TODO Auto-generated method stub
-    return null;
+    return session;
   }
 
   /*
@@ -76,8 +70,7 @@ public class Client implements IClient {
    * @see org.vamsas.client.IClient#getClientHandle()
    */
   public ClientHandle getClientHandle() {
-    // TODO Auto-generated method stub
-    return null;
+    return client;
   }
 
   /*
@@ -86,8 +79,7 @@ public class Client implements IClient {
    * @see org.vamsas.client.IClient#getUserHandle()
    */
   public UserHandle getUserHandle() {
-    // TODO Auto-generated method stub
-    return null;
+    return user;
   }
 
   private Hashtable handlers = initHandlers();
@@ -127,8 +119,9 @@ public class Client implements IClient {
    * @see org.vamsas.client.IClient#finalizeClient()
    */
   public void finalizeClient() {
-    // TODO Auto-generated method stub
-
+    // TODO: raise events
+    // deregister listeners.
+    // mark this instance as finalized
   }
   
   /**
@@ -149,7 +142,7 @@ public class Client implements IClient {
    * any VorbaIds, and completes the org.vamsas.client.object housekeeping fields.
    * 
    * @param instream - the XML input stream 
-   * @param factory - the Client's properly configured VorbaId factory to make new references.
+   * @param factory - the SimpleClient's properly configured VorbaId factory to make new references.
    * @return null or {(Object) VamsasDocument object, (Object) Hashtable of object references)
    */
   private static Object[] getVamsasDocument(Reader instream,
@@ -173,8 +166,6 @@ public class Client implements IClient {
        * @see org.exolab.castor.xml.UnmarshalListener#attributesProcessed(java.lang.Object)
        */
       public void attributesProcessed(Object object) {
-        // TODO Auto-generated method stub
-
       }
 
       /*
@@ -184,8 +175,6 @@ public class Client implements IClient {
        *      java.lang.Object, java.lang.Object)
        */
       public void fieldAdded(String fieldName, Object parent, Object child) {
-        // TODO Auto-generated method stub
-
       }
 
       /*
@@ -194,8 +183,6 @@ public class Client implements IClient {
        * @see org.exolab.castor.xml.UnmarshalListener#initialized(java.lang.Object)
        */
       public void initialized(Object object) {
-        // TODO Auto-generated method stub
-
       }
 
       /*
@@ -253,16 +240,25 @@ public class Client implements IClient {
     }
     return null;
   }
-
+/**
+ * extract data appropriate for client, session and user
+ * from vamsas document.
+ * @return application's byte array
+ */
+  private byte[] getApplicationData() {
+    return null;
+  }
 
   /*
    * (non-Javadoc)
    * 
    * @see org.vamsas.client.IClient#getClientDocument()
    */
-
   public IClientDocument getClientDocument() {
-    // TODO Auto-generated method stub
+    Object[] vdoc;//  TODO: = getVamsasDocument(new Reader());
+    ClientDocument cdoc = new ClientDocument(getApplicationData(),
+        ((VamsasDocument) vdoc[0]).getVAMSAS(), (Hashtable) vdoc[1], this);
+    // 
     return null;
   }
 
index 5b9346f..6637d1e 100644 (file)
@@ -40,7 +40,7 @@ public class SimpleClientFactory implements IClientFactory {
   public IClient getIClient(ClientHandle applicationHandle) {
     // create a new session
     // register new ClientHandle in session
-    // create Client instance
+    // create SimpleClient instance
     return null;
   }
 
@@ -51,7 +51,7 @@ public class SimpleClientFactory implements IClientFactory {
     // locate session from Urn
     // check that clientHandle is unique (with default user) - if not update the clientHandle urn to make it unique.
     // wait for lock and attach to session
-    // create Client instance
+    // create SimpleClient instance
     return null;
   }
 
@@ -72,7 +72,7 @@ public class SimpleClientFactory implements IClientFactory {
    */
   public IClient getIClient(ClientHandle applicationHandle, UserHandle userId) {
     // create new session
-    // register Client and UserHandles in session
+    // register SimpleClient and UserHandles in session
     // create client instance
     return null;
   }
index 9207e45..ece1357 100644 (file)
@@ -28,13 +28,13 @@ public abstract class VorbaIdFactory implements IVorbaIdFactory {
    */
   protected abstract void setSession(SessionHandle sessionhandle);
 
-  public abstract SessionHandle getSession();
+  public abstract SessionHandle getSessionHandle();
 
   protected abstract void setClient(ClientHandle appHandle);
 
-  public abstract ClientHandle getClient();
+  public abstract ClientHandle getClientHandle();
 
   protected abstract void setUser(UserHandle userHandle);
 
-  public abstract UserHandle getUser();
+  public abstract UserHandle getUserHandle();
 }