-package uk.ac.vamsas.objects.utils;
-
-import java.util.Date;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import uk.ac.vamsas.objects.core.Entry;
-import uk.ac.vamsas.objects.core.Provenance;
-
-public class ProvenanceStuff {
-
- /**
- * stuff for making and doing things with provenance objects.
- */
- static Log log = LogFactory.getLog(ProvenanceStuff.class);
-
- /**
- * @param app TODO
- * @param action
- * text for action entry
- * @return new Provenance entry for ArchiveWriter created docs.
- * TODO: Verify and move to SimpleClient class for provenance handling
- */
- public static Entry newProvenanceEntry(String app, String user, String action) {
- log.debug("Adding ProvenanceEntry("+user+","+action+")");
- Entry e = new Entry();
- e.setApp(app);
- e.setAction(action);
- e.setUser(user);
- e.setDate(new Date());
- return e;
- }
- public static Provenance newProvenance(Entry entry) {
- Provenance list = new Provenance();
- list.addEntry(entry);
- return list;
- }
- public static Provenance newProvenance(String user, String action) {
- return newProvenance(ProvenanceStuff.newProvenanceEntry("vamsasApp:ExampleVamsasClient/alpha", user, action));
- }
- public static Provenance newProvenance(String app, String user, String action) {
- return newProvenance(ProvenanceStuff.newProvenanceEntry(app, user, action));
- }
-
-}
+/*\r
+ * This file is part of the Vamsas Client version 0.1. \r
+ * Copyright 2009 by Jim Procter, Iain Milne, Pierre Marguerite, \r
+ * Andrew Waterhouse and Dominik Lindner.\r
+ * \r
+ * Earlier versions have also been incorporated into Jalview version 2.4 \r
+ * since 2008, and TOPALi version 2 since 2007.\r
+ * \r
+ * The Vamsas Client is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ * \r
+ * The Vamsas Client is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public License\r
+ * along with the Vamsas Client. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package uk.ac.vamsas.objects.utils;\r
+\r
+import java.util.Date;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+\r
+import uk.ac.vamsas.objects.core.Entry;\r
+import uk.ac.vamsas.objects.core.Provenance;\r
+\r
+public class ProvenanceStuff {\r
+\r
+ /**\r
+ * stuff for making and doing things with provenance objects.\r
+ */\r
+ static Log log = LogFactory.getLog(ProvenanceStuff.class);\r
+\r
+ /**\r
+ * @param app\r
+ * TODO\r
+ * @param action\r
+ * text for action entry\r
+ * @return new Provenance entry for ArchiveWriter created docs. TODO: Verify\r
+ * and move to SimpleClient class for provenance handling\r
+ */\r
+ public static Entry newProvenanceEntry(String app, String user, String action) {\r
+ log.debug("Adding ProvenanceEntry(" + user + "," + action + ")");\r
+ Entry e = new Entry();\r
+ e.setApp(app);\r
+ e.setAction(action);\r
+ e.setUser(user);\r
+ e.setDate(new Date());\r
+ return e;\r
+ }\r
+\r
+ public static Provenance newProvenance(Entry entry) {\r
+ Provenance list = new Provenance();\r
+ list.addEntry(entry);\r
+ return list;\r
+ }\r
+\r
+ public static Provenance newProvenance(String user, String action) {\r
+ return newProvenance(ProvenanceStuff.newProvenanceEntry(\r
+ "vamsasApp:ExampleVamsasClient/alpha", user, action));\r
+ }\r
+\r
+ public static Provenance newProvenance(String app, String user, String action) {\r
+ return newProvenance(ProvenanceStuff.newProvenanceEntry(app, user, action));\r
+ }\r
+\r
+}\r