Author: rozagh
Date: 2012-04-27 13:57:27 -0700 (Fri, 27 Apr 2012)
New Revision: 29031

Modified:
   
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/table/MapGlobalToLocalTableTask.java
Log:
fixes #921 the title to table map is set.

Modified: 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/table/MapGlobalToLocalTableTask.java
===================================================================
--- 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/table/MapGlobalToLocalTableTask.java
      2012-04-27 19:47:35 UTC (rev 29030)
+++ 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/table/MapGlobalToLocalTableTask.java
      2012-04-27 20:57:27 UTC (rev 29031)
@@ -44,13 +44,20 @@
 
                for (final CyNetwork network : allNetworks) {
                        locals.add(network.getDefaultNodeTable().getTitle());
+                       
name2tableMap.put(network.getDefaultNodeTable().getTitle(), 
network.getDefaultNodeTable());
+                       
                        locals.add(network.getDefaultEdgeTable().getTitle());
+                       
name2tableMap.put(network.getDefaultEdgeTable().getTitle(), 
network.getDefaultEdgeTable());
+                       
                        locals.add(network.getDefaultNetworkTable().getTitle());
+                       
name2tableMap.put(network.getDefaultNetworkTable().getTitle(), 
network.getDefaultNetworkTable());
                }
                
                final Set<CyTable> globalTableSet = 
tableManager.getGlobalTables();
-               for (final CyTable table : globalTableSet)
+               for (final CyTable table : globalTableSet){
                        globals.add(table.getTitle());
+                       name2tableMap.put(table.getTitle(), table);
+               }
 
                if (globals.size() == 0)
                        throw new IllegalStateException("No Global Table in 
current session!");
@@ -70,7 +77,6 @@
        }
 
        private void mapTable(final CyTable localTable, final CyTable 
globalTable) {
-
                if (globalTable.getPrimaryKey().getType() != String.class)
                        throw new IllegalStateException("Local table's primary 
key should be type String!");
 

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to