Initial revision
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 12 Sep 2005 09:36:10 +0000 (09:36 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 12 Sep 2005 09:36:10 +0000 (09:36 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@2 be28352e-c001-0410-b1a7-c7978e42abec

build.xml [new file with mode: 0644]
src/org/vamsas/client/Events.java [new file with mode: 0644]
src/org/vamsas/client/Iapp.java [new file with mode: 0644]
src/org/vamsas/client/Iclient.java [new file with mode: 0644]
src/org/vamsas/client/object.java [new file with mode: 0644]

diff --git a/build.xml b/build.xml
new file mode 100644 (file)
index 0000000..c8d6513
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,73 @@
+<xml version="1.0" />
+  <project name="vamsas-client" default="build" basedir=".">
+       <target name="init">
+               <property name="libDir" value="lib"/>
+               <property name="resourceDir" value="resources"/>
+               <property name="sourceDir" value="src" />
+               <property name="outputDir" value="classes" />
+               <property name="packageDir" value="packages" />
+                
+               <!--
+               Build classpath
+               -->
+               <path id="build.classpath">
+                       <fileset dir="utils">
+                               <include name="*.jar"/>
+                               <include name="**/*.jar"/>
+                       </fileset>
+
+                       <fileset dir="${libDir}">
+                               <include name="*.jar"/>
+                               <include name="**/*.jar"/>
+                       </fileset>
+                  <!--                 <path refid="axis.classpath"/> --->
+               </path>
+        </target>
+    
+       <target name="prepare" depends="init">
+          <mkdir dir="${packageDir}"/>
+          <mkdir dir="${outputDir}"/>
+               <copy todir="${outputDir}">
+                       <fileset dir="${resourceDir}" />
+               </copy>
+       </target>
+    <target name="clean" depends="init">
+       <delete>
+        <fileset dir="${outputDir}">
+       <include name="*"/>
+       <include name="*.*"/>
+       <include name="**/*"/>
+       <include name="**/*.*"/>
+       </fileset>
+       </delete>
+       <delete dir="${axisbuild}"/>
+<!--   <ant dir="test" antfile="build.xml" target="clean"
+inheritRefs="true"/> -->
+     </target>
+     <target name="realclean" depends="init, clean">
+               <delete dir="${packageDir}"/>
+     </target>
+     <target name="distclean" depends="init, realclean">
+       <echo message="REMOVING ALL BACKUP/AUTOSAVES!"/>
+       <delete>
+                <fileset dir=".">
+               <include name="#*#"/>
+               <include name="#*.*#"/>
+               <include name="**/#*#"/>
+               <include name="**/#*.*#"/>
+               <include name="*~"/>
+               <include name="*.*~"/>
+               <include name="**/*~"/>
+               <include name="**/*.*~"/>
+               </fileset>
+       </delete>
+       </target>
+
+       <target name="build" depends="init, prepare">
+       <!-- not efficient yet. : use excludes="*/localtest/*.java" if local tests are not building -->
+       <javac classpathref="build.classpath" debug="on" srcdir="${sourceDir}" destdir="${outputDir}" />
+       </target>
+
+  </project>
+
+
diff --git a/src/org/vamsas/client/Events.java b/src/org/vamsas/client/Events.java
new file mode 100644 (file)
index 0000000..1864790
--- /dev/null
@@ -0,0 +1,14 @@
+package org.vamsas.client;
+
+public class Events {
+    /**
+     * Event types generated during the lifecycle of a Vamsas session.
+     */
+
+    public static final String DOCUMENT_UPDATE="org.vamsas.client.documentUpdateEvent";
+    public static final String DOCUMENT_CREATE="org.vamsas.client.documentCreateEvent";
+    public static final String CLIENT_CREATION="org.vamsas.client.clientCreateEvent";
+    public static final String CLIENT_FINALIZATION="org.vamsas.client.clientFinalizationEvent";
+    public static final String SESSION_SHUTDOWN; //
+    public static final String DOCUMENT_CLOSE; //
+}
diff --git a/src/org/vamsas/client/Iapp.java b/src/org/vamsas/client/Iapp.java
new file mode 100644 (file)
index 0000000..cba2637
--- /dev/null
@@ -0,0 +1,11 @@
+/**
+ * org.vamsas.client.Iapp
+ */
+package org.vamsas.client;
+Interface Iapp {
+    /**
+     * Define core callback functionality that a fully 
+     * fledged vamsas application object must implement
+     */
+
+};
diff --git a/src/org/vamsas/client/Iclient.java b/src/org/vamsas/client/Iclient.java
new file mode 100644 (file)
index 0000000..96a7711
--- /dev/null
@@ -0,0 +1,48 @@
+/**
+ * org.vamsas.client.Iclient
+ * 
+ */
+package org.vamsas.client;
+Interface Iclient {
+    /**
+     * Define the methods availabable to a vamsas
+     * application for interacting with the vamsas 
+     * object broker
+     * (it's VORBA, not CORBA!)
+     */
+    /**
+     * static methods for returning a new instance 
+     * of vorba with or without a session urn. 
+     */
+    Iclient getVorba(String ApplicationHandle);
+    Iclient getVorba(String ApplicationHandle, String SessionUrn);
+    /**
+     * Extend to multi-user. By default is to use current username
+     *
+     * Iclient getVorba(String ApplicationHandle, String UserUrn);
+     */
+
+    /**
+     * Instance methods
+     */
+    /**
+     *  Return current SessionUrni
+     */
+    String getSessionUrn();
+    /**
+     * get vamsas document with app specific data
+     */
+    VamsasClientDocument getDocument();
+    /**
+     * register handler for updates for the current session
+     */
+    void addDocumentUpdateHandler(java.util.EventHandler evt);
+    /**
+     * Self-documenting/describing info for presenting to user
+     * returns string like VamsasClient v.1.1.1 (GPL) and whatever
+     */
+    String getAboutVamsasClient();
+
+    void closeVamsasDocument();
+
+}
diff --git a/src/org/vamsas/client/object.java b/src/org/vamsas/client/object.java
new file mode 100644 (file)
index 0000000..c34d771
--- /dev/null
@@ -0,0 +1,28 @@
+/**
+ * org.vamsas.client.object
+ * 
+ */
+
+package org.vamsas.client;
+
+public abstract class object {
+
+    /**
+     * unique id for all vamsas objects
+     * allows unambiguous referencing
+     * to any object in the vamsas document
+     */
+
+    protected String __vorba_id;
+    /**
+     * Method to get fixed reference for
+     * the object in the vamsas document.
+     */
+    public string getVorbaId();
+    /**
+     * used by the Iclient implementation
+     * to generate unique Id based on
+     * client applications current namespace.
+     */
+    protected string setVorbaId();
+}