<?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="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="4" path="1" containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.ant.ui.classpathentry.antHome"> <memento default="true"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" internalArchive="/VamsasClient/lib/xml-apis.jar"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" internalArchive="/VamsasClient/tools/commons-logging.jar"/> "/>
</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:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="working set" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/VamsasClient/src/org/vamsas/objects" type="2"/> </launchConfigurationWorkingSet> }"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/VamsasClient/build.xml}"/>
</launchConfiguration>
<?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="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="4" path="1" containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.ant.ui.classpathentry.antHome"> <memento default="true"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" internalArchive="/VamsasClient/lib/xml-apis.jar"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" internalArchive="/VamsasClient/tools/commons-logging.jar"/> "/>
</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:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="working set" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/VamsasClient/src/org/vamsas/objects" type="2"/> </launchConfigurationWorkingSet> }"/>
-<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:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="working set" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/VamsasClient/src/org/vamsas/objects" type="2"/> </launchConfigurationWorkingSet>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc}/build.xml"/>
</launchConfiguration>
<?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"/>
<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="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="4" path="1" containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.ant.ui.classpathentry.antHome"> <memento default="true"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" internalArchive="/VamsasClient/lib/xml-apis.jar"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry type="2" path="3" internalArchive="/VamsasClient/tools/commons-logging.jar"/> "/>
</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:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="working set" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/VamsasClient/src/org/vamsas/objects" type="2"/> </launchConfigurationWorkingSet>}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/VamsasClient/build.xml}"/>
</launchConfiguration>
*/
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;
}
/*
*/
public object[] getVamsasRoots() {
// extract root objects
- VAMSAS[] roots = doc.getVAMSAS();
if (roots == null)
return new VAMSAS[] { new VAMSAS() };
return roots;
*/
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
}
} 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!");
}
* @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)
* @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;
}
* @see org.vamsas.client.IClientDocument#setApplicationData(byte[])
*/
public void setApplicationData(byte[] newData) {
- // TODO Auto-generated method stub
-
+ appData = newData;
}
}
/**
* 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.
*/
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
/**
* @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;
* @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$");
}
/*
* @see org.vamsas.client.IClient#getSessionUrn()
*/
public String getSessionUrn() {
- // TODO Auto-generated method stub
- return null;
+ return session.getSessionUrn();
}
/*
* @see org.vamsas.client.IClient#getSessionHandle()
*/
public SessionHandle getSessionHandle() {
- // TODO Auto-generated method stub
- return null;
+ return session;
}
/*
* @see org.vamsas.client.IClient#getClientHandle()
*/
public ClientHandle getClientHandle() {
- // TODO Auto-generated method stub
- return null;
+ return client;
}
/*
* @see org.vamsas.client.IClient#getUserHandle()
*/
public UserHandle getUserHandle() {
- // TODO Auto-generated method stub
- return null;
+ return user;
}
private Hashtable handlers = initHandlers();
* @see org.vamsas.client.IClient#finalizeClient()
*/
public void finalizeClient() {
- // TODO Auto-generated method stub
-
+ // TODO: raise events
+ // deregister listeners.
+ // mark this instance as finalized
}
/**
* 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,
* @see org.exolab.castor.xml.UnmarshalListener#attributesProcessed(java.lang.Object)
*/
public void attributesProcessed(Object object) {
- // TODO Auto-generated method stub
-
}
/*
* java.lang.Object, java.lang.Object)
*/
public void fieldAdded(String fieldName, Object parent, Object child) {
- // TODO Auto-generated method stub
-
}
/*
* @see org.exolab.castor.xml.UnmarshalListener#initialized(java.lang.Object)
*/
public void initialized(Object object) {
- // TODO Auto-generated method stub
-
}
/*
}
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;
}
public IClient getIClient(ClientHandle applicationHandle) {
// create a new session
// register new ClientHandle in session
- // create Client instance
+ // create SimpleClient instance
return null;
}
// 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;
}
*/
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;
}
*/
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();
}