package org.vamsas.objects.utils;
import java.util.Vector;
-import org.vamsas.objects.core.*;
import uk.ac.vamsas.client.ClientHandle;
import uk.ac.vamsas.client.UserHandle;
import uk.ac.vamsas.client.simpleclient.VamsasArchive;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
+import uk.ac.vamsas.objects.core.*;
/**
* Form, accessors and validation for ApplicationData references in
* vamsas document.
* @param doc
* @param test interface implemented by the filter selecting particular AppDatas.
* @param cascade if true only User objects for ApplicationData objects that test.process returned true will be tested.
- * @return set of org.vamsas.objects.core.AppData objects for which test.process returned true
+ * @return set of uk.ac.vamsas.objects.core.AppData objects for which test.process returned true
*/
static public Vector searchAppDatas(VamsasDocument doc, IAppDSearch test, boolean cascade) {
if ((doc!=null) && (doc.getApplicationDataCount()>0)) {
* Searches document appData structure for particular combinations of client and user data
* @param doc the data
* @param user template user data to match against
- * @see AppDataReference.equals(org.vamsas.objects.core.User, uk.ac.vamsas.client.UserHandle)
+ * @see AppDataReference.equals(uk.ac.vamsas.objects.core.User, uk.ac.vamsas.client.UserHandle)
* @param app
- * @see AppDataReference.equals(org.vamsas.objects.core.ApplicationData, uk.ac.vamsas.client.ClientHandle)
+ * @see AppDataReference.equals(uk.ac.vamsas.objects.core.ApplicationData, uk.ac.vamsas.client.ClientHandle)
* @return set of matching client app datas for this client and user combination
*/
static public Vector getUserandApplicationsData(VamsasDocument doc, UserHandle user, ClientHandle app) {
package org.vamsas.objects.utils;
-import org.vamsas.objects.core.*;
import org.vamsas.objects.utils.document.VersionEntries;
+import uk.ac.vamsas.objects.core.*;
+
/**
* various vamsas-client independent helpers
* for creating and manipulating the vamsasDocument Vobject
package org.vamsas.objects.utils;\r
\r
/**\r
- * dict attribute values for glyph symbol sets found in org.vamsas.objects.core.AnnotationElement\r
+ * dict attribute values for glyph symbol sets found in uk.ac.vamsas.objects.core.AnnotationElement\r
* TODO: add validators and multilength symbols.\r
* @author JimP\r
*\r
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.Entry;
-import org.vamsas.objects.core.Provenance;
+
+import uk.ac.vamsas.objects.core.Entry;
+import uk.ac.vamsas.objects.core.Provenance;
public class ProvenanceStuff {
import java.io.OutputStreamWriter;
import java.util.regex.Pattern;
-import org.vamsas.objects.core.AlignmentSequence;
-import org.vamsas.objects.core.Sequence;
-import org.vamsas.objects.core.SequenceType;
+import uk.ac.vamsas.objects.core.AlignmentSequence;
+import uk.ac.vamsas.objects.core.Sequence;
+import uk.ac.vamsas.objects.core.SequenceType;
/**
* @author jimp
import java.util.Vector;
import java.util.regex.Pattern;
-import org.vamsas.objects.core.*;
+import uk.ac.vamsas.objects.core.*;
/**
* @author jimp
* TODO To change the template for this generated type comment go to Window -
* Preferences - Java - Code Style - Code Templates
*/
-public class SeqAln extends org.vamsas.objects.core.Alignment {
+public class SeqAln extends uk.ac.vamsas.objects.core.Alignment {
public static Sequence[] ReadClustalFile(InputStream os) throws Exception {
System.err.println("NOT FULLY IMPLEMENTED!"); // TODO: Finish adapting this method
import java.util.Vector;
import java.util.regex.Pattern;
-import org.vamsas.objects.core.*;
+import uk.ac.vamsas.objects.core.*;
/**
* @author jimp
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.*;
import org.vamsas.objects.utils.*;
import org.vamsas.objects.utils.document.*;
import org.vamsas.test.simpleclient.ArchiveReports;
+import uk.ac.vamsas.objects.core.*;
+
/**
* @author jim
- * test XSD-Java binding classes in org.vamsas.objects.core
+ * test XSD-Java binding classes in uk.ac.vamsas.objects.core
*/
public class Core {
static Log log = LogFactory.getLog(Core.class);
import org.apache.commons.logging.LogFactory;
import org.exolab.castor.xml.MarshalException;
import org.exolab.castor.xml.ValidationException;
-import org.vamsas.objects.core.AppData;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.User;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.objects.utils.AppDataReference;
import org.vamsas.objects.utils.DocumentStuff;
import org.vamsas.objects.utils.ProvenanceStuff;
import uk.ac.vamsas.client.simpleclient.VamsasArchive;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
import uk.ac.vamsas.client.simpleclient.VamsasFile;
+import uk.ac.vamsas.objects.core.AppData;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.User;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* @author jimp
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
public class ArchiveReader {
/**
import java.io.PrintStream;
import java.io.PrintWriter;
-import org.vamsas.objects.core.Alignment;
-import org.vamsas.objects.core.AppData;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.DataSet;
-import org.vamsas.objects.core.Entry;
-import org.vamsas.objects.core.Instance;
-import org.vamsas.objects.core.Provenance;
-import org.vamsas.objects.core.Tree;
-import org.vamsas.objects.core.User;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import uk.ac.vamsas.client.ClientDocument;
import uk.ac.vamsas.client.Vobject;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
+import uk.ac.vamsas.objects.core.Alignment;
+import uk.ac.vamsas.objects.core.AppData;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.DataSet;
+import uk.ac.vamsas.objects.core.Entry;
+import uk.ac.vamsas.objects.core.Instance;
+import uk.ac.vamsas.objects.core.Provenance;
+import uk.ac.vamsas.objects.core.Tree;
+import uk.ac.vamsas.objects.core.User;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.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.
import java.io.InputStream;
import java.io.InputStreamReader;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import uk.ac.vamsas.client.simpleclient.SessionFile;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
import uk.ac.vamsas.client.simpleclient.VamsasFile;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
public class ArchiveStreamReader {
/**
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.VamsasDocument;
import uk.ac.vamsas.client.ClientHandle;
import uk.ac.vamsas.client.simpleclient.FileWatcher;
import uk.ac.vamsas.client.simpleclient.SimpleDocument;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
import uk.ac.vamsas.client.simpleclient.VamsasFile;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* demo of archive watching process - should mimic the clientsfileTest watcher/monitor process.
* @author jimp
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.Entry;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.objects.utils.ProvenanceStuff;
import uk.ac.vamsas.client.IClientAppdata;
import uk.ac.vamsas.client.simpleclient.ClientDocument;
import uk.ac.vamsas.client.simpleclient.VamsasArchive;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
+import uk.ac.vamsas.objects.core.Entry;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
// simple holder to pass to client.
public class ClientDoc extends uk.ac.vamsas.client.ClientDocument {
protected boolean isModified=false;
private Log log = LogFactory.getLog(ClientDoc.class);
protected VamsasDocument doc;
- public org.vamsas.objects.core.VAMSAS[] _VamsasRoots;
+ public uk.ac.vamsas.objects.core.VAMSAS[] _VamsasRoots;
protected VamsasArchive iohandler=null;
protected VamsasArchiveReader reader=null;
private String user=null;
/* (non-Javadoc)
* LATER: decide: this affects the next call to getVamsasRoots()
- * @see uk.ac.vamsas.client.IClientDocument#addVamsasRoot(org.vamsas.objects.core.VAMSAS)
+ * @see uk.ac.vamsas.client.IClientDocument#addVamsasRoot(uk.ac.vamsas.objects.core.VAMSAS)
*/
public void addVamsasRoot(VAMSAS newroot) {
if (doc==null) {
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.User;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.test.objects.Core;
import uk.ac.vamsas.client.simpleclient.Lock;
import uk.ac.vamsas.client.simpleclient.SimpleDocument;
import uk.ac.vamsas.client.simpleclient.VamsasArchiveReader;
import uk.ac.vamsas.client.simpleclient.VamsasFile;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.User;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
public class VamsasArchive {
/**
import javax.swing.JInternalFrame;
-import org.vamsas.objects.core.Entry;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.test.simpleclient.ArchiveClient;
import org.vamsas.test.simpleclient.ClientDoc;
import uk.ac.vamsas.client.simpleclient.FileWatcher;
import uk.ac.vamsas.client.simpleclient.VamsasArchive;
import uk.ac.vamsas.client.simpleclient.VamsasFile;
+import uk.ac.vamsas.objects.core.Entry;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* @author jimp
* @return a base provenance entry used by the VamsasDatastore object to get attributes from. this isn't particularly elegant either.
*/
private Entry baseProvEntry() {
- org.vamsas.objects.core.Entry pentry = new org.vamsas.objects.core.Entry();
+ uk.ac.vamsas.objects.core.Entry pentry = new uk.ac.vamsas.objects.core.Entry();
pentry.setUser(this.getProvenanceUser());
pentry.setApp(this.getClientHandle().getClientName());
pentry.setDate(new org.exolab.castor.types.Date(new java.util.Date()));
\r
package org.vamsas.test.simpleclient.simpleapp;\r
\r
-import org.vamsas.objects.core.*;\r
import org.vamsas.objects.utils.DocumentStuff;\r
import org.vamsas.test.simpleclient.ClientDoc;\r
\r
\r
import uk.ac.vamsas.client.Vobject;\r
import uk.ac.vamsas.client.VorbaId;\r
+import uk.ac.vamsas.objects.core.*;\r
\r
/*\r
* \r
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.VAMSAS;
+
+import uk.ac.vamsas.objects.core.VAMSAS;
/**
* skeleton abstract class to allow client implementations
*/
package uk.ac.vamsas.client;
-import org.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VAMSAS;
/**
*
* 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
+ * (such as uk.ac.vamsas.objects.core.VAMSAS) will
* register all its component objects too.
*
* @param unregistered unregistered vamsas Vobject
import org.exolab.castor.xml.UnmarshalListener;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;
-import org.vamsas.objects.core.VamsasDocument;
+
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* Implements the Vamsas Vobject ID machinery for translating
* between non-volatile XML IDs and Vobject references. Use the
* obtained from the VorbaIdFactory's VorbaId, Vobject.get__last_Hash() pairs (if any)
* @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 Vobject.
+ * @param root the root element's uk.ac.vamsas.objects.core Vobject.
* @return null or {(Object) VamsasDocument Vobject, (Object) Hashtable of Vobject references, (Object) Boolean(sync), (Object) Vector of updated objects in document }
*/
public static Object[] getVamsasObjects(Reader instream,
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.User;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.objects.utils.AppDataReference;
import org.vamsas.test.objects.Core;
import uk.ac.vamsas.client.UserHandle;
import uk.ac.vamsas.client.Vobject;
import uk.ac.vamsas.client.VorbaId;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.User;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* Maintains a collection of vamsas objects, appdatas and states, and provides api for a SimpleClient's client.
/* (non-Javadoc)
* LATER: decide: this affects the next call to getVamsasRoots()
- * @see uk.ac.vamsas.client.IClientDocument#addVamsasRoot(org.vamsas.objects.core.VAMSAS)
+ * @see uk.ac.vamsas.client.IClientDocument#addVamsasRoot(uk.ac.vamsas.objects.core.VAMSAS)
*/
public void addVamsasRoot(VAMSAS newroot) {
if (doc==null) {
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.Entry;
-import org.vamsas.objects.core.LockFile;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.objects.utils.AppDataReference;
import org.vamsas.objects.utils.ProvenanceStuff;
import org.vamsas.objects.utils.document.VersionEntries;
import uk.ac.vamsas.client.InvalidSessionUrnException;
import uk.ac.vamsas.client.SessionHandle;
import uk.ac.vamsas.client.UserHandle;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.Entry;
+import uk.ac.vamsas.objects.core.LockFile;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* @author jimp
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.AppData;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.User;
import org.vamsas.objects.utils.AppDataReference;
import uk.ac.vamsas.client.IClientAppdata;
+import uk.ac.vamsas.objects.core.AppData;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.User;
/**
* @author jimp
* gets appropriate app data for the application, if it exists in this dataset
* Called by every accessor to ensure data has been retrieved from document.
*/
- private void extractAppData(org.vamsas.objects.core.VamsasDocument doc) {
+ private void extractAppData(uk.ac.vamsas.objects.core.VamsasDocument doc) {
if (doc==null) {
log.debug("extractAppData called for null document object");
return;
import java.util.Vector;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.objects.utils.AppDataReference;
import org.vamsas.objects.utils.DocumentStuff;
import org.vamsas.objects.utils.ProvenanceStuff;
import uk.ac.vamsas.client.Vobject;
import uk.ac.vamsas.client.VorbaIdFactory;
import uk.ac.vamsas.client.VorbaXmlBinder;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* Base class for SimpleClient Vamsas Document Object Manipulation
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.vamsas.objects.core.ApplicationData;
-import org.vamsas.objects.core.VAMSAS;
-import org.vamsas.objects.core.VamsasDocument;
import org.vamsas.objects.utils.AppDataReference;
import org.vamsas.objects.utils.DocumentStuff;
import org.vamsas.objects.utils.ProvenanceStuff;
import uk.ac.vamsas.client.Vobject;
import uk.ac.vamsas.client.VorbaIdFactory;
import uk.ac.vamsas.client.VorbaXmlBinder;
+import uk.ac.vamsas.objects.core.ApplicationData;
+import uk.ac.vamsas.objects.core.VAMSAS;
+import uk.ac.vamsas.objects.core.VamsasDocument;
/**
* Class for high-level io and Jar manipulation involved in creating
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
-import org.vamsas.objects.core.LockFileDescriptor;
+import uk.ac.vamsas.objects.core.LockFileDescriptor;
/**
* low level vamsas document management routines