Author: mes
Date: 2012-08-09 16:06:21 -0700 (Thu, 09 Aug 2012)
New Revision: 30145
Added:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedEvent.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedListener.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/UpdateManager.java
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/swing-application-api/src/main/java/org/cytoscape/application/swing/CyEdgeViewContextMenuFactory.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/work-api/src/main/java/org/cytoscape/work/ServiceProperties.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/WebQuerier.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/ui/CheckForUpdatesPanel.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/datatable/CSVCyReader.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/datatable/CSVCyReaderTest.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/pom.xml
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkoutTask.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/NodeLinkoutTaskFactory.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/PropsReader.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/resources/linkout.props
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/reader/ontology/GeneAssociationReader.java
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/task/MapGeneAssociationTask.java
Log:
more updates to facilitate merge
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/swing-application-api/src/main/java/org/cytoscape/application/swing/CyEdgeViewContextMenuFactory.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/swing-application-api/src/main/java/org/cytoscape/application/swing/CyEdgeViewContextMenuFactory.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/swing-application-api/src/main/java/org/cytoscape/application/swing/CyEdgeViewContextMenuFactory.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -37,10 +37,9 @@
*/
package org.cytoscape.application.swing;
-import javax.swing.JMenuItem;
-import org.cytoscape.view.model.CyNetworkView;
-import org.cytoscape.view.model.View;
-import org.cytoscape.model.CyEdge;
+import org.cytoscape.model.CyEdge;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
/**
* A factory interface used to produce a CyMenuItem (JMenuItem) that
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/work-api/src/main/java/org/cytoscape/work/ServiceProperties.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/work-api/src/main/java/org/cytoscape/work/ServiceProperties.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/api/work-api/src/main/java/org/cytoscape/work/ServiceProperties.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -123,7 +123,7 @@
public static final String NODE_GROUP_MENU = "Group[-1080]";
public static final String NODE_NESTED_NETWORKS_MENU = "Nested
Networks[-1070]";
public static final String NODE_APPS_MENU = "Apps[1]"; // This is the
default menu if no preferredMenu is defined
- public static final String NODE_LINKOUTS_MENU = "Linkouts[1001]";
+ public static final String NODE_LINKOUTS_MENU = "External Links[1001]";
public static final String NODE_DYNAMIC_LINKOUTS_MENU = "Dynamic
Linkouts[1050]";
public static final String NODE_PREFERENCES_MENU = "Preferences[1100]";
@@ -131,7 +131,7 @@
public static final String EDGE_EDIT_MENU = "Edit[-1100]";
public static final String EDGE_SELECT_MENU = "Select[-1100]";
public static final String EDGE_APPS_MENU = "Apps[1]";
- public static final String EDGE_LINKOUTS_MENU = "Linkouts[1001]";
+ public static final String EDGE_LINKOUTS_MENU = "External Links[1001]";
public static final String EDGE_DYNAMIC_LINKOUTS_MENU = "Dynamic
Linkouts[1050]";
public static final String EDGE_PREFERENCES_MENU = "Preferences[1100]";
}
Copied:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedEvent.java
(from rev 30144,
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedEvent.java)
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedEvent.java
(rev 0)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedEvent.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -0,0 +1,30 @@
+package org.cytoscape.app.internal.event;
+
+import org.cytoscape.app.internal.net.UpdateManager;
+
+/**
+ * An event used by the {@link UpdateManager} to notify
UpdatesChangedListeners that an update
+ * has become available or installed, and that the listeners (such as UI
components) should
+ * update their data to reflect the change.
+ */
+public final class UpdatesChangedEvent {
+
+ /** The {@link UpdateManager} that created the event. */
+ private UpdateManager source;
+
+ /**
+ * Create a new UpdatesChangedEvent.
+ * @param source The {@link UpdateManager} creating the event.
+ */
+ public UpdatesChangedEvent(UpdateManager source) {
+ this.source = source;
+ }
+
+ /**
+ * Find the source of the event.
+ * @return The {@link UpdateManager} that triggered the event.
+ */
+ public UpdateManager getSource() {
+ return source;
+ }
+}
Copied:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedListener.java
(from rev 30144,
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedListener.java)
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedListener.java
(rev 0)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/event/UpdatesChangedListener.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -0,0 +1,14 @@
+package org.cytoscape.app.internal.event;
+
+/**
+ * A listener used to detect when an update has become available, or
installed. This is useful for UI components
+ * to update their data when the list of updates has changed.
+ */
+public interface UpdatesChangedListener {
+
+ /**
+ * Notifies the listener that updates have been updated, or
added/removed from the list of available updates.
+ * @param event The {@link UpdatesChangedEvent} containing information
about the change event.
+ */
+ public void appsChanged(UpdatesChangedEvent event);
+}
Copied:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/UpdateManager.java
(from rev 30144,
core3/impl/trunk/app-impl/src/main/java/org/cytoscape/app/internal/net/UpdateManager.java)
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/UpdateManager.java
(rev 0)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/UpdateManager.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -0,0 +1,63 @@
+package org.cytoscape.app.internal.net;
+
+import java.sql.Time;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.cytoscape.app.internal.event.UpdatesChangedEvent;
+import org.cytoscape.app.internal.event.UpdatesChangedListener;
+import org.cytoscape.app.internal.manager.App;
+import org.cytoscape.app.internal.manager.AppManager;
+
+public class UpdateManager {
+
+ private Set<UpdatesChangedListener> updatesChangedListeners;
+ private Set<Update> updates;
+
+ private Time lastUpdateCheckTime;
+
+ public UpdateManager() {
+ this.updatesChangedListeners = new
HashSet<UpdatesChangedListener>();
+ this.updates = null;
+ }
+
+ /**
+ * Checks for updates using the given {@link WebQuerier} for the given
set of apps.
+ * @param webQuerier The {@link WebQuerier} used to access app store
data
+ * @param apps The set of apps to check for updates for
+ */
+ public void checkForUpdates(WebQuerier webQuerier, Set<App> apps) {
+
+
+ fireUpdatesChangedEvent();
+
+ // Update last update check time
+ lastUpdateCheckTime = new Time(System.currentTimeMillis());
+ }
+
+ /**
+ * Installs the given {@link Update} via the given {@link AppManager}
+ * @param update The update to install
+ * @param appManager The {@link AppManager} keeping track of current
apps
+ */
+ public void installUpdate(Update update, AppManager appManager) {
+
+ if (this.updates.contains(update)) {
+ this.updates.remove(update);
+ }
+
+ fireUpdatesChangedEvent();
+ }
+
+ private void fireUpdatesChangedEvent() {
+ UpdatesChangedEvent updatesChangedEvent = new
UpdatesChangedEvent(this);
+
+ for (UpdatesChangedListener updatesChangedListener :
updatesChangedListeners) {
+ updatesChangedListener.appsChanged(updatesChangedEvent);
+ }
+ }
+
+ public Time getLastUpdateCheckTime() {
+ return lastUpdateCheckTime;
+ }
+}
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/WebQuerier.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/WebQuerier.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/net/WebQuerier.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -619,33 +619,55 @@
* @return A negative integer if first more recent, a positive integer
if second more recent,
* or 0 if the versions were the same or unable to determine which is
more recent.
*/
- private int compareVersions(String first, String second) {
+ public int compareVersions(String first, String second) {
String[] firstSplit = first.split("\\.", 3);
String[] secondSplit = second.split("\\.", 3);
-
+
int maxFields = Math.max(firstSplit.length, secondSplit.length);
boolean firstHasField, secondHasField;
-
+ //System.out.println("test2");
// Remove non-numerical characters
for (int i = 0; i < maxFields; i++) {
+
firstHasField = (i < firstSplit.length);
secondHasField = (i < secondSplit.length);
+ /*
+ if (firstHasField) {
+ System.out.println("first: " + firstSplit[i]);
+ }
+
+ if (secondHasField) {
+ System.out.println("second: " + secondSplit[i]);
+ }
+ */
+
if (firstHasField && secondHasField) {
- firstSplit[i] =
firstSplit[i].replaceAll("[^\\d]", "");
- secondSplit[i] =
secondSplit[i].replaceAll("[^\\d]", "");
+ firstSplit[i] =
firstSplit[i].replaceAll("[^\\d]+.*", "");
+ secondSplit[i] =
secondSplit[i].replaceAll("[^\\d]+.*", "");
+ /*
+ System.out.println("firstSplit: " +
firstSplit[i]);
+ System.out.println("secondSplit: " +
secondSplit[i]);
+ */
+
try {
int firstParsed =
Integer.parseInt(firstSplit[i]);
int secondParsed =
Integer.parseInt(secondSplit[i]);
+ /*
+ System.out.println("firstParsed: " +
firstParsed);
+ System.out.println("secondParsed: " +
secondParsed);
+ */
+
if (firstParsed > secondParsed) {
return -1;
- } else if (secondParsed < firstParsed) {
+ } else if (secondParsed > firstParsed) {
return 1;
}
} catch (NumberFormatException e) {
+ // System.out.println("NFE");
return 0;
}
} else if (firstHasField) {
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/ui/CheckForUpdatesPanel.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/ui/CheckForUpdatesPanel.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/app-impl/src/main/java/org/cytoscape/app/internal/ui/CheckForUpdatesPanel.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -1,5 +1,8 @@
package org.cytoscape.app.internal.ui;
+import java.awt.event.ComponentAdapter;
+import java.awt.event.ComponentEvent;
+
/**
* This class represents the panel in the App Manager dialog's tab used for
checking for app updates.
* Its UI setup code is generated by the Netbeans 7 GUI builder.
@@ -133,6 +136,14 @@
.add(installAllTable))
.addContainerGap())
);
+
+ //
+ this.addComponentListener(new ComponentAdapter() {
+
+ @Override
+ public void componentShown(ComponentEvent e) {
+ }
+ });
}
private void
installSelectedButtonActionPerformed(java.awt.event.ActionEvent evt) {
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/datatable/CSVCyReader.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/datatable/CSVCyReader.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/datatable/CSVCyReader.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -57,7 +57,7 @@
public void run(TaskMonitor taskMonitor) throws Exception {
taskMonitor.setProgress(0.0);
- CSVReader reader = new CSVReader(new InputStreamReader(stream,
encoding));
+ CSVReader reader = new CSVReader(new InputStreamReader(stream,
encoding), ',', '"', '\0');
taskMonitor.setProgress(0.2);
TableInfo info = readHeader(reader);
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/datatable/CSVCyReaderTest.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/datatable/CSVCyReaderTest.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/io-impl/impl/src/test/java/org/cytoscape/io/internal/read/datatable/CSVCyReaderTest.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -41,7 +41,7 @@
@Test
public void testReadSimple() throws Exception {
- String data = "SUID\r\njava.lang.Long\r\ntest
table,\"public\\,mutable\"\r\n5\r\n6";
+ String data = "SUID\r\njava.lang.Long\r\ntest
table,\"public,mutable\"\r\n5\r\n6";
CSVCyReader reader = new CSVCyReader(createStream(data), true,
/* handleEquations = */
false, tableFactory, null, "UTF-8");
reader.run(taskMonitor);
@@ -62,7 +62,7 @@
@Test
public void testReadString() throws Exception {
- String data =
"SUID,name\r\njava.lang.Long,java.lang.String\r\ntest
table,\"public\\,mutable\"\r\n1,Alice\r\n2,Bob\r\n3,Carol";
+ String data =
"SUID,name\r\njava.lang.Long,java.lang.String\r\ntest
table,\"public,mutable\"\r\n1,Alice\r\n2,Bob\r\n3,Carol";
CSVCyReader reader = new CSVCyReader(createStream(data), true,
/* handleEquations = */
false, tableFactory, null, "UTF-8");
reader.run(taskMonitor);
@@ -74,7 +74,7 @@
@Test
public void testReadDouble() throws Exception {
- String data =
"SUID,weight\r\njava.lang.Long,java.lang.Double\r\ntest
table,\"public\\,mutable\"\r\n0,0.56\r\n-5,-1.234";
+ String data =
"SUID,weight\r\njava.lang.Long,java.lang.Double\r\ntest
table,\"public,mutable\"\r\n0,0.56\r\n-5,-1.234";
CSVCyReader reader = new CSVCyReader(createStream(data), true,
/* handleEquations = */
false, tableFactory, null, "UTF-8");
reader.run(taskMonitor);
@@ -86,7 +86,7 @@
@Test
public void testReadBoolean() throws Exception {
- String data =
"SUID,hidden\r\njava.lang.Long,java.lang.Boolean\r\ntest
table,\"public\\,mutable\"\r\n30,true\r\n40,false\r\n50,true";
+ String data =
"SUID,hidden\r\njava.lang.Long,java.lang.Boolean\r\ntest
table,\"public,mutable\"\r\n30,true\r\n40,false\r\n50,true";
CSVCyReader reader = new CSVCyReader(createStream(data), true,
/* handleEquations = */
false, tableFactory, null, "UTF-8");
reader.run(taskMonitor);
@@ -98,7 +98,7 @@
@Test
public void testReadList() throws Exception {
- String data =
"SUID,list\r\njava.lang.Long,java.util.List<java.lang.String>\r\ntest
table,\"public\\,mutable\"\r\n1,\"a\rb\rc\"";
+ String data =
"SUID,list\r\njava.lang.Long,java.util.List<java.lang.String>\r\ntest
table,\"public,mutable\"\r\n1,\"a\rb\rc\"";
CSVCyReader reader = new CSVCyReader(createStream(data), true,
/* handleEquations = */
false, tableFactory, null, "UTF-8");
reader.run(taskMonitor);
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/pom.xml
===================================================================
--- csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/pom.xml
2012-08-09 22:28:57 UTC (rev 30144)
+++ csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/pom.xml
2012-08-09 23:06:21 UTC (rev 30145)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.cytoscape</groupId>
<artifactId>impl-parent</artifactId>
@@ -12,16 +13,14 @@
</properties>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.cytoscape</groupId>
<artifactId>linkout-impl</artifactId>
-
<name>Cytoscape Linkout Impl (${project.artifactId})</name>
<packaging>bundle</packaging>
<repositories>
- <!-- bootstrap for cytoscape dependencies, namely the parent
POM snapshots -->
+ <!-- bootstrap for cytoscape dependencies, namely the parent
POM snapshots -->
<repository>
<id>cytoscape_snapshots</id>
<snapshots>
@@ -93,11 +92,6 @@
<groupId>org.cytoscape</groupId>
<artifactId>swing-application-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- </dependency>
</dependencies>
</project>
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -19,8 +19,6 @@
public class CyActivator extends AbstractCyActivator {
- private static final Logger logger =
LoggerFactory.getLogger(CyActivator.class);
-
public CyActivator() {
super();
}
@@ -33,11 +31,11 @@
SynchronousTaskManager synTaskMngrServRef = getService(bc,
SynchronousTaskManager.class);
PropsReader linkoutProps = new
PropsReader("linkout","linkout.props",CyProperty.SavePolicy.CONFIG_DIR);
-
- LinkOut linkout = new
LinkOut(linkoutProps,cyServiceRegistrarServiceRef,openBrowserServiceRef,cyApplicationConfigurationServiceRef,
synTaskMngrServRef);
+ final LinkOut linkout = new
LinkOut(linkoutProps,cyServiceRegistrarServiceRef,openBrowserServiceRef,cyApplicationConfigurationServiceRef,
synTaskMngrServRef);
Properties linkoutPropsProps = new Properties();
linkoutPropsProps.setProperty("cyPropertyName","linkout");
+
registerService(bc,linkoutProps,CyProperty.class,
linkoutPropsProps);
registerService(bc, linkout, PropertyUpdatedListener.class,
linkoutPropsProps);
registerServiceListener(bc, linkout, "addCommanLineLinkOut",
"removeCommanLineLinkOut", CyProperty.class);
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -36,29 +36,15 @@
package org.cytoscape.linkout.internal;
-import org.cytoscape.application.CyApplicationConfiguration;
-import org.cytoscape.application.swing.CyEdgeViewContextMenuFactory;
-import org.cytoscape.application.swing.CyNodeViewContextMenuFactory;
+import static org.cytoscape.work.ServiceProperties.EDGE_DYNAMIC_LINKOUTS_MENU;
+import static org.cytoscape.work.ServiceProperties.EDGE_LINKOUTS_MENU;
+import static org.cytoscape.work.ServiceProperties.MENU_GRAVITY;
+import static org.cytoscape.work.ServiceProperties.NODE_DYNAMIC_LINKOUTS_MENU;
+import static org.cytoscape.work.ServiceProperties.NODE_LINKOUTS_MENU;
+import static org.cytoscape.work.ServiceProperties.PREFERRED_MENU;
-import org.cytoscape.property.CyProperty;
-import org.cytoscape.property.PropertyUpdatedEvent;
-import org.cytoscape.property.PropertyUpdatedListener;
-
-import org.cytoscape.service.util.CyServiceRegistrar;
-
-import org.cytoscape.task.NodeViewTaskFactory;
-import org.cytoscape.task.EdgeViewTaskFactory;
-
-import org.cytoscape.util.swing.OpenBrowser;
-
-import static org.cytoscape.work.ServiceProperties.*;
-import org.cytoscape.work.SynchronousTaskManager;
-import org.cytoscape.work.TaskFactory;
-
-
import java.io.File;
import java.io.FileInputStream;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -67,6 +53,17 @@
import javax.swing.SwingUtilities;
+import org.cytoscape.application.CyApplicationConfiguration;
+import org.cytoscape.application.swing.CyEdgeViewContextMenuFactory;
+import org.cytoscape.application.swing.CyNodeViewContextMenuFactory;
+import org.cytoscape.property.CyProperty;
+import org.cytoscape.property.PropertyUpdatedEvent;
+import org.cytoscape.property.PropertyUpdatedListener;
+import org.cytoscape.service.util.CyServiceRegistrar;
+import org.cytoscape.task.EdgeViewTaskFactory;
+import org.cytoscape.task.NodeViewTaskFactory;
+import org.cytoscape.util.swing.OpenBrowser;
+import org.cytoscape.work.SynchronousTaskManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -108,34 +105,27 @@
private final Map<String, NodeLinkoutTaskFactory> cpropKey2NodeVTF;
private final Map<String, EdgeLinkoutTaskFactory> cpropKey2EdgeVTF;
- /**
- * Creates a new LinkOut object.
- *
- * @param props DOCUMENT ME!
- * @param registrar DOCUMENT ME!
- * @param browser DOCUMENT ME!
- * @param config DOCUMENT ME!
- */
+
public LinkOut(CyProperty<Properties> propService, CyServiceRegistrar
registrar, OpenBrowser browser,
- final CyApplicationConfiguration config, final
SynchronousTaskManager synTaskManager) {
+ final CyApplicationConfiguration config, final
SynchronousTaskManager synTaskManager) {
this.props = propService.getProperties();
this.registrar = registrar;
this.browser = browser;
this.config = config;
this.synTaskManager = synTaskManager;
-
+
propKey2EdgeVTF = new HashMap<String, EdgeLinkoutTaskFactory>();
propKey2NodeVTF = new HashMap<String, NodeLinkoutTaskFactory>();
-
+
cpropKey2EdgeVTF = new HashMap<String,
EdgeLinkoutTaskFactory>();
cpropKey2NodeVTF = new HashMap<String,
NodeLinkoutTaskFactory>();
-
+
readLocalProperties();
addStaticNodeLinks();
addStaticEdgeLinks();
- // This has been disabled until we can figure out the right way
to
+ // This has been disabled until we can figure out the right way
to
// construct these menus and add them to the existing Linkout
menu.
// The current approach is not used (as far as we know) and adds
// significant confusion in the UI
@@ -189,7 +179,7 @@
logger.debug("Bad URL for propKey: " +
propKey);
continue;
}
- EdgeViewTaskFactory evtf = new
EdgeLinkoutTaskFactory(browser,url);
+ final EdgeViewTaskFactory evtf = new
EdgeLinkoutTaskFactory(browser,url);
registrar.registerService(evtf,
EdgeViewTaskFactory.class, dict);
propKey2EdgeVTF.put(propKey,
(EdgeLinkoutTaskFactory) evtf);
}
@@ -206,11 +196,12 @@
p = p + marker.length();
Properties dict = new Properties();
String menuKey;
- if (marker.equals(NODEMARKER))
+ if (marker.equals(NODEMARKER)) {
menuKey = NODE_LINKOUTS_MENU + "." +
propKey.substring(p);
- else
+ } else {
menuKey = EDGE_LINKOUTS_MENU + "." +
propKey.substring(p);
-
+ }
+
dict.setProperty(PREFERRED_MENU, menuKey);
dict.setProperty(MENU_GRAVITY, "-1"); // Alphabetic ordering
return dict;
@@ -288,9 +279,6 @@
@Override
public void run() {
- // TODO Auto-generated method stub
-
-
if (e.getSource().getName().equals("linkout")
) //when linkout prop is changed
{
final Properties props = (Properties)
e.getSource().getProperties();
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkoutTask.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkoutTask.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/LinkoutTask.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -1,24 +1,16 @@
package org.cytoscape.linkout.internal;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.regex.Pattern;
import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.cytoscape.model.CyIdentifiable;
-import org.cytoscape.model.CyTable;
-import org.cytoscape.model.CyColumn;
-import org.cytoscape.model.CyRow;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.util.swing.OpenBrowser;
import org.cytoscape.work.AbstractTask;
import org.cytoscape.work.TaskMonitor;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
public class LinkoutTask extends AbstractTask {
private static final Logger logger =
LoggerFactory.getLogger(LinkoutTask.class);
@@ -28,10 +20,10 @@
private final OpenBrowser browser;
private final CyNetwork network;
- private static final String REGEX = "%.+%";
- private static final Pattern regexPattern = Pattern.compile(REGEX);
+ private static final String REGEX = "%.+%";
+ private static final Pattern regexPattern = Pattern.compile(REGEX);
- public LinkoutTask(String link, OpenBrowser browser, CyNetwork network,
CyIdentifiable... tableEntries ) {
+ public LinkoutTask(String link, OpenBrowser browser, CyNetwork network,
CyIdentifiable... tableEntries) {
this.link = link;
this.tableEntries = tableEntries;
this.browser = browser;
@@ -45,12 +37,12 @@
// This absurdity is to support backwards compatibility
// with 2.x formatted links.
- if ( tableEntries.length == 1 ) {
+ if (tableEntries.length == 1) {
url = substituteAttributes(url, tableEntries[0], "ID");
- } else if ( tableEntries.length == 2 ) {
+ } else if (tableEntries.length == 2) {
url = substituteAttributes(url, tableEntries[0], "ID1");
url = substituteAttributes(url, tableEntries[1], "ID2");
- } else if ( tableEntries.length == 3 ) {
+ } else if (tableEntries.length == 3) {
url = substituteAttributes(url, tableEntries[0], "ID1");
url = substituteAttributes(url, tableEntries[1], "ID2");
url = substituteAttributes(url, tableEntries[2], "ID");
@@ -62,28 +54,28 @@
}
private String substituteAttributes(String url, CyIdentifiable
tableEntry, String id) {
-
+
// Replace %ATTRIBUTE.NAME% mark with the value of the
attribute final
Matcher mat = regexPattern.matcher(url);
-
- while (mat.find()) {
+
+ while (mat.find()) {
String attrName = url.substring(mat.start() + 1,
mat.end() - 1);
- String replaceName = attrName;
-
- // handle the default case where ID, ID1, ID2 is now
the "name" column
- if ( attrName.equals(id) )
- attrName = "name";
-
+ String replaceName = attrName;
+
+ // handle the default case where ID, ID1, ID2 is now
the "name"
+ // column
+ if (attrName.equals(id))
+ attrName = CyNetwork.NAME;
+
Object raw =
network.getRow(tableEntry).getRaw(attrName);
- if ( raw == null ) {
+ if (raw == null)
continue;
- }
- String attrValue = raw.toString();
- url = url.replace("%" + replaceName + "%", attrValue);
- mat = regexPattern.matcher(url);
+ String attrValue = raw.toString();
+ url = url.replace("%" + replaceName + "%", attrValue);
+ mat = regexPattern.matcher(url);
}
-
- return url;
+
+ return url;
}
}
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/NodeLinkoutTaskFactory.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/NodeLinkoutTaskFactory.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/NodeLinkoutTaskFactory.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -14,7 +14,7 @@
private String link;
private final OpenBrowser browser;
- public NodeLinkoutTaskFactory(OpenBrowser browser, String link) {
+ public NodeLinkoutTaskFactory(final OpenBrowser browser, final String
link) {
super();
this.link = link;
this.browser = browser;
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/PropsReader.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/PropsReader.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/java/org/cytoscape/linkout/internal/PropsReader.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -7,5 +7,4 @@
PropsReader(String name, String fileName, SavePolicy sp) {
super(name, fileName, sp);
}
-}
-
+}
\ No newline at end of file
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/resources/linkout.props
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/resources/linkout.props
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/linkout-impl/src/main/resources/linkout.props
2012-08-09 23:06:21 UTC (rev 30145)
@@ -1,34 +1,28 @@
-#Linkout Property File
-#12/5/2007 Links re-organized by Keiichiro Ono ([email protected])
+#Linkout Property File
+#08/08/2012 Links updated by Keiichiro Ono ([email protected])
-#nodelinkouturl.yeast.BioGRID=http://www.thebiogrid.org/search.php?keywords=%ID%&searchbutton=GO&organismid=4932
-#nodelinkouturl.Biological\
resources.iHOP=http://www.ihop-net.org/UniPub/iHOP/in?syns_1=%ID%
-nodelinkouturl.Entrez.All\ Databases\ (Global\ search\ by\ free\
keyword)=http://www.ncbi.nlm.nih.gov/sites/gquery?GlobalQuery.GQueryCluster.GQuerySearchBox.Term=%ID%
-nodelinkouturl.Entrez.Pubmed=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=PubMed&term\=%ID%&doptcmdl\=Abstract
-nodelinkouturl.Entrez.Protein=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=Protein&term\=%ID%&doptcmdl\=GenPept
-nodelinkouturl.Entrez.Nucleotide=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=nucleotide&term\=%ID%&doptcmdl\=GenBank
-nodelinkouturl.Entrez.OMIM=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=omim&term\=%ID%&doptcmdl\=Synopsis
-nodelinkouturl.Entrez.Structure=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=structure&term\=%ID%&doptcmdl\=Brief
-nodelinkouturl.Entrez.Gene=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Search&term=%ID%
+################# Node Links ################
-nodelinkouturl.iHOP.yeast=http\://www.ihop-net.org/UniPub/iHOP/?search\=%ID%&field\=all&ncbi_tax_id\=4932
-nodelinkouturl.iHOP.human=http\://www.ihop-net.org/UniPub/iHOP/?search\=%ID%&field\=all&ncbi_tax_id\=9606
+nodelinkouturl.Web\
Search.Google=http://www.google.com/search?hl=en&q=%ID%&btnG=Google+Search
+nodelinkouturl.Web\ Search.Wikipedia=http://en.wikipedia.org/wiki/%ID%
-nodelinkouturl.Search\
Engines.Google=http://www.google.com/search?hl=en&q=%ID%&btnG=Google+Search
-nodelinkouturl.Search\ Engines.Ask=http://www.ask.com/web?q=%ID%&qsrc=0&o=0
+nodelinkouturl.Sequences\ and\ Proteins.Entrez\
Gene=http://www.ncbi.nlm.nih.gov/gene/%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Entrez\
Genome=http://www.ncbi.nlm.nih.gov/genome?term=%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Ensembl\ Gene\
View.yeast=http://www.ensembl.org/Saccharomyces_cerevisiae/geneview?gene=%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Ensembl\ Gene\
View.human=http://www.ensembl.org/Homo_sapiens/geneview?gene=%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Ensembl\ Gene\
View.fly=http://www.ensembl.org/Drosophila_melanogaster/geneview?gene=%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Ensembl\ Gene\
View.mouse=http://www.ensembl.org/Mus_musculus/geneview?gene=%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Ensembl\ Gene\
View.worm=http://www.ensembl.org/Caenorhabditis_elegans/geneview?gene=%ID%
+nodelinkouturl.Sequences\ and\
Proteins.UniProt=http://beta.uniprot.org/uniprot/%ID%
+nodelinkouturl.Sequences\ and\ Proteins.Entrez
Protein=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=Protein&term\=%ID%&doptcmdl\=GenPept
-nodelinkouturl.UniProt.PIR=http://www.pir.uniprot.org/cgi-bin/upEntry?id=%ID%
-nodelinkouturl.UniProt.KB\ Beta=http://beta.uniprot.org/uniprot/%ID%
+nodelinkouturl.Publications.Pubmed=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=PubMed&term\=%ID%&doptcmdl\=Abstract
+nodelinkouturl.Publications.OMIM=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=omim&term\=%ID%&doptcmdl\=Synopsis
-nodelinkouturl.Other\ Biological\
DB.GeneCards=http://www.genecards.org/cgi-bin/carddisp.pl?gene=%ID%&alias=yes
-nodelinkouturl.Other\ Biological\
DB.Pfam=http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?%ID%
-nodelinkouturl.Other\ Biological\
DB.InterPro=http://www.ebi.ac.uk/interpro/IEntry?ac=%ID%
-
-
nodelinkouturl.Model\ Organism\ DB.MGI\
(mouse)=http://www.informatics.jax.org/javawi2/servlet/WIFetch?page=searchTool&query=%ID%&selectedQuery=Genes+and+Markers
nodelinkouturl.Model\ Organism\ DB.WormBase\
(worm)=http://www.wormbase.org/db/gene/gene?name=%ID%
-nodelinkouturl.Model\ Organism\ DB.SGD\
(yeast)=http\://db.yeastgenome.org/cgi-bin/locus.pl?locus\=%ID%
+nodelinkouturl.Model\ Organism\ DB.SGD\
(yeast)=http://db.yeastgenome.org/cgi-bin/locus.pl?locus=%ID%
nodelinkouturl.Model\ Organism\ DB.FlyBase\
(fly)=http://flybase.bio.indiana.edu/.bin/fbidq.html?%ID%
nodelinkouturl.Model\ Organism\ DB.HGNC\
(human)=http://www.genenames.org/data/hgnc_data.php?hgnc_id=%ID%
@@ -36,54 +30,34 @@
nodelinkouturl.Ontology.Gene\ Ontology\ (QuickGO\ by\
ID)=http://www.ebi.ac.uk/ego/DisplayGoTerm?id=%ID%
nodelinkouturl.Ontology.Gene\ Ontology\ (QuickGO\ by\
name)=http://www.ebi.ac.uk/ego/GSearch?query=%ID%&mode=name&ontology=all_ont
-#Ensembl
-nodelinkouturl.Ensembl\ Gene\
View.yeast=http://www.ensembl.org/Saccharomyces_cerevisiae/geneview?gene=%ID%
-nodelinkouturl.Ensembl\ Gene\
View.human=http://www.ensembl.org/Homo_sapiens/geneview?gene=%ID%
-nodelinkouturl.Ensembl\ Gene\
View.fly=http://www.ensembl.org/Drosophila_melanogaster/geneview?gene=%ID%
-nodelinkouturl.Ensembl\ Gene\
View.mouse=http://www.ensembl.org/Mus_musculus/geneview?gene=%ID%
-nodelinkouturl.Ensembl\ Gene\
View.worm=http://www.ensembl.org/Caenorhabditis_elegans/geneview?gene=%ID%
+#Global Search
+nodelinkouturl.Global\ Database\
Search.EBI=http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&requestFrom=ebi_index&query=%ID%
+nodelinkouturl.Global\ Database\
Search.NCBI=http://www.ncbi.nlm.nih.gov/gquery/?term=%ID%
-#EB-eye
-nodelinkouturl.EBI\ Tools.All\ the\ EBI\ (Global\ search\ by\ free\
keyword)=http://www.ebi.ac.uk/ebisearch/search.ebi?query=%ID%&db=allebi
-nodelinkouturl.EBI\ Tools.Dasty2\ (Visualize\ protein\ sequence\ feature\
information)=http://www.ebi.ac.uk/dasty/display.html?q=%ID%&label=BIOSAPIENS&t=3
-nodelinkouturl.EBI\ Tools.PRIDE\ (PRoteomics\ IDEntifications\
database)=http://www.ebi.ac.uk/pride/simpleSearch.do?simpleSearchValue=%ID%
+#Structure
+nodelinkouturl.Structure\
Databases.PDBe=http://www.ebi.ac.uk/pdbe/searchResults.html?display=both&term=%ID%
+nodelinkouturl.Structure\ Databases.NCBI\
Structure=http://www.ncbi.nlm.nih.gov/structure/?term=%ID%
-#Reactome links
-nodelinkouturl.Reactome.ReactomeID=http://www.reactome.org/cgi-bin/eventbrowser?DB=gk_current&ID=%ID%
-nodelinkouturl.Reactome.Entrez=http://www.reactome.org/cgi-bin/link?SOURCE=Entrez+Gene&ID=%ID%
-nodelinkouturl.Reactome.UniProt=http://www.reactome.org/cgi-bin/link?SOURCE=UNIPROT&ID=%ID%
-nodelinkouturl.Reactome.SGD=http://www.reactome.org/cgi-bin/link?SOURCE=SGD&ID=%ID%&FOCUS_SPECIES=Saccharomyces+cerevisiae
-nodelinkouturl.Reactome.RefSeq=http://www.reactome.org/cgi-bin/link?SOURCE=RefSeq&ID=%ID%
-nodelinkouturl.Reactome.Wormbase=http://www.reactome.org/cgi-bin/link?SOURCE=Wormbase&ID=%ID%&FOCUS_SPECIES=Caenorhabditis+elegans
-#Network/Pathway databases
-nodelinkouturl.Interaction\
Databases.HPRD=http://www.hprd.org/resultsQuery?multiplefound=&prot_name=%ID%&external=Ref_seq&accession_id=&hprd=&gene_symbol=&chromo_locus=&function=&ptm_type=&localization=&domain=&motif=&expression=&prot_start=&prot_end=&limit=0&mole_start=&mole_end=&disease=&query_submit=Search
-nodelinkouturl.Interaction\
Databases.IntAct=http://www.ebi.ac.uk/intact/search/do/search?searchString=%ID%&filter=ac
-nodelinkouturl.Interaction\
Databases.BioGRID=http://www.thebiogrid.org/search.php?keywords=%ID%&searchbutton=GO&organismid=0
+#Pathway databases
+nodelinkouturl.Pathway\
Databases.Reactome=http://www.reactome.org/cgi-bin/search2?OPERATOR=ALL&SPECIES=ALL&QUERY=%ID%
+nodelinkouturl.Pathway\
Databases.Wikipathways=http://www.wikipathways.org//index.php?query=%ID%&title=Special%3ASearchPathways&doSearch=1&sa=Search
+nodelinkouturl.Pathway\ Databases.KEGG\
Pathways=http://www.kegg.jp/kegg-bin/search_pathway_text?map=map&keyword=%ID%&mode=1&viewImage=true
+nodelinkouturl.Pathway\ Databases.Pathway\
Commons=http://www.pathwaycommons.org/pc/webservice.do?version=3.0&snapshot_id=GLOBAL_FILTER_SETTINGS&record_type=PATHWAY&q=%ID%&format=html&cmd=get_by_keyword
-#EBI Links
-nodelinkouturl.Array\ Express.All\
Species=http://www.ebi.ac.uk/microarray-as/aew/DW?queryFor=gene&gene_query=%ID%&species=&displayInsitu=on&exp_query=
-nodelinkouturl.Array\
Express.human=http://www.ebi.ac.uk/microarray-as/aew/DW?queryFor=gene&gene_query=%ID%&species=Homo+sapiens&displayInsitu=on&exp_query=
-nodelinkouturl.Array\
Express.yeast=http://www.ebi.ac.uk/microarray-as/aew/DW?queryFor=gene&gene_query=%ID%&species=Saccharomyces+cerevisiae&displayInsitu=on&exp_query=
+# Arrays
+nodelinkouturl.Array\ Experiments.GEO\
DataSets=http://www.ncbi.nlm.nih.gov/gds/?term=%ID%
+nodelinkouturl.Array\
Experiments.ArrayExpress=http://www.ebi.ac.uk/arrayexpress/browse.html?keywords=%ID%
-#KEGG Links
-nodelinkouturl.KEGG.All\ Species\ (use\ KEGG\
ID)=http://www.kegg.jp/dbget-bin/www_bget?%ID%
-nodelinkouturl.KEGG.human\ (use\ NCBI\
GeneID)=http://www.kegg.jp/dbget-bin/www_bget?hsa:%ID%
-nodelinkouturl.KEGG.yeast\ (use\ ORF\
name)=http://www.kegg.jp/dbget-bin/www_bget?sce:%ID%
-nodelinkouturl.KEGG.mouse\ (use\ NCBI\
GeneID)=http://www.genome.jp/dbget-bin/www_bget?mmu:%ID%
+############## Edge Links #####################
-#Edge Links
-edgelinkouturl.iHop.yeast=http://www.ihop-net.org/UniPub/iHOP/in?syns_1=%ID1%&ncbi_tax_id_1=4932&syns_2=%ID2%&ncbi_tax_id_2=4932
-edgelinkouturl.iHop.human=http://www.ihop-net.org/UniPub/iHOP/in?syns_1=%ID1%&ncbi_tax_id_1=9606&syns_2=%ID2%&ncbi_tax_id_2=9606
+edgelinkouturl.Publications.Pubmed\ (search\ by\ Pubmed\
ID)=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=PubMed&term\=%ID%&doptcmdl\=Abstract
-edgelinkouturl.Entrez.Pubmed=http\://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd\=Search&db\=PubMed&term\=%ID%&doptcmdl\=Abstract
+edgelinkouturl.Ontology.Molecular\ Interaction\ (PSI-MI\
Term)=http://www.ebi.ac.uk/ontology-lookup/browse.do?ontName=MI&termId=MI%3A%ID%
-edgelinkouturl.Ontology.Molecular\ Interaction\
(PSI-MI)=http://www.ebi.ac.uk/ontology-lookup/browse.do?ontName=MI&termId=MI%3A%ID%
-
-
#Interaction Database Links
-edgelinkouturl.Network\
Database.IntAct=http://www.ebi.ac.uk/intact/search/do/search?searchString=%ID%&filter=ac
-edgelinkouturl.Network\
Database.BioGRID=http://www.thebiogrid.org/SearchResults/summary/%ID%
+edgelinkouturl.Interaction\
Databases.IntAct=http://www.ebi.ac.uk/intact/search/do/search?searchString=%ID%&filter=ac
+edgelinkouturl.Interaction\
Databases.BioGRID=http://www.thebiogrid.org/SearchResults/summary/%ID%
#Attribute name for user-embedded URLs
Linkout.externalLinkName=Linkout.ExternalLinks
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/reader/ontology/GeneAssociationReader.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/reader/ontology/GeneAssociationReader.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/reader/ontology/GeneAssociationReader.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -1,6 +1,5 @@
package org.cytoscape.tableimport.internal.reader.ontology;
-import static
org.cytoscape.tableimport.internal.reader.TextFileDelimiters.PIPE;
import static org.cytoscape.tableimport.internal.reader.TextFileDelimiters.TAB;
import java.io.BufferedReader;
@@ -13,8 +12,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
import org.cytoscape.io.read.CyTableReader;
import org.cytoscape.model.CyNetwork;
@@ -30,6 +27,7 @@
import org.slf4j.LoggerFactory;
public class GeneAssociationReader extends AbstractTask implements
CyTableReader {
+
private static final Logger logger =
LoggerFactory.getLogger(GeneAssociationReader.class);
private static final String COMPATIBLE_VERSION = "gaf-version: 2.0";
@@ -39,6 +37,7 @@
// The following columns should be handled as List in GA v2 spec.
private static final List<Integer> LIST_INDEX = new
ArrayList<Integer>();
private static final Map<String, String> NAMESPACE_MAP = new
HashMap<String, String>();
+
static {
LIST_INDEX.add(4);
LIST_INDEX.add(8);
@@ -60,26 +59,11 @@
private static final int EXPECTED_COL_COUNT = 15;
private static final int DB_OBJ_ID = 1;
- private static final int OBJ_NAME = 9;
private static final int ASPECT = 8;
- private static final int SYNONYM = 10;
- private static final int GOID = 4;
- private int key = 2;
-
private InputStream is;
- // private Aliases nodeAliases;
- private Map<String, List<String>> attr2id;
- private CyTable nodeAttributes;
- // private GeneOntology geneOntology;
private Map<String, String> speciesMap;
-
- private Map<String, String> uppercaseIDMap;
-
private CyNetwork ontologyDAG;
-
- private CyTable dagTable;
-
private final CyTableFactory tableFactory;
private final String tableName;
@@ -141,7 +125,6 @@
if (ontologyDAG == null)
logger.warn("Could not find associated Ontology DAG.");
else {
- this.dagTable = ontologyDAG.getDefaultNodeTable();
termIDList =
ontologyDAG.getDefaultNodeTable().getColumn(CyNetwork.NAME).getValues(String.class);
}
@@ -245,9 +228,6 @@
if (currentList.contains(goidString) == false)
currentList.add(goidString);
row.set(namespace, currentList);
-
- // TODO: create term name list here.
-
break;
case EVIDENCE:
@@ -321,7 +301,7 @@
private String convertToName(final String id) {
final Collection<CyRow> rows =
ontologyDAG.getDefaultNodeTable().getMatchingRows(CyNetwork.NAME, id);
- if (rows != null) {
+ if (!rows.isEmpty()) {
final CyRow row = rows.iterator().next();
final String termName = row.get(OBOReader.TERM_NAME,
String.class);
if (termName != null)
Modified:
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/task/MapGeneAssociationTask.java
===================================================================
---
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/task/MapGeneAssociationTask.java
2012-08-09 22:28:57 UTC (rev 30144)
+++
csplugins/trunk/ucsd/mes/cy3-shared-local-tables/impl/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/task/MapGeneAssociationTask.java
2012-08-09 23:06:21 UTC (rev 30145)
@@ -82,7 +82,9 @@
private void buildMapping(final CyNetwork network, final CyTable
nodeTable, final CyTable globalTable) {
final List<String> globalKeys =
globalTable.getColumn(CyNetwork.NAME).getValues(String.class);
- nodeTable.createColumn(MAPPING_KEY, String.class, true);
+
+ if(nodeTable.getColumn(MAPPING_KEY) == null)
+ nodeTable.createColumn(MAPPING_KEY, String.class, true);
for (final CyNode node : network.getNodeList()) {
final String nodeName =
network.getRow(node).get(CyNetwork.NAME, String.class);
--
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.