Author: pwang
Date: 2010-08-17 17:08:00 -0700 (Tue, 17 Aug 2010)
New Revision: 21424
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducer.java
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerFactory.java
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerManager.java
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducer.java
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerFactory.java
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerManager.java
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/InputStreamTaskFactory.java
Log:
Original creation
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducer.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducer.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducer.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,9 @@
+package org.cytoscape.io.read;
+
+import org.cytoscape.model.CyDataTable;
+import org.cytoscape.work.Task;
+
+public interface CyDataTableProducer extends Task{
+
+ public CyDataTable[] getCyDataTables();
+}
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerFactory.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerFactory.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerFactory.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,25 @@
+
+package org.cytoscape.io.read;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+
+/**
+ * The basic input interface that specifies what is to be read and when it is
to
+ * be read. This interface should be extended by other interfaces to provide
+ * access to the data that gets read. One class can then implement multiple
+ * CyReader interfaces to support reading files that contain multiple types of
+ * data (like networks that contain both attribute and view model information).
+ *
+ */
+public interface CyDataTableProducerFactory extends InputStreamTaskFactory {
+
+ CyDataTableProducer getTask();
+
+ public CyDataTableProducer getDataTableProducer(URI uri) throws
IOException;
+
+ public CyDataTableProducer getDataTableProducer(InputStream stream)
throws IOException;
+
+}
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerManager.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerManager.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyDataTableProducerManager.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,65 @@
+/*
+ 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 org.cytoscape.io.read;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Map;
+
+/**
+ * Central registry for all Cytoscape import classes.
+ */
+public interface CyDataTableProducerManager {
+
+ /*
+ * Not generic because Spring does not support it now.
+ */
+ @SuppressWarnings("unchecked")
+ void addInputStreamFactory(CyDataTableProducerFactory factory, Map
props);
+
+ @SuppressWarnings("unchecked")
+ void removeInputStreamFactory(CyDataTableProducerFactory factory, Map
props);
+
+ /**
+ * Get a file reader if the file type is supported in Cytoscape.
+ *
+ * @param fileName
+ * @return
+ * @throws IllegalArgumentException File type is not supported.
+ */
+
+ CyDataTableProducer getProducer(URI uri) throws
IllegalArgumentException;
+ CyDataTableProducer getProducer(InputStream stream) throws
IllegalArgumentException;
+}
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducer.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducer.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducer.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,24 @@
+package org.cytoscape.io.read;
+
+import java.io.InputStream;
+
+import org.cytoscape.view.vizmap.VisualStyle;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.work.Task;
+
+/**
+ * The basic input interface that specifies what is to be read and when it is
to
+ * be read. This interface should be extended by other interfaces to provide
+ * access to the data that gets read. One class can then implement multiple
+ * CyReader interfaces to support reading files that contain multiple types of
+ * data (like networks that contain both attribute and view model information).
+ *
+ */
+public interface CyNetworkViewProducer extends Task {
+
+ CyNetworkView[] getNetworkViews();
+
+ VisualStyle[] getVisualStyles();
+
+ void setInputStream(InputStream is);
+}
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerFactory.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerFactory.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerFactory.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,24 @@
+
+package org.cytoscape.io.read;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+/**
+ * The basic input interface that specifies what is to be read and when it is
to
+ * be read. This interface should be extended by other interfaces to provide
+ * access to the data that gets read. One class can then implement multiple
+ * CyReader interfaces to support reading files that contain multiple types of
+ * data (like networks that contain both attribute and view model information).
+ *
+ */
+public interface CyNetworkViewProducerFactory extends InputStreamTaskFactory {
+
+ CyNetworkViewProducer getTask();
+
+ public CyNetworkViewProducer getNetworkViewProducer(URI uri) throws
IOException;
+
+ public CyNetworkViewProducer getNetworkViewProducer(InputStream stream)
throws IOException;
+
+}
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerManager.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerManager.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/CyNetworkViewProducerManager.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,65 @@
+/*
+ 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 org.cytoscape.io.read;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Map;
+
+/**
+ * Central registry for all Cytoscape import classes.
+ */
+public interface CyNetworkViewProducerManager {
+
+ /*
+ * Not generic because Spring does not support it now.
+ */
+ @SuppressWarnings("unchecked")
+ void addInputStreamFactory(CyNetworkViewProducerFactory factory, Map
props);
+
+ @SuppressWarnings("unchecked")
+ void removeInputStreamFactory(CyNetworkViewProducerFactory factory, Map
props);
+
+ /**
+ * Get a file reader if the file type is supported in Cytoscape.
+ *
+ * @param fileName
+ * @return
+ * @throws IllegalArgumentException File type is not supported.
+ */
+
+ CyNetworkViewProducer getProducer(URI uri) throws
IllegalArgumentException;
+ CyNetworkViewProducer getProducer(InputStream stream) throws
IllegalArgumentException;
+}
Added:
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/InputStreamTaskFactory.java
===================================================================
---
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/InputStreamTaskFactory.java
(rev 0)
+++
core3/io-api/trunk/src/main/java/org/cytoscape/io/read/InputStreamTaskFactory.java
2010-08-18 00:08:00 UTC (rev 21424)
@@ -0,0 +1,12 @@
+
+package org.cytoscape.io.read;
+
+import java.io.InputStream;
+import org.cytoscape.io.FileIOFactory;
+import org.cytoscape.work.TaskFactory;
+
+public interface InputStreamTaskFactory extends TaskFactory, FileIOFactory {
+
+ void setInputStream(InputStream is);
+
+}
--
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.