Author: jgao
Date: 2011-10-10 13:50:23 -0700 (Mon, 10 Oct 2011)
New Revision: 27115

Added:
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceUtil.java
Modified:
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.bio.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.rdb.construct.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.rdb.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.biomart.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.bridgerest.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.cronos.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.picr.jar
   csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.synergizer.jar
   
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/service/IDMappingServiceSuppport.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.form
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/SourceAttributeSelectionTable.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/TargetAttributeSelectionTable.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceWrapper.java
   
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/XrefWrapper.java
Log:
CyThesaurus: new bridgedb libs and bug fixes

Modified: csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.bio.jar
===================================================================
(Binary files differ)

Modified: csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.jar
===================================================================
(Binary files differ)

Modified: csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.rdb.construct.jar
===================================================================
(Binary files differ)

Modified: csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.rdb.jar
===================================================================
(Binary files differ)

Modified: 
csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.biomart.jar
===================================================================
(Binary files differ)

Modified: 
csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.bridgerest.jar
===================================================================
(Binary files differ)

Modified: 
csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.cronos.jar
===================================================================
(Binary files differ)

Modified: 
csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.picr.jar
===================================================================
(Binary files differ)

Modified: 
csplugins/trunk/soc/jgao/IDMapping/lib/org.bridgedb.webservice.synergizer.jar
===================================================================
(Binary files differ)

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-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientImplTunables.java
 2011-10-10 20:50:23 UTC (rev 27115)
@@ -270,12 +270,12 @@
             return;
         }
 
-        for (DataSource ds : dss) {
-            if (ds.getFullName()==null) {
-                String sysCode = ds.getSystemCode();
-                DataSource.register(sysCode, sysCode);
-            }
-        }
+//        for (DataSource ds : dss) {
+//            if (ds.getFullName()==null) {
+//                String sysCode = ds.getSystemCode();
+//                DataSource.register(sysCode, sysCode);
+//            }
+//        }
     }
     
     public String getConnectionString() {

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-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/IDMapperClientManager.java
      2011-10-10 20:50:23 UTC (rev 27115)
@@ -36,6 +36,7 @@
 package csplugins.id.mapping;
 
 import csplugins.id.mapping.util.BridgeRestUtil;
+import csplugins.id.mapping.util.DataSourceUtil;
 import csplugins.id.mapping.util.DataSourceWrapper;
 
 import cytoscape.CytoscapeInit;
@@ -562,7 +563,7 @@
                     if (srcs!=null) {
                         for (DataSource ds : srcs) {
                             srcTypes.add(DataSourceWrapper.getInstance(
-                                    ds.getFullName(), 
DataSourceWrapper.DsAttr.DATASOURCE));
+                                    DataSourceUtil.getName(ds), 
DataSourceWrapper.DsAttr.DATASOURCE));
                         }
                     }
 
@@ -570,7 +571,7 @@
                     if (tgts!=null) {
                         for (DataSource ds : tgts) {
                             tgtTypes.add(DataSourceWrapper.getInstance(
-                                    ds.getFullName(), 
DataSourceWrapper.DsAttr.DATASOURCE));
+                                    DataSourceUtil.getName(ds), 
DataSourceWrapper.DsAttr.DATASOURCE));
                         }
                     }
 

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-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/CyThesaurusNamespace.java
       2011-10-10 20:50:23 UTC (rev 27115)
@@ -38,6 +38,7 @@
 import csplugins.id.mapping.ui.IDMappingSourceConfigDialog;
 import csplugins.id.mapping.ui.CyThesaurusDialog;
 import csplugins.id.mapping.AttributeBasedIDMappingImpl;
+import csplugins.id.mapping.util.DataSourceUtil;
 import csplugins.id.mapping.util.DataSourceWrapper;
 import csplugins.id.mapping.util.IDMapperWrapper;
 import csplugins.id.mapping.util.XrefWrapper;
@@ -771,7 +772,7 @@
             Set<DataSource> dss = DataSourcePatterns.getDataSourceMatches(id);
             dss.retainAll(selectedDss);
             for (DataSource ds : dss)
-                types.add(ds.getFullName());
+                types.add(DataSourceUtil.getName(ds));
         }
 
         result.addResult(types);

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/IDMappingServiceSuppport.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/IDMappingServiceSuppport.java
   2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/service/IDMappingServiceSuppport.java
   2011-10-10 20:50:23 UTC (rev 27115)
@@ -41,6 +41,7 @@
 import csplugins.id.mapping.IDMapperClient;
 import csplugins.id.mapping.IDMapperClientImplTunables;
 import csplugins.id.mapping.IDMapperClientManager;
+import csplugins.id.mapping.util.DataSourceUtil;
 import csplugins.id.mapping.util.DataSourceWrapper;
 
 import csplugins.id.mapping.ui.CyThesaurusDialog;
@@ -401,13 +402,13 @@
 
         Set<String> srcTypes = new HashSet();
         for(DataSource ds : srcDataSources) {
-            srcTypes.add(ds.getFullName());
+            srcTypes.add(DataSourceUtil.getName(ds));
         }
         content.put(SOURCE_ID_TYPE, srcTypes);
 
         Set<String> tgtTypes = new HashSet();
         for(DataSource ds : tgtDataSources) {
-            tgtTypes.add(ds.getFullName());
+            tgtTypes.add(DataSourceUtil.getName(ds));
         }
         content.put(TARGET_ID_TYPE, tgtTypes);
 
@@ -477,7 +478,7 @@
         for (String id : srcIDs) {
             Set<DataSource> dss = DataSourcePatterns.getDataSourceMatches(id);
             for (DataSource ds : dss)
-                types.add(ds.getFullName());
+                types.add(DataSourceUtil.getName(ds));
         }
 
         Map content = new HashMap();
@@ -627,9 +628,9 @@
             } else {
                 Set<String> supportedSrcTypes = new 
HashSet(srcDataSources.size());
                 for (DataSource ds : srcDataSources) {
-                    String fullName = ds.getFullName();
+                    String fullName = DataSourceUtil.getName(ds);
                     if (fullName!=null) {
-                        supportedSrcTypes.add(ds.getFullName());
+                        supportedSrcTypes.add(DataSourceUtil.getName(ds));
                     } else {
                         // TODO: how to deal?
                     }
@@ -637,9 +638,9 @@
 
                 Set<String> supportedTgtTypes = new 
HashSet(tgtDataSources.size());
                 for (DataSource ds : tgtDataSources) {
-                    String fullName = ds.getFullName();
+                    String fullName = DataSourceUtil.getName(ds);
                     if (fullName!=null) {
-                        supportedTgtTypes.add(ds.getFullName());
+                        supportedTgtTypes.add(DataSourceUtil.getName(ds));
                     } else {
                         // TODO: how to deal?
                     }

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.form
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.form
       2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.form
       2011-10-10 20:50:23 UTC (rev 27115)
@@ -293,9 +293,7 @@
           <SubComponents>
             <Component class="javax.swing.JButton" name="rightButton">
               <Properties>
-                <Property name="icon" type="javax.swing.Icon" 
editor="org.netbeans.modules.form.editors2.IconEditor">
-                  <Image iconType="3" name="/images/right16.gif"/>
-                </Property>
+                <Property name="text" type="java.lang.String" value="&gt;"/>
                 <Property name="enabled" type="boolean" value="false"/>
               </Properties>
               <AuxValues>
@@ -304,9 +302,7 @@
             </Component>
             <Component class="javax.swing.JButton" name="leftButton">
               <Properties>
-                <Property name="icon" type="javax.swing.Icon" 
editor="org.netbeans.modules.form.editors2.IconEditor">
-                  <Image iconType="3" name="/images/left16.gif"/>
-                </Property>
+                <Property name="text" type="java.lang.String" value="&lt;"/>
                 <Property name="enabled" type="boolean" value="false"/>
               </Properties>
               <AuxValues>

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.java
       2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/CyThesaurusDialog.java
       2011-10-10 20:50:23 UTC (rev 27115)
@@ -298,7 +298,7 @@
 
         lrButtonPanel.setLayout(new java.awt.GridLayout(0, 1, 0, 2));
 
-        rightButton.setIcon(new 
javax.swing.ImageIcon(getClass().getResource("/images/right16.gif"))); // NOI18N
+        rightButton.setText(">");
         rightButton.setEnabled(false);
         rightButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -333,7 +333,7 @@
         });
         lrButtonPanel.add(rightButton);
 
-        leftButton.setIcon(new 
javax.swing.ImageIcon(getClass().getResource("/images/left16.gif"))); // NOI18N
+        leftButton.setText("<");
         leftButton.setEnabled(false);
         leftButton.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/SourceAttributeSelectionTable.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/SourceAttributeSelectionTable.java
   2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/SourceAttributeSelectionTable.java
   2011-10-10 20:50:23 UTC (rev 27115)
@@ -41,6 +41,7 @@
 import cytoscape.data.CyAttributes;
 
 import csplugins.id.mapping.IDMapperClientManager;
+import csplugins.id.mapping.util.DataSourceUtil;
 import csplugins.id.mapping.util.DataSourceWrapper;
 
 import giny.model.Node;
@@ -239,7 +240,7 @@
         for (String id : srcIds) {
             Set<DataSource> dss = DataSourcePatterns.getDataSourceMatches(id);
             for (DataSource ds : dss) {
-                DataSourceWrapper dsw = 
DataSourceWrapper.getInstance(ds.getFullName(),
+                DataSourceWrapper dsw = 
DataSourceWrapper.getInstance(DataSourceUtil.getName(ds),
                         DataSourceWrapper.DsAttr.DATASOURCE, false);
                 if (dsw!=null && supportedIDType.contains(dsw)) {
                     result.add(dsw);

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/TargetAttributeSelectionTable.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/TargetAttributeSelectionTable.java
   2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/ui/TargetAttributeSelectionTable.java
   2011-10-10 20:50:23 UTC (rev 27115)
@@ -234,6 +234,9 @@
             if (attr.length()==0) {
                 DataSourceWrapper dsw = (DataSourceWrapper)idTypeComboBoxes
                             .get(row).getSelectedItem();
+                if (dsw==null) {
+                    System.err.println();
+                }
                 attr = dsw.toString();
 
                 if (usedName.contains(attr)) {

Added: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceUtil.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceUtil.java
                                (rev 0)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceUtil.java
        2011-10-10 20:50:23 UTC (rev 27115)
@@ -0,0 +1,55 @@
+/*
+ Copyright (c) 2006, 2007, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications.  In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage.  See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package csplugins.id.mapping.util;
+
+import org.bridgedb.DataSource;
+
+/**
+ *
+ * @author jgao
+ */
+public final class DataSourceUtil {
+    private DataSourceUtil() {}
+    
+    public static String getName(DataSource ds) {
+        if (ds==null) {
+            return null;
+        }
+        
+        String name = ds.getFullName();
+        return name!=null ? name : ds.getSystemCode();
+    }
+}

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceWrapper.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceWrapper.java
     2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/DataSourceWrapper.java
     2011-10-10 20:50:23 UTC (rev 27115)
@@ -100,6 +100,9 @@
                     attributeWrappers.put(value, wrapper);
                 }
             }
+            
+            if (wrapper==null)
+                return null;
 
             return wrapper;
         }
@@ -123,6 +126,8 @@
         }
 
         public int compareTo(DataSourceWrapper dsw) {
+            if(dsw==null)
+                return 1;
             if (da != dsw.da)
                 return da==DsAttr.DATASOURCE?-1:1;
             return value.compareTo(dsw.value);

Modified: 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/XrefWrapper.java
===================================================================
--- 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/XrefWrapper.java
   2011-10-08 21:09:00 UTC (rev 27114)
+++ 
csplugins/trunk/soc/jgao/IDMapping/src/csplugins/id/mapping/util/XrefWrapper.java
   2011-10-10 20:50:23 UTC (rev 27115)
@@ -48,7 +48,7 @@
 
     public XrefWrapper(final Xref xref) {
         this(xref.getId(),DataSourceWrapper.getInstance(
-                xref.getDataSource().getFullName(),
+                DataSourceUtil.getName(xref.getDataSource()),
                 DataSourceWrapper.DsAttr.DATASOURCE));
     }
 

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