Author: kono
Date: 2011-07-22 17:17:20 -0700 (Fri, 22 Jul 2011)
New Revision: 26258

Added:
   core3/core-task-impl/trunk/networkTest
   core3/property-impl/trunk/.springBeans
Modified:
   core3/core-task-impl/trunk/
   
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loaddatatable/LoadAttributesURLTaskFactoryImpl.java
   
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTask.java
   core3/property-impl/trunk/src/main/resources/bookmarks.xml
   core3/work-swing-impl/trunk/impl/
   
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/URLHandler.java
Log:
fixes #102 Make URLHandler compatible with fileCategory property.  We need to 
add some more example URL for the table data.


Property changes on: core3/core-task-impl/trunk
___________________________________________________________________
Modified: svn:ignore
   - .settings
target
.classpath
.project

   + .settings
target
.classpath
.project
.springBeans


Added: core3/core-task-impl/trunk/networkTest
===================================================================
Modified: 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loaddatatable/LoadAttributesURLTaskFactoryImpl.java
===================================================================
--- 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loaddatatable/LoadAttributesURLTaskFactoryImpl.java
    2011-07-22 23:24:22 UTC (rev 26257)
+++ 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loaddatatable/LoadAttributesURLTaskFactoryImpl.java
    2011-07-23 00:17:20 UTC (rev 26258)
@@ -8,8 +8,10 @@
 
 
 public class LoadAttributesURLTaskFactoryImpl implements TaskFactory {
+       
        private CyTableReaderManager mgr;
        private CyTableManager tableMgr;
+       
        public LoadAttributesURLTaskFactoryImpl(CyTableReaderManager mgr, 
CyTableManager tableMgr) {
                this.mgr = mgr;
                this.tableMgr = tableMgr;

Modified: 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTask.java
===================================================================
--- 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTask.java
    2011-07-22 23:24:22 UTC (rev 26257)
+++ 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTask.java
    2011-07-23 00:17:20 UTC (rev 26258)
@@ -47,7 +47,7 @@
  * Specific instance of AbstractLoadNetworkTask that loads a URL.
  */
 public class LoadNetworkURLTask extends AbstractLoadNetworkTask {
-       @Tunable(description="The URL to load")
+       @Tunable(description="The URL to load", params = 
"fileCategory=network;input=true")
        public URL url;
        
        StreamUtil streamUtil;

Added: core3/property-impl/trunk/.springBeans
===================================================================
--- core3/property-impl/trunk/.springBeans                              (rev 0)
+++ core3/property-impl/trunk/.springBeans      2011-07-23 00:17:20 UTC (rev 
26258)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+       <version>1</version>
+       <pluginVersion><![CDATA[2.7.1.201107082359-RELEASE]]></pluginVersion>
+       <configSuffixes>
+               <configSuffix><![CDATA[xml]]></configSuffix>
+       </configSuffixes>
+       <enableImports><![CDATA[false]]></enableImports>
+       <configs>
+               
<config>src/main/resources/META-INF/spring/bundle-context-osgi.xml</config>
+               
<config>src/main/resources/META-INF/spring/bundle-context.xml</config>
+       </configs>
+       <configSets>
+       </configSets>
+</beansProjectDescription>

Modified: core3/property-impl/trunk/src/main/resources/bookmarks.xml
===================================================================
--- core3/property-impl/trunk/src/main/resources/bookmarks.xml  2011-07-22 
23:24:22 UTC (rev 26257)
+++ core3/property-impl/trunk/src/main/resources/bookmarks.xml  2011-07-23 
00:17:20 UTC (rev 26258)
@@ -356,6 +356,12 @@
                        xlink:href="http://cytoscape.org/datasets/ptacek.sif";
                        format="sif" />
        </category>
+       
+       <category name="table">
+               <dataSource name="Sample table for galFiltered.sif network"
+                       
xlink:href="http://chianti.ucsd.edu/~kono/data/galFiltered.attrs";
+                       format="attrs" />
+       </category>
 
        <category name="plugins">
                <dataSource name="Cytoscape"


Property changes on: core3/work-swing-impl/trunk/impl
___________________________________________________________________
Modified: svn:ignore
   - .settings
target
.classpath
.project

   + .settings
target
.classpath
.project
.springBeans


Modified: 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/URLHandler.java
===================================================================
--- 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/URLHandler.java
 2011-07-22 23:24:22 UTC (rev 26257)
+++ 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/URLHandler.java
 2011-07-23 00:17:20 UTC (rev 26258)
@@ -6,9 +6,9 @@
 import java.awt.event.KeyListener;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
+import java.util.Properties;
 
 import javax.swing.ComboBoxEditor;
 import javax.swing.DefaultComboBoxModel;
@@ -36,10 +36,10 @@
  * @author pasteur
  */
 public class URLHandler extends AbstractGUITunableHandler {
+       
        private BookmarksUtil bkUtil;
        private Bookmarks theBookmarks;
-       private String bookmarkCategory = "network";
-       private String urlString;
+       private final String bookmarkCategory;
        private BookmarkComboBoxEditor bookmarkEditor;
        private JComboBox networkFileComboBox;
        private JLabel titleLabel;
@@ -58,13 +58,17 @@
         */
        public URLHandler(Field f, Object o, Tunable t, Bookmarks bookmarks, 
BookmarksUtil bkUtil) {
                super(f, o, t);
+               final Properties props = getParams();
+               bookmarkCategory = props.getProperty("fileCategory");
                init(bookmarks, bkUtil);
        }
 
+
        public URLHandler(final Method getter, final Method setter, final 
Object instance, final Tunable tunable,
-                         final Bookmarks bookmarks, final BookmarksUtil bkUtil)
-       {
+                       final Bookmarks bookmarks, final BookmarksUtil bkUtil) {
                super(getter, setter, instance, tunable);
+               final Properties props = getParams();
+               bookmarkCategory = props.getProperty("fileCategory");
                init(bookmarks, bkUtil);
        }
 
@@ -175,9 +179,8 @@
                // Extract the URL entries
                List<DataSource> theDataSourceList = 
bkUtil.getDataSourceList(bookmarkCategory,theBookmarks.getCategory());
                if (theDataSourceList != null) {
-                       for (int i = 0; i < theDataSourceList.size(); i++) {
+                       for (int i = 0; i < theDataSourceList.size(); i++)
                                theModel.addElement(theDataSourceList.get(i));
-                       }
                }
                networkFileComboBox.setModel(theModel);
        }

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