From f0307c09bb32271a55b287b06f9e4b9f71526c04 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 17 Mar 2006 09:27:31 +0000 Subject: [PATCH] renamed base class for all vamsas document objects (now org.vamsas.client.Vobject) there may be some incorrectly modified javadocs in unrelated files. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@186 be28352e-c001-0410-b1a7-c7978e42abec --- schemas/castorbuilder.properties | 2 +- src/org/vamsas/client/ClientDocument.java | 10 +-- src/org/vamsas/client/IClientDocument.java | 30 ++++---- src/org/vamsas/client/IVorbaIdFactory.java | 2 +- src/org/vamsas/client/Iapp.java | 2 +- .../vamsas/client/{object.java => Vobject.java} | 76 ++++++++++---------- src/org/vamsas/client/VorbaId.java | 8 +-- src/org/vamsas/client/VorbaIdFactory.java | 4 +- src/org/vamsas/client/VorbaXmlBinder.java | 24 +++---- .../vamsas/client/simpleclient/ClientDocument.java | 38 +++++----- src/org/vamsas/client/simpleclient/IdFactory.java | 10 +-- .../vamsas/client/simpleclient/SimpleDocument.java | 4 +- .../vamsas/client/simpleclient/VamsasArchive.java | 6 +- src/org/vamsas/client/simpleclient/VamsasFile.java | 2 +- .../vamsas/client/simpleclient/VamsasSession.java | 2 +- src/org/vamsas/objects/core/Alignment.java | 2 +- .../vamsas/objects/core/AlignmentAnnotations.java | 2 +- src/org/vamsas/objects/core/AnnotationElement.java | 2 +- src/org/vamsas/objects/core/AppData.java | 2 +- src/org/vamsas/objects/core/DataSet.java | 2 +- .../vamsas/objects/core/DataSetAnnotations.java | 2 +- src/org/vamsas/objects/core/DbRef.java | 2 +- src/org/vamsas/objects/core/Entry.java | 2 +- src/org/vamsas/objects/core/LockFile.java | 2 +- src/org/vamsas/objects/core/Newick.java | 2 +- src/org/vamsas/objects/core/Provenance.java | 2 +- src/org/vamsas/objects/core/SequenceType.java | 2 +- src/org/vamsas/objects/core/Tree.java | 2 +- src/org/vamsas/objects/core/VAMSAS.java | 2 +- src/org/vamsas/objects/core/VamsasDocument.java | 2 +- src/org/vamsas/objects/utils/AppDataReference.java | 2 +- src/org/vamsas/objects/utils/DocumentStuff.java | 2 +- src/org/vamsas/objects/utils/Seq.java | 8 +-- src/org/vamsas/objects/utils/SeqSet.java | 2 +- src/org/vamsas/test/objects/Core.java | 2 +- .../vamsas/test/simpleclient/ArchiveReports.java | 6 +- .../vamsas/test/simpleclient/ArchiveWriter.java | 4 +- 37 files changed, 138 insertions(+), 138 deletions(-) rename src/org/vamsas/client/{object.java => Vobject.java} (80%) diff --git a/schemas/castorbuilder.properties b/schemas/castorbuilder.properties index d2f669e..e5b73f8 100644 --- a/schemas/castorbuilder.properties +++ b/schemas/castorbuilder.properties @@ -17,7 +17,7 @@ # This property allows one to specify the super class of *all* # generated classes # -org.exolab.castor.builder.superclass=org.vamsas.client.object +org.exolab.castor.builder.superclass=org.vamsas.client.Vobject # XML namespace mapping to Java packages # diff --git a/src/org/vamsas/client/ClientDocument.java b/src/org/vamsas/client/ClientDocument.java index 0dbdcfd..005cb60 100644 --- a/src/org/vamsas/client/ClientDocument.java +++ b/src/org/vamsas/client/ClientDocument.java @@ -11,13 +11,13 @@ import org.vamsas.objects.core.VAMSAS; /** * skeleton abstract class to allow client implementations - * access to vamsas.client.object registry mechanism. + * access to vamsas.client.Vobject registry mechanism. */ public abstract class ClientDocument implements IClientDocument { static Log log = LogFactory.getLog(ClientDocument.class); /** - * collection of org.vamsas.client.object references + * collection of org.vamsas.client.Vobject references */ protected Hashtable vamsasObjects; protected IVorbaIdFactory vorbafactory; @@ -28,16 +28,16 @@ public abstract class ClientDocument implements IClientDocument { } /** - * @see IClientHandle.registerObject(object unregistered) + * @see IClientHandle.registerObject(Vobject unregistered) */ - protected VorbaId _registerObject(object unregistered) { + protected VorbaId _registerObject(Vobject unregistered) { // be ultra safe here because the user may be trying to mix different factories if (unregistered.__vorba==null) unregistered.__vorba = vorbafactory; else if (unregistered.__vorba!=vorbafactory) { // 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."); + log.error("Attempt to overwrite info in a registered vorba Vobject (under a different IVorgaIdFactory) ! - Implementation fix needed."); return null; } else { // probably didn't need to call registerObject. diff --git a/src/org/vamsas/client/IClientDocument.java b/src/org/vamsas/client/IClientDocument.java index 84149b6..d199da8 100644 --- a/src/org/vamsas/client/IClientDocument.java +++ b/src/org/vamsas/client/IClientDocument.java @@ -19,10 +19,10 @@ import org.vamsas.objects.core.VAMSAS; * It initially represents a snapshot of the * XML document at a particular time - queriable by * reference or by retrieval of root objects. - * It provides methods to make new object references, + * It provides methods to make new Vobject references, * These are guaranteed to be unique amongst existing * objects in the document, all other references created - * by this object's instance and all other references + * by this Vobject's instance and all other references * constructed by any other vamsas agents in the session. * TODO: NOW! make AppData interface instance for getting/setting 'global' appData and the current users' appData entry. * TODO: LATER: finegrained access control for public/private user access @@ -38,20 +38,20 @@ import org.vamsas.objects.core.VAMSAS; public interface IClientDocument { /** - * Get a single object. + * Get a single Vobject. * @param id - * @return object referred to by id or null if it doesn't exist. + * @return Vobject referred to by id or null if it doesn't exist. */ - object getObject(VorbaId id); + Vobject getObject(VorbaId id); /** * Get a list of objects. * @param ids * @return array of objects using a vector of VorbaId ids. */ - object[] getObjects(VorbaId[] ids); + Vobject[] getObjects(VorbaId[] ids); /** * Returns all root objects in document. All objects inherit - * from org.vamsas.client.object and have valid VorbaIds and provenance entries. + * from org.vamsas.client.Vobject and have valid VorbaIds and provenance entries. * @return array of root Vamsas element objects. */ VAMSAS[] getVamsasRoots(); @@ -71,27 +71,27 @@ public interface IClientDocument { */ void addVamsasRoot(VAMSAS newroot); /** - * Returns an object with a valid VorbaId, and provenance element. + * Returns an Vobject with a valid VorbaId, and provenance element. * The VorbaId is so the application may refer to it in * its own dataspace. * - * Note: An object with valid VorbaId will not be reregistered. - * Advice: Calling this method for a high-level object + * Note: An Vobject with valid VorbaId will not be reregistered. + * Advice: Calling this method for a high-level Vobject * (such as org.vamsas.objects.core.VAMSAS) will * register all its component objects too. * - * @param unregistered unregistered vamsas object - * @return VorbaId registered for vamsas object + * @param unregistered unregistered vamsas Vobject + * @return VorbaId registered for vamsas Vobject */ - VorbaId registerObject(object unregistered); + VorbaId registerObject(Vobject unregistered); /** * Returns an array of objects, each with a valid VorbaId * (and completed provenance entry). - * Note: An object with valid VorbaId will not be reregistered. + * Note: An Vobject with valid VorbaId will not be reregistered. * @param unregistered array of unregistered objects. * @return array of VorbaIds for the registered objects */ - VorbaId[] registerObjects(object[] unregistered); + VorbaId[] registerObjects(Vobject[] unregistered); /** * Get instance of Client and User specific vamsas document data access interface. * @return Interface to Client and user specific application data diff --git a/src/org/vamsas/client/IVorbaIdFactory.java b/src/org/vamsas/client/IVorbaIdFactory.java index 03deb58..3878592 100644 --- a/src/org/vamsas/client/IVorbaIdFactory.java +++ b/src/org/vamsas/client/IVorbaIdFactory.java @@ -20,7 +20,7 @@ public interface IVorbaIdFactory { * @return valid VorbaId for session, or null if VorbaIdFactory not configured * correctly. */ - public abstract VorbaId makeVorbaId(object vobject); + public abstract VorbaId makeVorbaId(Vobject vobject); public abstract SessionHandle getSessionHandle(); diff --git a/src/org/vamsas/client/Iapp.java b/src/org/vamsas/client/Iapp.java index 5c7da8c..381e22b 100644 --- a/src/org/vamsas/client/Iapp.java +++ b/src/org/vamsas/client/Iapp.java @@ -5,7 +5,7 @@ package org.vamsas.client; public interface Iapp { /** * Define core callback functionality that a fully - * fledged vamsas application object must implement + * fledged vamsas application Vobject must implement * TODO: define some Application Callbacks and create use cases for them */ diff --git a/src/org/vamsas/client/object.java b/src/org/vamsas/client/Vobject.java similarity index 80% rename from src/org/vamsas/client/object.java rename to src/org/vamsas/client/Vobject.java index 18054b7..cb2738f 100644 --- a/src/org/vamsas/client/object.java +++ b/src/org/vamsas/client/Vobject.java @@ -17,32 +17,32 @@ import org.vamsas.test.simpleclient.VamsasArchive; /** * Base class for all Vamsas objects extracted from an IClientDocument. An - * object maybe registered or unregistered. + * Vobject maybe registered or unregistered. * * @author jimp * */ -public abstract class object { - static Log log = LogFactory.getLog(object.class); +public abstract class Vobject { + static Log log = LogFactory.getLog(Vobject.class); /** - * true if object was stored in a vamsas Document or has been retrieved from it + * true if Vobject was stored in a vamsas Document or has been retrieved from it */ protected boolean __stored_in_document = false; /** - * memory of the last doHash() value computed for the object + * memory of the last doHash() value computed for the Vobject * @see doHash() */ protected long __last_hash = 0; /** - * set by testInstanceForIdField() if object should have a VorbaId + * set by testInstanceForIdField() if Vobject should have a VorbaId */ protected boolean registerable = false; /** * unique id for all vamsas objects allows unambiguous referencing to any - * object in the vamsas document + * Vobject in the vamsas document */ protected VorbaId vorbaId = null; @@ -54,7 +54,7 @@ public abstract class object { /** * */ - protected object() { + protected Vobject() { super(); testInstanceForIdField(); } @@ -79,7 +79,7 @@ public abstract class object { } /** - * update the object instance's _id field, based on the contents of the + * update the Vobject instance's _id field, based on the contents of the * VorbaId. Only call this if you mean to do it! */ protected void setInstanceIdField() { @@ -92,16 +92,16 @@ public abstract class object { } catch (InvocationTargetException e) { log.error("SourceGeneration of " + this.getClass().toString() - + "\n has resulted in an inaccessible 'setId' method!\nCannot set ID from the vorbaId object.", e); + + "\n has resulted in an inaccessible 'setId' method!\nCannot set ID from the vorbaId Vobject.", e); } catch (IllegalAccessException e) { log.error("SourceGeneration of " + this.getClass().toString() - + "\n has resulted in an inaccessible 'setId' method!\nCannot set ID from the vorbaId object.", e); + + "\n has resulted in an inaccessible 'setId' method!\nCannot set ID from the vorbaId Vobject.", e); } catch (SecurityException e) { log.error("Security access violation for "+this.getClass().toString(),e); } catch (NoSuchMethodException e) { - log.warn(this.getClass().toString()+" was erroneously marked as a Vorba object class (Implementation error?)"); + log.warn(this.getClass().toString()+" was erroneously marked as a Vorba Vobject class (Implementation error?)"); this.setRegisterable(false); } } else { @@ -111,7 +111,7 @@ public abstract class object { } /** - * calculate a hash for the object with all housekeeping fields at standard + * calculate a hash for the Vobject with all housekeeping fields at standard * values. (isRegisterable is an immutable attribute property) * TODO: decide if __stored_in_document should be included in the hash or not. * @return true if new hash different to last hash @@ -132,31 +132,31 @@ public abstract class object { } /** - * TODO: combine two versions of the same collection object to resolve - * asynchronous updates to the same vamsas object Merges two vamsas objects, + * TODO: combine two versions of the same collection Vobject to resolve + * asynchronous updates to the same vamsas Vobject Merges two vamsas objects, * one of which is a later version of the earlier (ie they have the same * vorbaId but one is a later version recently read from the vamsasDocument * collection. * * @return */ - protected boolean merge(object laterCopy) { + protected boolean merge(Vobject laterCopy) { log.warn(this.getClass().getName()+".merge() not implemented."); return true; } /** * - * @return true if object is registered + * @return true if Vobject is registered */ public boolean isRegistered() { return (registerable) ? (vorbaId != null) : false; } /** - * Method to get fixed reference for the object in the vamsas document. + * Method to get fixed reference for the Vobject in the vamsas document. * - * @returns null if object is neither registered or not associated with a + * @returns null if Vobject is neither registered or not associated with a * properly instantiated VorbaIdFactory. */ public VorbaId getVorbaId() { @@ -182,27 +182,27 @@ public abstract class object { } /** - * @return true if object is present in Vamsas Document. + * @return true if Vobject is present in Vamsas Document. */ public boolean is__stored_in_document() { return __stored_in_document; } /** - * for use by Vorba agent to reflect state of vamsas object to client + * for use by Vorba agent to reflect state of vamsas Vobject to client * application. - * Setting stored_in_document on a registerable object without a + * Setting stored_in_document on a registerable Vobject without a * vorbaId will mean is will *never* get a vorbaId and * horrible things will happen. - * @param __stored_in_document true if object has been marshalled into current document. + * @param __stored_in_document true if Vobject has been marshalled into current document. */ protected void set__stored_in_document(boolean __stored_in_document) { this.__stored_in_document = __stored_in_document; } /** - * __last_hash is the hash value computed when the object was last checked - * against a IClientDocument generated by the object's parent IClient + * __last_hash is the hash value computed when the Vobject was last checked + * against a IClientDocument generated by the Vobject's parent IClient * instance. * * @return Returns the __last_hash. @@ -212,7 +212,7 @@ public abstract class object { } /** - * @return true if object can have a vorbaId + * @return true if Vobject can have a vorbaId */ public boolean isRegisterable() { return registerable; @@ -220,7 +220,7 @@ public abstract class object { /** * Called by __testInstanceForidField and the post-unmarshalling handler - * to indicate if object will have a vorbaId. + * to indicate if Vobject will have a vorbaId. * @param registerable */ protected void setRegisterable(boolean registerable) { @@ -228,7 +228,7 @@ public abstract class object { } /** * ensure's internal id field corresponds to vorbaId and - * cascade through all fields referring to an instance of object + * cascade through all fields referring to an instance of Vobject * calling the same method on them. * TODO: LATER: properly apply castors own field mechanisms to get at accessors * TODO: FIX CYCLIC __ensure+instance_ids @@ -240,12 +240,12 @@ public abstract class object { */ protected void __ensure_instance_ids() { if (__vorba==null) - throw new Error("Improperly intialised org.vamsas.client.object - no VorbaFactory given."); + throw new Error("Improperly intialised org.vamsas.client.Vobject - no VorbaFactory given."); log.debug("doing "+this.getClass()+".__ensure_instance_ids()"); if (!__stored_in_document && registerable) setInstanceIdField(); if (!doHash()) - return; // nothing has changed in this object - probably visited it before. + return; // nothing has changed in this Vobject - probably visited it before. Class descriptor = null; XMLClassDescriptorImpl descimpl = null; try { @@ -262,11 +262,11 @@ public abstract class object { for (int i=0,j=fields.length; isync parameter which is true if new VorbaIds * were created. If sync is false, then the caller should ensure that the @@ -163,11 +163,11 @@ public class VorbaXmlBinder implements UnmarshalListener { * TODO: ensure that provenance is correct for newly registered objects * @param instream - the XML input stream * @param factory - the SimpleClient's properly configured VorbaId factory to make new references. - * @param root the root element's org.vamsas.objects.core object. - * @return null or {(Object) VamsasDocument object, (Object) Hashtable of object references, (Object) Boolean(sync) } + * @param root the root element's org.vamsas.objects.core Vobject. + * @return null or {(Object) VamsasDocument Vobject, (Object) Hashtable of Vobject references, (Object) Boolean(sync) } */ public static Object[] getVamsasObjects(Reader instream, - IVorbaIdFactory factory, object root) { + IVorbaIdFactory factory, Vobject root) { Unmarshaller unmarshaller = new Unmarshaller(root); unmarshaller.setIDResolver(new IDResolver() { public Object resolve(String id) { @@ -187,7 +187,7 @@ public class VorbaXmlBinder implements UnmarshalListener { while (instream.ready()) { Object obj = unmarshaller.unmarshal(instream); boolean sync=ensure_references(unrefed, objrefs); - if (!(obj instanceof object)) + if (!(obj instanceof Vobject)) return null; return new Object[] { obj, objrefs, new Boolean(sync)}; } diff --git a/src/org/vamsas/client/simpleclient/ClientDocument.java b/src/org/vamsas/client/simpleclient/ClientDocument.java index a6bb78c..fade094 100644 --- a/src/org/vamsas/client/simpleclient/ClientDocument.java +++ b/src/org/vamsas/client/simpleclient/ClientDocument.java @@ -12,7 +12,7 @@ import org.vamsas.client.IClient; import org.vamsas.client.IClientAppdata; import org.vamsas.client.IClientDocument; import org.vamsas.client.VorbaId; -import org.vamsas.client.object; +import org.vamsas.client.Vobject; import org.vamsas.objects.core.AppData; import org.vamsas.objects.core.ApplicationData; import org.vamsas.objects.core.User; @@ -82,9 +82,9 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements * * @see org.vamsas.client.IClientDocument#getObject(org.vamsas.client.VorbaId) */ - public object getObject(VorbaId id) { - // TODO: look up id in document object - // retrieve object and return + public Vobject getObject(VorbaId id) { + // TODO: look up id in document Vobject + // retrieve Vobject and return return null; } @@ -93,7 +93,7 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements * * @see org.vamsas.client.IClientDocument#getObjects(org.vamsas.client.VorbaId[]) */ - public object[] getObjects(VorbaId[] ids) { + public Vobject[] getObjects(VorbaId[] ids) { // TODO: getObject in bulk return null; } @@ -125,36 +125,36 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements for (int i = 0, k = newroots.length; i < k; i++) { if (newroots[i].isRegistered()) { // easy - just check if anything has changed and do provenance - object oldversion = getObject(newroots[i].getVorbaId()); + Vobject oldversion = getObject(newroots[i].getVorbaId()); if (oldversion instanceof VAMSAS) { // LATER: appropriate merging behaviour when two clients have - // modified the same registered object independently + // modified the same registered Vobject independently if (newroots[i].get__last_hash() != newroots[i].hashCode()) { - // client has modified this object since last retrieval. + // client has modified this Vobject since last retrieval. if (newroots[i].get__last_hash() != oldversion.get__last_hash()) { - // object has been modified by another client since this + // Vobject has been modified by another client since this // client's // last access to document. } } } else { throw new Error( - "SimpleClient error when using setVamsasRoots : The vorbaId for object " + "SimpleClient error when using setVamsasRoots : The vorbaId for Vobject " + i - + " does not refer to an object of type VAMSAS in the current document!"); + + " does not refer to an Vobject of type VAMSAS in the current document!"); } } else { if (!newroots[i].is__stored_in_document()) { - // check if object is modified + // check if Vobject is modified if (newroots[i].get__last_hash() != newroots[i].hashCode()) { - // it is - so we add newroots[i] as a new object, with updated + // it is - so we add newroots[i] as a new Vobject, with updated // provenance. } else { // do nothing newroots[i] = null; } } else { - // just add newroots[i] as a new object in the document + // just add newroots[i] as a new Vobject in the document // - with appropriate provenance. } } @@ -173,9 +173,9 @@ public class ClientDocument extends org.vamsas.client.ClientDocument implements /* * (non-Javadoc) * - * @see org.vamsas.client.IClientDocument#registerObjects(org.vamsas.client.object[]) + * @see org.vamsas.client.IClientDocument#registerObjects(org.vamsas.client.Vobject[]) */ - public VorbaId[] registerObjects(object[] unregistered) { + public VorbaId[] registerObjects(Vobject[] unregistered) { if (unregistered!=null) { VorbaId ids[] = new VorbaId[unregistered.length]; for (int i=0,k=unregistered.length; i0) { @@ -76,7 +76,7 @@ public class IdFactory extends VorbaIdFactory { } newidstring=idstring+Integer.toString(sequence); } while (extantids.containsKey(newidstring)); - extantids.put(newidstring, vobject); // hash the object by its new Id + extantids.put(newidstring, vobject); // hash the Vobject by its new Id VorbaId id = newId(newidstring); return id; } diff --git a/src/org/vamsas/client/simpleclient/SimpleDocument.java b/src/org/vamsas/client/simpleclient/SimpleDocument.java index 84f2444..7c7d060 100644 --- a/src/org/vamsas/client/simpleclient/SimpleDocument.java +++ b/src/org/vamsas/client/simpleclient/SimpleDocument.java @@ -11,7 +11,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.vamsas.client.VorbaIdFactory; import org.vamsas.client.VorbaXmlBinder; -import org.vamsas.client.object; +import org.vamsas.client.Vobject; import org.vamsas.objects.core.ApplicationData; import org.vamsas.objects.core.User; import org.vamsas.objects.core.VAMSAS; @@ -77,7 +77,7 @@ public class SimpleDocument { if (unmarsh==null) log.fatal("Couldn't unmarshall document!"); - object vobjs = (object) unmarsh[0]; + Vobject vobjs = (Vobject) unmarsh[0]; if (vobjs!=null) { VamsasDocument doc=(VamsasDocument) vobjs; if (doc!=null) diff --git a/src/org/vamsas/client/simpleclient/VamsasArchive.java b/src/org/vamsas/client/simpleclient/VamsasArchive.java index 528d517..93c775c 100644 --- a/src/org/vamsas/client/simpleclient/VamsasArchive.java +++ b/src/org/vamsas/client/simpleclient/VamsasArchive.java @@ -24,7 +24,7 @@ import org.vamsas.client.SessionHandle; import org.vamsas.client.UserHandle; import org.vamsas.client.VorbaIdFactory; import org.vamsas.client.VorbaXmlBinder; -import org.vamsas.client.object; +import org.vamsas.client.Vobject; import org.vamsas.objects.core.ApplicationData; import org.vamsas.objects.core.VAMSAS; import org.vamsas.objects.core.VamsasDocument; @@ -48,7 +48,7 @@ public class VamsasArchive { * @return vector of vamsas roots from original document * @throws IOException */ - public static object[] getOriginalRoots(VamsasArchive ths) throws IOException, + public static Vobject[] getOriginalRoots(VamsasArchive ths) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { VamsasArchiveReader oReader = ths.getOriginalArchiveReader(); if (oReader!=null) { @@ -422,7 +422,7 @@ public class VamsasArchive { * @throws org.exolab.castor.xml.MarshalException * @throws org.exolab.castor.xml.ValidationException */ - public object[] getOriginalRoots() throws IOException, + public Vobject[] getOriginalRoots() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return VamsasArchive.getOriginalRoots(this); } diff --git a/src/org/vamsas/client/simpleclient/VamsasFile.java b/src/org/vamsas/client/simpleclient/VamsasFile.java index ffb1485..ecacdb9 100644 --- a/src/org/vamsas/client/simpleclient/VamsasFile.java +++ b/src/org/vamsas/client/simpleclient/VamsasFile.java @@ -54,7 +54,7 @@ public class VamsasFile extends SessionFile { File sfile = new File(sessionDir, "vamsas.jar"); VamsasFile(sfile); // if live - try to merge storedSession with sessionDir - // - will probably fail through duplicate object references needing to be dereferenced. + // - will probably fail through duplicate Vobject references needing to be dereferenced. // TODO: think of a way of specifying vorba_id scope for an application's references to allow merging of one vamsasDocument with another. } diff --git a/src/org/vamsas/client/simpleclient/VamsasSession.java b/src/org/vamsas/client/simpleclient/VamsasSession.java index 4e6f430..6f41fb7 100644 --- a/src/org/vamsas/client/simpleclient/VamsasSession.java +++ b/src/org/vamsas/client/simpleclient/VamsasSession.java @@ -278,7 +278,7 @@ public class VamsasSession { } /** - * Creates a VamsasArchive object for accessing and updating document + * Creates a VamsasArchive Vobject for accessing and updating document * Note: this will lock the Vamsas Document for exclusive access to the client. * @return session vamsas document * @throws IOException if locks fail or vamsas document read fails. diff --git a/src/org/vamsas/objects/core/Alignment.java b/src/org/vamsas/objects/core/Alignment.java index be0f142..7c6adc5 100644 --- a/src/org/vamsas/objects/core/Alignment.java +++ b/src/org/vamsas/objects/core/Alignment.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class Alignment extends org.vamsas.client.object +public class Alignment extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/AlignmentAnnotations.java b/src/org/vamsas/objects/core/AlignmentAnnotations.java index 4d5f8fa..92626ab 100644 --- a/src/org/vamsas/objects/core/AlignmentAnnotations.java +++ b/src/org/vamsas/objects/core/AlignmentAnnotations.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class AlignmentAnnotations extends org.vamsas.client.object +public class AlignmentAnnotations extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/AnnotationElement.java b/src/org/vamsas/objects/core/AnnotationElement.java index 8d72277..223df76 100644 --- a/src/org/vamsas/objects/core/AnnotationElement.java +++ b/src/org/vamsas/objects/core/AnnotationElement.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class AnnotationElement extends org.vamsas.client.object +public class AnnotationElement extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/AppData.java b/src/org/vamsas/objects/core/AppData.java index a0fb387..95a51d6 100644 --- a/src/org/vamsas/objects/core/AppData.java +++ b/src/org/vamsas/objects/core/AppData.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class AppData extends org.vamsas.client.object +public class AppData extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/DataSet.java b/src/org/vamsas/objects/core/DataSet.java index d53dc4f..e5c0b8b 100644 --- a/src/org/vamsas/objects/core/DataSet.java +++ b/src/org/vamsas/objects/core/DataSet.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class DataSet extends org.vamsas.client.object +public class DataSet extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/DataSetAnnotations.java b/src/org/vamsas/objects/core/DataSetAnnotations.java index cea5a3b..d67201c 100644 --- a/src/org/vamsas/objects/core/DataSetAnnotations.java +++ b/src/org/vamsas/objects/core/DataSetAnnotations.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class DataSetAnnotations extends org.vamsas.client.object +public class DataSetAnnotations extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/DbRef.java b/src/org/vamsas/objects/core/DbRef.java index ad8f79f..8666d71 100644 --- a/src/org/vamsas/objects/core/DbRef.java +++ b/src/org/vamsas/objects/core/DbRef.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class DbRef extends org.vamsas.client.object +public class DbRef extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/Entry.java b/src/org/vamsas/objects/core/Entry.java index 95dd1fb..0efa17f 100644 --- a/src/org/vamsas/objects/core/Entry.java +++ b/src/org/vamsas/objects/core/Entry.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class Entry extends org.vamsas.client.object +public class Entry extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/LockFile.java b/src/org/vamsas/objects/core/LockFile.java index ef6fc07..a26bbe2 100644 --- a/src/org/vamsas/objects/core/LockFile.java +++ b/src/org/vamsas/objects/core/LockFile.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class LockFile extends org.vamsas.client.object +public class LockFile extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/Newick.java b/src/org/vamsas/objects/core/Newick.java index 3d2bd2a..58b2f6e 100644 --- a/src/org/vamsas/objects/core/Newick.java +++ b/src/org/vamsas/objects/core/Newick.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class Newick extends org.vamsas.client.object +public class Newick extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/Provenance.java b/src/org/vamsas/objects/core/Provenance.java index 3c3eb8d..e1f6b85 100644 --- a/src/org/vamsas/objects/core/Provenance.java +++ b/src/org/vamsas/objects/core/Provenance.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class Provenance extends org.vamsas.client.object +public class Provenance extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/SequenceType.java b/src/org/vamsas/objects/core/SequenceType.java index 1adc80a..59b6058 100644 --- a/src/org/vamsas/objects/core/SequenceType.java +++ b/src/org/vamsas/objects/core/SequenceType.java @@ -26,7 +26,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class SequenceType extends org.vamsas.client.object +public class SequenceType extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/Tree.java b/src/org/vamsas/objects/core/Tree.java index a6cbad3..5bd5c28 100644 --- a/src/org/vamsas/objects/core/Tree.java +++ b/src/org/vamsas/objects/core/Tree.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class Tree extends org.vamsas.client.object +public class Tree extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/VAMSAS.java b/src/org/vamsas/objects/core/VAMSAS.java index 28ee859..0c1af87 100644 --- a/src/org/vamsas/objects/core/VAMSAS.java +++ b/src/org/vamsas/objects/core/VAMSAS.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class VAMSAS extends org.vamsas.client.object +public class VAMSAS extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/core/VamsasDocument.java b/src/org/vamsas/objects/core/VamsasDocument.java index 67debcd..cbf50ba 100644 --- a/src/org/vamsas/objects/core/VamsasDocument.java +++ b/src/org/vamsas/objects/core/VamsasDocument.java @@ -28,7 +28,7 @@ import org.xml.sax.ContentHandler; * * @version $Revision$ $Date$ */ -public class VamsasDocument extends org.vamsas.client.object +public class VamsasDocument extends org.vamsas.client.Vobject implements java.io.Serializable { diff --git a/src/org/vamsas/objects/utils/AppDataReference.java b/src/org/vamsas/objects/utils/AppDataReference.java index 0900239..29c044b 100644 --- a/src/org/vamsas/objects/utils/AppDataReference.java +++ b/src/org/vamsas/objects/utils/AppDataReference.java @@ -21,7 +21,7 @@ public class AppDataReference { */ interface IAppDSearch { /** - * process the appData object d + * process the appData Vobject d * @param d * @return true if appData should be collected */ diff --git a/src/org/vamsas/objects/utils/DocumentStuff.java b/src/org/vamsas/objects/utils/DocumentStuff.java index 6dcb19b..825a3ae 100644 --- a/src/org/vamsas/objects/utils/DocumentStuff.java +++ b/src/org/vamsas/objects/utils/DocumentStuff.java @@ -5,7 +5,7 @@ import org.vamsas.objects.utils.document.VersionEntries; /** * various vamsas-client independent helpers - * for creating and manipulating the vamsasDocument object + * for creating and manipulating the vamsasDocument Vobject * @author jimp * */ diff --git a/src/org/vamsas/objects/utils/Seq.java b/src/org/vamsas/objects/utils/Seq.java index ca83223..b1955a1 100644 --- a/src/org/vamsas/objects/utils/Seq.java +++ b/src/org/vamsas/objects/utils/Seq.java @@ -55,12 +55,12 @@ public class Seq { fasta_out.flush(); } /** - *validate a SequenceType object as an info:iubmb.org/aminoacid SequenceType + *validate a SequenceType Vobject as an info:iubmb.org/aminoacid SequenceType *This version resolves references to Sequence objects from AlignmentSequence *TODO: Define info: urn for dictionary string (could also be regex of valid characters!) * @param s * @param dict TODO - * @return true if a valid amino acid sequence object + * @return true if a valid amino acid sequence Vobject */ private static boolean valid_aadictionary_string(String s, String dict) { if (s==null) @@ -73,7 +73,7 @@ public class Seq { } public static Sequence newSequence(String Name, String Sequence, String Dictionary, int start, int end) { - //TODO: make hierarchy reflecting the SeqType object. + //TODO: make hierarchy reflecting the SeqType Vobject. Sequence seq= new Sequence(); seq.setDictionary(Dictionary); seq.setName(Name); @@ -83,7 +83,7 @@ public class Seq { if ((end-start)!=Sequence.length()) seq.setEnd(start+Sequence.length()); } else { - // reverse topology mapping. TODO: VAMSAS: decide if allowed to do start>end on Sequence object + // reverse topology mapping. TODO: VAMSAS: decide if allowed to do start>end on Sequence Vobject if ((start-end)!=Sequence.length()) seq.setEnd(end+Sequence.length()); } diff --git a/src/org/vamsas/objects/utils/SeqSet.java b/src/org/vamsas/objects/utils/SeqSet.java index b39cba6..294ce43 100644 --- a/src/org/vamsas/objects/utils/SeqSet.java +++ b/src/org/vamsas/objects/utils/SeqSet.java @@ -75,7 +75,7 @@ public class SeqSet { int nseq = 0; BufferedReader infasta = new BufferedReader(new InputStreamReader(os)); System.err.println("NOT FULLY IMPLEMENTED!"); // TODO: Finish adapting this method - // TODO: decide on return type - SequenceType is a partly complete vamsas object - either for a dataset or alignment sequence + // TODO: decide on return type - SequenceType is a partly complete vamsas Vobject - either for a dataset or alignment sequence // so could go in either! String line; Sequence seq = null; diff --git a/src/org/vamsas/test/objects/Core.java b/src/org/vamsas/test/objects/Core.java index f606a19..ffc8a23 100644 --- a/src/org/vamsas/test/objects/Core.java +++ b/src/org/vamsas/test/objects/Core.java @@ -70,7 +70,7 @@ public class Core { System.out.println("VersionEntries.latestVersion()="+VersionEntries.latestVersion()+ ", dict_aa="+SymbolDictionary.STANDARD_AA+", dict_na="+SymbolDictionary.STANDARD_NA); /** - * Test utils and autogenerated object interfaces + * Test utils and autogenerated Vobject interfaces */ VamsasDocument doc = DocumentStuff.newVamsasDocument(new VAMSAS[] { getDemoVamsas() }, diff --git a/src/org/vamsas/test/simpleclient/ArchiveReports.java b/src/org/vamsas/test/simpleclient/ArchiveReports.java index c970552..4d7ac5b 100644 --- a/src/org/vamsas/test/simpleclient/ArchiveReports.java +++ b/src/org/vamsas/test/simpleclient/ArchiveReports.java @@ -4,7 +4,7 @@ import java.io.InputStream; import java.io.PrintStream; import java.io.PrintWriter; -import org.vamsas.client.object; +import org.vamsas.client.Vobject; import org.vamsas.client.simpleclient.VamsasArchiveReader; import org.vamsas.objects.core.Alignment; import org.vamsas.objects.core.AppData; @@ -19,8 +19,8 @@ import org.vamsas.objects.core.VamsasDocument; /** * this class contains static methods for writing info to stdout about a vamsas document * Methods have a 'cascade' switch to indicate if sub-objects should have info printed on them. - * Methods return true or false - indicating if the object was valid or not - * TODO: LATER: propagate true/false return so that an invalid vamsas object invalidates the whole document + * Methods return true or false - indicating if the Vobject was valid or not + * TODO: LATER: propagate true/false return so that an invalid vamsas Vobject invalidates the whole document * @author jimp * */ diff --git a/src/org/vamsas/test/simpleclient/ArchiveWriter.java b/src/org/vamsas/test/simpleclient/ArchiveWriter.java index 7ce8904..1a9bae9 100644 --- a/src/org/vamsas/test/simpleclient/ArchiveWriter.java +++ b/src/org/vamsas/test/simpleclient/ArchiveWriter.java @@ -59,7 +59,7 @@ public class ArchiveWriter { /** * safely copies an appData from one archive to another. * @param darc destination archive - * @param dest destination document object + * @param dest destination document Vobject * @param sarc source archive reader * @param entry application data to be copied from source archive */ @@ -102,7 +102,7 @@ public class ArchiveWriter { /** TODO: LATER: should verify that all ids really are unique in newly merged document. If not then what ? * investigate possibility of having an id translation between appDatas and the core document - * the mapping is stored when an external application performs a merge, but when the owning - * Application accesses the object, the vorba_id is updated to the new one when it writes its + * Application accesses the Vobject, the vorba_id is updated to the new one when it writes its * references in to its appdata again */ if (source.getApplicationDataCount()>0) { -- 1.7.10.2