| 
     
      
      
      From: <ha...@us...> - 2008-03-26 14:43:27
      
     
   | 
Revision: 1951
          http://cogkit.svn.sourceforge.net/cogkit/?rev=1951&view=rev
Author:   hategan
Date:     2008-03-26 07:43:13 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
updated code that relies on identity.getValue being a long
Modified Paths:
--------------
    trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java
    trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java
    trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java
    trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java
    trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java
    trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java	2008-03-26 14:42:20 UTC (rev 1950)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java	2008-03-26 14:43:13 UTC (rev 1951)
@@ -330,6 +330,6 @@
     }
 
     public int hashCode() {
-        return (int) this.id.getValue();
+        return this.id.hashCode();
     }
 }
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java	2008-03-26 14:42:20 UTC (rev 1950)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java	2008-03-26 14:43:13 UTC (rev 1951)
@@ -241,8 +241,7 @@
             if (this.sourceResource != null) {
                 if (this.sourceResource.isDirectory(spec.getSource())) {
                     if (localDestination == null) {
-                        localDestination = File.createTempFile(Long
-                                .toString(this.task.getIdentity().getValue()),
+                        localDestination = File.createTempFile(this.task.getIdentity().getValue(),
                                 null);
                         localDestination.delete();
                         localDestination.mkdir();
@@ -264,8 +263,7 @@
                 }
                 else {
                     if (localDestination == null) {
-                        localDestination = File.createTempFile(Long
-                                .toString(this.task.getIdentity().getValue()),
+                        localDestination = File.createTempFile(this.task.getIdentity().getValue(),
                                 null);
                     }
                     if (logger.isDebugEnabled()) {
@@ -284,8 +282,8 @@
             else {
                 if (localDestination == null) {
                     localDestination = File
-                            .createTempFile(Long.toString(this.task
-                                    .getIdentity().getValue()), null);
+                            .createTempFile(this.task
+                                    .getIdentity().getValue(), null);
                 }
                 transferWithHandler(service.getProvider(), service,
                         LOCAL_SERVICE, spec.getSource(), localDestination);
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java	2008-03-26 14:42:20 UTC (rev 1950)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java	2008-03-26 14:43:13 UTC (rev 1951)
@@ -43,8 +43,7 @@
         TaskGraph xmlTaskGraph)
         throws MarshalException {
         // set identity
-        xmlTaskGraph.setIdentity(
-            Long.toString(taskGraph.getIdentity().getValue()));
+        xmlTaskGraph.setIdentity(taskGraph.getIdentity().getValue());
 
         //set name
         String name = taskGraph.getName();
@@ -194,8 +193,8 @@
                 ExecutableObject from = pair.getFrom();
                 ExecutableObject to = pair.getTo();
                 Dependency xmlDependency = new Dependency();
-                xmlDependency.setFrom(Long.toString(from.getIdentity().getValue()));
-                xmlDependency.setTo(Long.toString(to.getIdentity().getValue()));
+                xmlDependency.setFrom(from.getIdentity().getValue());
+                xmlDependency.setTo(to.getIdentity().getValue());
                 xmlDependencyList.addDependency(xmlDependency);
             }
 
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java	2008-03-26 14:42:20 UTC (rev 1950)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java	2008-03-26 14:43:13 UTC (rev 1951)
@@ -45,7 +45,7 @@
         String xmlIdentity = xmlTaskGraph.getIdentity();
         if (xmlIdentity != null && xmlIdentity.length() > 0) {
             Identity identity = new IdentityImpl();
-            identity.setValue(Long.parseLong(xmlIdentity.trim()));
+            identity.setValue(xmlIdentity.trim());
             taskGraph.setIdentity(identity);
         }
 
@@ -144,10 +144,11 @@
             Dependency xmlDependency = (Dependency) en.nextElement();
 
             Identity from = new IdentityImpl();
-            from.setValue(Long.parseLong(xmlDependency.getFrom().trim()));
+            //this obviously ignores the namespace
+            from.setValue(xmlDependency.getFrom().trim());
 
             Identity to = new IdentityImpl();
-            to.setValue(Long.parseLong(xmlDependency.getTo().trim()));
+            to.setValue(xmlDependency.getTo().trim());
 
             dependency.add(taskGraph.get(from), taskGraph.get(to));
         }
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java	2008-03-26 14:42:20 UTC (rev 1950)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java	2008-03-26 14:43:13 UTC (rev 1951)
@@ -40,7 +40,7 @@
             org.globus.cog.abstraction.interfaces.Task task, Task xmlTask)
             throws MarshalException {
         //	set the task identity
-        xmlTask.setIdentity(Long.toString(task.getIdentity().getValue()));
+        xmlTask.setIdentity(task.getIdentity().getValue());
 
         // set the task name
         String name = task.getName();
@@ -108,8 +108,8 @@
             org.globus.cog.abstraction.interfaces.Service service = (org.globus.cog.abstraction.interfaces.Service) iterator
                     .next();
             Service xmlService = new Service();
-            xmlService.setIdentity(Long.toString(service.getIdentity()
-                    .getValue()));
+            xmlService.setIdentity(service.getIdentity()
+                    .getValue());
 
             String sname = service.getName();
             if (sname != null && sname.length() > 0) {
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java	2008-03-26 14:42:20 UTC (rev 1950)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java	2008-03-26 14:43:13 UTC (rev 1951)
@@ -52,7 +52,7 @@
         String xmlIdentity = xmlTask.getIdentity();
         if (xmlIdentity != null && xmlIdentity.length() > 0) {
             Identity identity = new IdentityImpl();
-            identity.setValue(Long.parseLong(xmlIdentity.trim()));
+            identity.setValue(xmlIdentity.trim());
             task.setIdentity(identity);
         }
 
@@ -119,7 +119,7 @@
             org.globus.cog.abstraction.interfaces.Service service = new ServiceImpl();
 
             Identity identity = new IdentityImpl();
-            identity.setValue(Long.parseLong(xmlService.getIdentity()));
+            identity.setValue(xmlService.getIdentity());
             service.setIdentity(identity);
 
             service.setName(xmlService.getName());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |