# 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
#
/**
* 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;
}
/**
- * @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.
* 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
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();
*/
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
* @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();
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
*/
/**
* 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;
/**
*
*/
- protected object() {
+ protected Vobject() {
super();
testInstanceForIdField();
}
}
/**
- * 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() {
} 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 {
}
/**
- * 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
}
/**
- * 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() {
}
/**
- * @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.
}
/**
- * @return true if object can have a vorbaId
+ * @return true if Vobject can have a vorbaId
*/
public boolean isRegisterable() {
return registerable;
/**
* 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) {
}
/**
* 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
*/
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 {
for (int i=0,j=fields.length; i<j; i++) {
Class type= fields[i].getFieldType();
if (type.isArray()) {
- if (object[].class.isAssignableFrom(type)) {
+ if (Vobject[].class.isAssignableFrom(type)) {
try {
Object val = fields[i].getHandler().getValue(this);
if (val!=null) {
- object vals[] = (object[]) val;
+ Vobject vals[] = (Vobject[]) val;
for (int k=0, l=vals.length; k<l; k++) {
if (vals[k].__vorba==null)
vals[k].__vorba = __vorba; // propagate IVorbaIdFactory
}
}
} else
- if (object.class.isAssignableFrom(type)) {
+ if (Vobject.class.isAssignableFrom(type)) {
try {
FieldHandler fh = fields[i].getHandler();
- object rf = null;
+ Vobject rf = null;
if (fh != null) {
Object fval = fh.getValue(this);
if (fval!=null) {
if (fval.getClass().isArray()) {
- //if (object[].class.isAssignableFrom(type)) {
+ //if (Vobject[].class.isAssignableFrom(type)) {
try {
- object vals[] = (object[]) fval;
+ Vobject vals[] = (Vobject[]) fval;
for (int k=0, l=vals.length; k<l; k++) {
if (vals[k].__vorba==null)
vals[k].__vorba = __vorba; // propagate IVorbaIdFactory
}
//}
} else {
- rf = (object) fval;
+ rf = (Vobject) fval;
log.debug("Got value for "+fields[i].getFieldName());
}
}
if (fgetmeth!=null) {
Object fval = fgetmeth.invoke(this,null);
if (fval!=null)
- rf = (object) fval;
+ rf = (Vobject) fval;
} else {
log.warn("Couldn't find "+this.getClass().getName()+"."+methname);
}
package org.vamsas.client;
/**
- * The unique reference id for a Vamsas document object,
- * used by applications to refer to the vamsas object
+ * The unique reference id for a Vamsas document Vobject,
+ * used by applications to refer to the vamsas Vobject
* within their own data space in the vamsas document.
* TODO: decide if VorbaId should contain a reference
* to either the IVorbaIdFactory that made it or the
/**
*
* @param vorbaObject the source of vorba Ids
- * @param vobject the object to be registered with a new vorba id
+ * @param vobject the Vobject to be registered with a new vorba id
* @return
*/
- protected static VorbaId newId(IVorbaIdFactory vorbaObject, object vobject) {
+ protected static VorbaId newId(IVorbaIdFactory vorbaObject, Vobject vobject) {
// Make unique id from appSpace info in vorbaObject
synchronized (vorbaObject) {
return vorbaObject.makeVorbaId(vobject);
* @return valid VorbaId for session, or null if VorbaIdFactory not configured
* correctly.
*/
- public abstract VorbaId makeVorbaId(object vobject);
+ public abstract VorbaId makeVorbaId(Vobject vobject);
/**
* internal method to access the protected VorbaId object constructor
return VorbaId.newId(id);
}
/**
- * Called by VorbaXmlBinder so the record of newly unmarshalled object Ids
+ * Called by VorbaXmlBinder so the record of newly unmarshalled Vobject Ids
* is accessible to the Document's VorbaIdFactory instance.
* @param idtable
*/
import org.exolab.castor.xml.ValidationException;
import org.vamsas.objects.core.VamsasDocument;
/**
- * Implements the Vamsas object ID machinery for translating
- * between non-volatile XML IDs and object references. Use the
+ * Implements the Vamsas Vobject ID machinery for translating
+ * between non-volatile XML IDs and Vobject references. Use the
* marshalling and unmarshalling methods in this class in order
* to avoid validation exceptions when marshalling new objects
* into the vamsas document.
/*
* Check if the object has an 'id' field - if it does, copy the value into
- * the VorbaId field of object, and add the object to the VorbaId hash.
+ * the VorbaId field of Vobject, and add the Vobject to the VorbaId hash.
*
* @see org.exolab.castor.xml.UnmarshalListener#unmarshalled(java.lang.Object)
*/
public void unmarshalled(Object newobj) {
- if (newobj instanceof object) {
- object nobj = (object) newobj;
+ if (newobj instanceof Vobject) {
+ Vobject nobj = (Vobject) newobj;
nobj.set__stored_in_document(true);
Field fd = null;
try {
sync=false; // document is out of sync - ids have been created.
java.util.Iterator newobj = unrefed.listIterator();
while (newobj.hasNext()) {
- object o = (object) newobj.next();
+ Vobject o = (Vobject) newobj.next();
// forces registration and id field update.
VorbaId id = o.getVorbaId();
if (!objrefs.containsKey(id)) {
return sync;
}
/**
- * Unmarshals a vamsasDocument object from a stream, registers
+ * Unmarshals a vamsasDocument Vobject from a stream, registers
* unregistered objects, records existing VorbaIds, and completes
- * the org.vamsas.client.object housekeeping fields.
+ * the org.vamsas.client.Vobject housekeeping fields.
* For a valid unmarshalling, the array of returned objects also includes
* a <return>sync</return> parameter which is true if new VorbaIds
* were created. If sync is false, then the caller should ensure that the
* 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) {
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)};
}
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;
*
* @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;
}
*
* @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;
}
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.
}
}
/*
* (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; i<k; i++)
}
/* (non-Javadoc)
- * @see org.vamsas.client.IClientDocument#registerObject(org.vamsas.client.object)
+ * @see org.vamsas.client.IClientDocument#registerObject(org.vamsas.client.Vobject)
*/
- public VorbaId registerObject(object unregistered) {
- // TODO: add provenance stuff to newly registered object
+ public VorbaId registerObject(Vobject unregistered) {
+ // TODO: add provenance stuff to newly registered Vobject
return _registerObject(unregistered);
}
/* (non-Javadoc)
import org.vamsas.client.UserHandle;
import org.vamsas.client.VorbaId;
import org.vamsas.client.VorbaIdFactory;
-import org.vamsas.client.object;
+import org.vamsas.client.Vobject;
import org.vamsas.objects.utils.document.VersionEntries;
import java.util.Hashtable;
extantids=new Hashtable();
}
/**
- * values for keys in this hash can be used to reference the org.vamsas.client.object instance for the VorbaId string.
+ * values for keys in this hash can be used to reference the org.vamsas.client.Vobject instance for the VorbaId string.
* @return the hash of all VorbaIds
*/
protected Hashtable getVorbaIdHash() {
/* (non-Javadoc)
* @see org.vamsas.client.VorbaIdFactory#makeVorbaId()
*/
- public VorbaId makeVorbaId(object vobject) {
+ public VorbaId makeVorbaId(Vobject vobject) {
if (session==null)
- throw new Error("makeVorbaId called on improperly initialised IdFactory object!");
+ throw new Error("makeVorbaId called on improperly initialised IdFactory Vobject!");
String newidstring;
do {
if (sequence>0) {
}
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;
}
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;
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)
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;
* @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) {
* @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);
}
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.
}
}
/**
- * 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.
*
* @version $Revision$ $Date$
*/
-public class Alignment extends org.vamsas.client.object
+public class Alignment extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class AlignmentAnnotations extends org.vamsas.client.object
+public class AlignmentAnnotations extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class AnnotationElement extends org.vamsas.client.object
+public class AnnotationElement extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class AppData extends org.vamsas.client.object
+public class AppData extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class DataSet extends org.vamsas.client.object
+public class DataSet extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class DataSetAnnotations extends org.vamsas.client.object
+public class DataSetAnnotations extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class DbRef extends org.vamsas.client.object
+public class DbRef extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class Entry extends org.vamsas.client.object
+public class Entry extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class LockFile extends org.vamsas.client.object
+public class LockFile extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class Newick extends org.vamsas.client.object
+public class Newick extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class Provenance extends org.vamsas.client.object
+public class Provenance extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class SequenceType extends org.vamsas.client.object
+public class SequenceType extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class Tree extends org.vamsas.client.object
+public class Tree extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class VAMSAS extends org.vamsas.client.object
+public class VAMSAS extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*
* @version $Revision$ $Date$
*/
-public class VamsasDocument extends org.vamsas.client.object
+public class VamsasDocument extends org.vamsas.client.Vobject
implements java.io.Serializable
{
*/
interface IAppDSearch {
/**
- * process the appData object d
+ * process the appData Vobject d
* @param d
* @return true if appData should be collected
*/
/**
* various vamsas-client independent helpers
- * for creating and manipulating the vamsasDocument object
+ * for creating and manipulating the vamsasDocument Vobject
* @author jimp
*
*/
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)
}
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);
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());
}
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;
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() },
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;
/**
* 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
*
*/
/**
* 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
*/
/** 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) {