Author: jgao
Date: 2011-10-29 06:59:22 -0700 (Sat, 29 Oct 2011)
New Revision: 27337

Modified:
   csplugins/trunk/soc/jgao/IDMapping/resources/plugin.props
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/CyThesaurusPlugin.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientImplTunables.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientManager.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/CyThesaurusNamespace.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/IDMappingSourceConfigDialog.java
Log:
cythesaurus version 1.3

Modified: csplugins/trunk/soc/jgao/IDMapping/resources/plugin.props
===================================================================
--- csplugins/trunk/soc/jgao/IDMapping/resources/plugin.props   2011-10-29 
01:04:54 UTC (rev 27336)
+++ csplugins/trunk/soc/jgao/IDMapping/resources/plugin.props   2011-10-29 
13:59:22 UTC (rev 27337)
@@ -13,7 +13,7 @@
 pluginDescription=Provides utilities for mapping attributes of source ID types 
to new attributes of destination ID types. <a 
href="http://www.cytoscape.org/cgi-bin/moin.cgi/CyThesaurus_Plugin";>Click for 
more information</a>.
 
 # Plugin version number, this must be two numbers separated by a decimlal.  
Ex. 0.2, 14.03
-pluginVersion=1.20
+pluginVersion=1.30
 
 # Compatible Cytoscape version. If there are more than one version, seperate 
by ",".
 cytoscapeVersion=2.8
@@ -28,4 +28,4 @@
 
 # List of authors.  Note each author and institution pair are separated by a : 
(colon)
 # each additional author institution pair must be separated from other pairs 
bye a ; (semicolon)
-pluginAuthorsInstitutions=Jianjiong Gao:U. of Missouri
+pluginAuthorsInstitutions=Jianjiong Gao:MSKCC

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/CyThesaurusPlugin.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/CyThesaurusPlugin.java
  2011-10-29 01:04:54 UTC (rev 27336)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/CyThesaurusPlugin.java
  2011-10-29 13:59:22 UTC (rev 27337)
@@ -82,11 +82,47 @@
 
         Cytoscape.getDesktop().getCyMenus().getOperationsMenu()
                         .add(new IDMappingAction());
+        
+//        Cytoscape.getDesktop().getCyMenus().getOperationsMenu()
+//                        .add(new IDMappingTestAction());
 
 //        Cytoscape.getDesktop().getCyMenus().getOperationsMenu()
 //                        .add(new 
CyThesurrusServiceAttributeBasedIDMappingAction());
     }
+    
+    
 
+    final class IDMappingTestAction extends CytoscapeAction {
+
+        public IDMappingTestAction() {
+            super("CyThesaurus test");
+        }
+
+        /**
+         * This method is called when the user selects the menu item.
+         */
+        @Override
+        public void actionPerformed(final ActionEvent ae) {
+            java.util.List<String> nodeIds = new java.util.ArrayList<String>();
+            for (cytoscape.CyNode cn : (java.util.List<cytoscape.CyNode>) 
cytoscape.Cytoscape.getCurrentNetwork().nodesList()) {
+                nodeIds.add(cn.getIdentifier());
+            }
+            Map<String, Object> args = new java.util.HashMap<String, Object>();
+            args.put("sourceid", nodeIds);
+            args.put("sourcetype", "HGNC");
+            args.put("targettype", "Ensembl Human");
+            cytoscape.command.CyCommandResult result = null;
+            try {
+                result = cytoscape.command.CyCommandManager.execute(
+                        "idmapping", "general mapping", args);
+                System.out.println("message:"+result.getMessages().get(0));
+            } catch (Exception e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+    }
+
     private void addListeners() {
         PropertyChangeSupport pcs = Cytoscape.getPropertyChangeSupport();
 

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientImplTunables.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientImplTunables.java
 2011-10-29 01:04:54 UTC (rev 27336)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientImplTunables.java
 2011-10-29 13:59:22 UTC (rev 27337)
@@ -226,7 +226,8 @@
                     }
                 });
 
-                if (executor.awaitTermination(1, TimeUnit.SECONDS)) {
+                //TODO: how to set waiting time?
+                if (executor.awaitTermination(5, TimeUnit.SECONDS)) {
                     executor.shutdown();
                 }
 

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientManager.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientManager.java
      2011-10-29 01:04:54 UTC (rev 27336)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientManager.java
      2011-10-29 13:59:22 UTC (rev 27337)
@@ -588,9 +588,9 @@
                                 if (spt) {
                                     List<DataSourceWrapper> dsws = new 
ArrayList<DataSourceWrapper>(2);
                                     dsws.add(DataSourceWrapper.getInstance(
-                                        src.getFullName(), 
DataSourceWrapper.DsAttr.DATASOURCE));
+                                        DataSourceUtil.getName(src), 
DataSourceWrapper.DsAttr.DATASOURCE));
                                     dsws.add(DataSourceWrapper.getInstance(
-                                        tgt.getFullName(), 
DataSourceWrapper.DsAttr.DATASOURCE));
+                                        DataSourceUtil.getName(tgt), 
DataSourceWrapper.DsAttr.DATASOURCE));
                                     supportedMapping.add(dsws);
                                 }
                             }

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/CyThesaurusNamespace.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/CyThesaurusNamespace.java
       2011-10-29 01:04:54 UTC (rev 27336)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/CyThesaurusNamespace.java
       2011-10-29 13:59:22 UTC (rev 27337)
@@ -198,7 +198,7 @@
         if (command.equals(ADD_RESOURCE))
             return addResource(command, args);
         if (command.equals(REMOVE_RESOURCE))
-            removeResource(command, args);
+            return removeResource(command, args);
         if (command.equals(SELECT_RESOURCE))
             return selectResource(command, args);
         if (command.equals(DESELECT_RESOURCE))

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/IDMappingSourceConfigDialog.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/IDMappingSourceConfigDialog.java
     2011-10-29 01:04:54 UTC (rev 27336)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/IDMappingSourceConfigDialog.java
     2011-10-29 13:59:22 UTC (rev 27337)
@@ -38,6 +38,7 @@
 import csplugins.id.mapping.IDMapperClient;
 import csplugins.id.mapping.IDMapperClientManager;
 
+import csplugins.id.mapping.util.DataSourceUtil;
 import cytoscape.task.Task;
 import cytoscape.task.TaskMonitor;
 import cytoscape.task.ui.JTaskConfig;
@@ -414,7 +415,7 @@
             }
             desc.append("\t");
 
-            String fullName = dataSource.getFullName();
+            String fullName = DataSourceUtil.getName(dataSource);
             if (fullName!=null) {
                 desc.append(fullName);
             }

-- 
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