1 package uk.ac.vamsas.objects.utils;
5 import org.apache.commons.logging.Log;
6 import org.apache.commons.logging.LogFactory;
8 import uk.ac.vamsas.objects.core.Entry;
9 import uk.ac.vamsas.objects.core.Provenance;
11 public class ProvenanceStuff {
14 * stuff for making and doing things with provenance objects.
16 static Log log = LogFactory.getLog(ProvenanceStuff.class);
21 * text for action entry
22 * @return new Provenance entry for ArchiveWriter created docs.
23 * TODO: Verify and move to SimpleClient class for provenance handling
25 public static Entry newProvenanceEntry(String app, String user, String action) {
26 log.debug("Adding ProvenanceEntry("+user+","+action+")");
27 Entry e = new Entry();
31 e.setDate(new org.exolab.castor.types.Date(new Date()));
34 public static Provenance newProvenance(Entry entry) {
35 Provenance list = new Provenance();
39 public static Provenance newProvenance(String user, String action) {
40 return newProvenance(ProvenanceStuff.newProvenanceEntry("vamsasApp:ExampleVamsasClient/alpha", user, action));
42 public static Provenance newProvenance(String app, String user, String action) {
43 return newProvenance(ProvenanceStuff.newProvenanceEntry(app, user, action));