Author: clopes
Date: 2012-01-23 10:35:06 -0800 (Mon, 23 Jan 2012)
New Revision: 28074
Modified:
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/session/Cy2SessionReaderImpl.java
Log:
Fixes #625 : [Session IO] Session reader does not read 2.x plugin files
Modified:
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/session/Cy2SessionReaderImpl.java
===================================================================
---
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/session/Cy2SessionReaderImpl.java
2012-01-22 22:51:33 UTC (rev 28073)
+++
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/read/session/Cy2SessionReaderImpl.java
2012-01-23 18:35:06 UTC (rev 28074)
@@ -27,14 +27,13 @@
*/
package org.cytoscape.io.internal.read.session;
-import static org.cytoscape.io.internal.util.session.SessionUtil.APPS_FOLDER;
import static
org.cytoscape.io.internal.util.session.SessionUtil.BOOKMARKS_FILE;
import static
org.cytoscape.io.internal.util.session.SessionUtil.CYSESSION_FILE;
import static org.cytoscape.io.internal.util.session.SessionUtil.NETWORK_ROOT;
import static
org.cytoscape.io.internal.util.session.SessionUtil.VIZMAP_PROPS_FILE;
import static org.cytoscape.io.internal.util.session.SessionUtil.XGMML_EXT;
+import static org.cytoscape.model.CyNetwork.DEFAULT_ATTRS;
import static org.cytoscape.model.CyNetwork.SELECTED;
-import static org.cytoscape.model.CyNetwork.DEFAULT_ATTRS;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -102,6 +101,7 @@
"|exportTextAsShape|Linkout\\.externalLinkName|maximizeViewOnCreate|moduleNetworkViewCreationThreshold"
+
"|nestedNetwork\\.imageScaleFactor|nestedNetworkSnapshotSize|preferredLayoutAlgorithm"
+
"|secondaryViewThreshold|showQuickStartAtStartup|viewThreshold";
+ public static final String PLUGINS_FOLDER = "plugins/";
private final CyNetworkReaderManager networkReaderMgr;
private final CyPropertyReaderManager propertyReaderMgr;
@@ -143,8 +143,8 @@
@Override
protected void handleEntry(InputStream is, String entryName) throws
Exception {
- if (entryName.contains("/" + APPS_FOLDER + "/")) {
- extractAppEntry(is, entryName);
+ if (entryName.contains("/" + PLUGINS_FOLDER)) {
+ extractPluginEntry(is, entryName);
} else if (entryName.endsWith(CYSESSION_FILE)) {
extractSessionState(is, entryName);
} else if (entryName.endsWith(VIZMAP_PROPS_FILE)) {
@@ -314,7 +314,7 @@
return topNetwork;
}
- private void extractAppEntry(InputStream is, String entryName) {
+ private void extractPluginEntry(InputStream is, String entryName) {
String[] items = entryName.split("/");
if (items.length < 3) {
--
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.