applied LGPLv3 and source code formatting.
[vamsas.git] / src / uk / ac / vamsas / client / Vobjhash.java
index 1b258dc..6052faf 100644 (file)
@@ -1,35 +1,65 @@
+/*\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.client;\r
 \r
 /**\r
- * Holds information about Vobj instances that is held over between different writes to the document.\r
- * Currently records the LhashValue obtained from Vobject\r
+ * Holds information about Vobj instances that is held over between different\r
+ * writes to the document. Currently records the LhashValue obtained from\r
+ * Vobject\r
+ * \r
  * @author JimP\r
- *\r
+ * \r
  */\r
 public class Vobjhash {\r
-  private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Vobjhash.class); \r
-  long  hashvalue;\r
+  private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory\r
+      .getLog(Vobjhash.class);\r
+\r
+  long hashvalue;\r
+\r
   /**\r
    * creates a record of the hash value for a vamsas document object\r
+   * \r
    * @param tobemarshalled\r
    */\r
   public Vobjhash(Vobject tobemarshalled) {\r
     tobemarshalled.doHash();\r
     hashvalue = tobemarshalled.get__last_hash();\r
     if (log.isDebugEnabled())\r
-      log.debug(tobemarshalled.getVorbaId()+":"+hashvalue);\r
+      log.debug(tobemarshalled.getVorbaId() + ":" + hashvalue);\r
   }\r
+\r
   /**\r
-   * compares the old hash value with the unmarshalled object's most recently computed hash value and updates internal record.\r
+   * compares the old hash value with the unmarshalled object's most recently\r
+   * computed hash value and updates internal record.\r
+   * \r
    * @param unmarshalled\r
    * @return true if the hash values differ\r
    */\r
   public boolean isUpdated(Vobject unmarshalled) {\r
     long oldhash = hashvalue;\r
     unmarshalled.doHash();\r
-    hashvalue=unmarshalled.get__last_hash();\r
-    if (log.isDebugEnabled() && oldhash!=hashvalue)\r
-      log.debug(" has changed."+unmarshalled.getVorbaId());\r
-    return oldhash!=hashvalue;\r
+    hashvalue = unmarshalled.get__last_hash();\r
+    if (log.isDebugEnabled() && oldhash != hashvalue)\r
+      log.debug(" has changed." + unmarshalled.getVorbaId());\r
+    return oldhash != hashvalue;\r
   }\r
 }\r