Switched to using pure java Apache Zip implementation
[vamsas.git] / src / uk / ac / vamsas / client / picking / MouseOverMessage.java
index d14dc22..2cb8531 100644 (file)
@@ -20,8 +20,8 @@ public class MouseOverMessage extends Message
                this.vorbaID = vorbaID;\r
                this.position = position;\r
                \r
-               message = "MOUSEOVER_"\r
-                       + "vorbaID=" + vorbaID + "_" + "position=" + position;\r
+               message = "MOUSEOVER\t"\r
+                       + "vorbaID=" + vorbaID + "\t" + "position=" + position;\r
        }\r
        \r
        /**\r
@@ -32,7 +32,30 @@ public class MouseOverMessage extends Message
        MouseOverMessage(String str)\r
                throws Exception\r
        {\r
-               String[] elements = str.split("_");\r
+               message = str;\r
                \r
+               String[] elements = str.split("\t");\r
+               \r
+               for (int i = 0; i < elements.length; i++)\r
+               {\r
+                       if (elements[i].startsWith("vorbaID="))\r
+                               vorbaID = elements[i].substring(8);\r
+                       else if (elements[i].startsWith("position="))\r
+                               position = Integer.parseInt(elements[i].substring(9));\r
+               }\r
        }\r
+       \r
+       /**\r
+        * Returns the VAMSAS object ID associated with this message.\r
+        * @return the VAMSAS object ID associated with this message\r
+        */\r
+       public String getVorbaID()\r
+               { return vorbaID; }\r
+       \r
+       /**\r
+        * Returns the position value associated with this message.\r
+        * @return the position value associated with this message\r
+        */\r
+       public int getPosition()\r
+               { return position; }\r
 }
\ No newline at end of file