Author: mes
Date: 2010-09-09 17:43:07 -0700 (Thu, 09 Sep 2010)
New Revision: 21782

Added:
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/AbstractCyWriter.java
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriter.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterFactory.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterManager.java
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriter.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterFactory.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterManager.java
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriter.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterFactory.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterManager.java
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriter.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterFactory.java
   
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterManager.java
Removed:
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/graphics/
Modified:
   core3/io-api/trunk/pom.xml
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriter.java
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterFactory.java
   core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterManager.java
Log:
first shot at a writer api

Modified: core3/io-api/trunk/pom.xml
===================================================================
--- core3/io-api/trunk/pom.xml  2010-09-09 21:28:06 UTC (rev 21781)
+++ core3/io-api/trunk/pom.xml  2010-09-10 00:43:07 UTC (rev 21782)
@@ -101,7 +101,12 @@
                <groupId>org.cytoscape</groupId>
                <artifactId>work-api</artifactId>
                <version>1.0-SNAPSHOT</version>
-               </dependency>
+       </dependency>
+       <dependency>
+               <groupId>org.cytoscape</groupId>
+               <artifactId>session-api</artifactId>
+               <version>1.0-SNAPSHOT</version>
+       </dependency>
        </dependencies>
 
 </project>

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/AbstractCyWriter.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/AbstractCyWriter.java   
                            (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/AbstractCyWriter.java   
    2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,77 @@
+
+package org.cytoscape.io.write;
+
+import org.cytoscape.work.AbstractTask;
+import org.cytoscape.work.TaskMonitor;
+import org.cytoscape.work.Tunable;
+import org.cytoscape.work.util.ListSingleSelection;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.ArrayList;
+
+/**
+ */
+public abstract class AbstractCyWriter<T extends CyWriterManager> extends 
AbstractTask 
+       implements CyWriter {
+
+       private File outputFile;
+
+       private boolean cancelTask = false;
+
+       @Tunable(description="Select the output file name")
+       public final void setOutputFile(File f) {
+               if ( f != null )
+                       outputFile = f;
+       }
+
+       public final File getOutputFile() {
+               return outputFile;
+       }
+
+       @Tunable(description = "Select the export file format")
+       public final ListSingleSelection<String> options;
+
+       private final Map<String,CyFileFilter> descriptionFilterMap;
+
+       protected final T writerManager;
+
+    public AbstractCyWriter(T writerManager) {
+               if ( writerManager == null )
+                       throw new NullPointerException("CyWriterManager is 
null");
+        this.writerManager = writerManager;
+
+        descriptionFilterMap = new TreeMap<String,CyFileFilter>();
+        for ( CyFileFilter f : writerManager.getAvailableWriters() )
+            descriptionFilterMap.put( f.getDescription(), f );
+   
+        options = new ListSingleSelection<String>( new ArrayList<String>( 
descriptionFilterMap.keySet() ) );
+    }
+
+       public final void run(TaskMonitor tm) {
+               if ( outputFile == null )
+                       throw new NullPointerException("Output file has not be 
specified!");
+
+               String desc = options.getSelectedValue();
+               if ( desc == null )
+                       throw new NullPointerException("No file type has been 
specified!");
+
+               CyFileFilter filter = descriptionFilterMap.get(desc);
+               if ( filter == null )
+                       throw new NullPointerException("No file filter found 
for specified file type!");
+               
+               CyWriter writer = getWriter(filter,outputFile); 
+        if ( writer == null )
+            throw new NullPointerException("No CyWriter found for specified 
file type!");
+
+               insertTaskAfterCurrentTask( writer );
+       }
+
+       protected abstract CyWriter getWriter(CyFileFilter filter, File out);
+
+       public void cancel() {
+               cancelTask = true;
+       }
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriter.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriter.java    
                            (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriter.java    
    2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,24 @@
+
+package org.cytoscape.io.write;
+
+import org.cytoscape.model.CyNetwork;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+/**
+ */
+public final class CyNetworkWriter extends 
AbstractCyWriter<CyNetworkWriterManager> {
+
+       private final CyNetwork network;
+
+    public CyNetworkWriter(CyNetworkWriterManager writerManager, CyNetwork 
network ) {
+               super(writerManager);
+               if ( network == null )
+                       throw new NullPointerException("Network is null");
+               this.network = network;
+       }
+
+       protected CyWriter getWriter(CyFileFilter filter, File file) {
+               return writerManager.getWriter(network,filter,file);
+       }
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterFactory.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterFactory.java
                         (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterFactory.java
 2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,13 @@
+package org.cytoscape.io.write;
+
+import java.io.IOException;
+
+import org.cytoscape.io.FileIOFactory;
+import org.cytoscape.model.CyNetwork;
+
+/**
+ *
+ */
+public interface CyNetworkWriterFactory extends CyWriterFactory {
+       void setNetwork(CyNetwork net);
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterManager.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterManager.java
                         (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyNetworkWriterManager.java
 2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,47 @@
+/*
+ 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.write;
+
+import org.cytoscape.model.CyNetwork;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+/**
+ * Central registry for all Cytoscape export classes.
+ */
+public interface CyNetworkWriterManager extends CyWriterManager {
+
+       CyWriter getWriter(CyNetwork net, CyFileFilter filter, File file);
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriter.java
===================================================================
--- core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriter.java  
                        (rev 0)
+++ core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriter.java  
2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,24 @@
+
+package org.cytoscape.io.write;
+
+import org.cytoscape.model.CyTable;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+/**
+ */
+public final class CyTableWriter extends 
AbstractCyWriter<CyTableWriterManager> {
+
+       private final CyTable table;
+
+    public CyTableWriter(CyTableWriterManager writerManager, CyTable table ) {
+               super(writerManager);
+               if ( table == null )
+                       throw new NullPointerException("Table is null");
+               this.table = table;
+       }
+
+       protected CyWriter getWriter(CyFileFilter filter, File file) {
+               return writerManager.getWriter(table,filter,file);
+       }
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterFactory.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterFactory.java
                           (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterFactory.java
   2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,14 @@
+package org.cytoscape.io.write;
+
+import java.io.IOException;
+
+import org.cytoscape.io.FileIOFactory;
+import org.cytoscape.model.CyTable;
+
+/**
+ * Returns a Task that will write
+ */
+public interface CyTableWriterFactory extends CyWriterFactory {
+
+       void setTable(CyTable table);
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterManager.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterManager.java
                           (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyTableWriterManager.java
   2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,44 @@
+/*
+ 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.write;
+
+import org.cytoscape.model.CyTable;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+public interface CyTableWriterManager extends CyWriterManager {
+       CyWriter getWriter(CyTable table, CyFileFilter filter, File file);
+}
+

Modified: core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriter.java
===================================================================
--- core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriter.java       
2010-09-09 21:28:06 UTC (rev 21781)
+++ core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriter.java       
2010-09-10 00:43:07 UTC (rev 21782)
@@ -1,31 +1,10 @@
 
+
 package org.cytoscape.io.write;
 
-import org.cytoscape.io.FileIOFactory;
-import java.io.File;
+import org.cytoscape.work.Task;
 
 /**
- * An interface that should be extended to write any type of 
- * data. Writers for specific types of data, like networks or
- * attributes, will extend this interface and provide setter
- * methods to specify the output content.  Writers may be
- * composed of several child interfaces to support writing of
- * heterogenous data types (i.e. networks AND attributes).
  */
-public interface CyWriter extends FileIOFactory {
-
-       /**
-        * When called this method will write whatever data it has been
-        * provided by its extending interfaces to the specified {...@link 
File}.
-        * @param f The {...@link File} that will be written to by this writer.
-        */
-       public void write(File f);
-
-       /**
-        * Cancels writing if one thread is waiting for the completion of
-        * <code>CyWriter.write()</code>.
-        * <code>CyWriter.write()</code> will prematurely terminate by
-        * throwing an <code>IOException</code>.
-        */
-       public void cancel();
+public interface CyWriter extends Task {
 }

Modified: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterFactory.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterFactory.java    
    2010-09-09 21:28:06 UTC (rev 21781)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterFactory.java    
    2010-09-10 00:43:07 UTC (rev 21782)
@@ -1,11 +1,13 @@
 package org.cytoscape.io.write;
 
-import java.io.IOException;
+import java.io.File;
 
 import org.cytoscape.io.FileIOFactory;
 
+/**
+ *
+ */
 public interface CyWriterFactory extends FileIOFactory {
-       
-       public CyWriter getWriter() throws IOException;
-
+       void setOutputFile(File f);
+       CyWriter getWriter();
 }

Modified: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterManager.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterManager.java    
    2010-09-09 21:28:06 UTC (rev 21781)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/CyWriterManager.java    
    2010-09-10 00:43:07 UTC (rev 21782)
@@ -34,31 +34,21 @@
  */
 package org.cytoscape.io.write;
 
-import java.util.Map;
+import java.util.List;
+import java.io.File;
 
-import org.cytoscape.io.DataCategory;
+import org.cytoscape.io.CyFileFilter;
 
 /**
- * Central registry for all Cytoscape import classes.
+ * Central registry for all Cytoscape export classes.
  */
 public interface CyWriterManager {
 
-       /*
-        * Not generic because Spring does not support it now.
-        */
-       @SuppressWarnings("unchecked")
-       public void addWriterFactory(CyWriterFactory factory, Map props);
-
-       @SuppressWarnings("unchecked")
-       public void removeWriterFactory(CyWriterFactory factory, Map props);
-
        /**
-        * Get a file writer if the file type is supported in Cytoscape.
-        * 
-        * @param fileName
-        * @return
-        * @throws IllegalArgumentException File type is not supported.
+        * Will return the names of the avai 
         */
-       public CyWriter getWriter(DataCategory category) throws 
IllegalArgumentException;
+       List<CyFileFilter> getAvailableWriters();
 
+
+       public CyWriterFactory getMatchingFactory(CyFileFilter filter, File 
outFile); 
 }

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriter.java
===================================================================
--- core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriter.java  
                        (rev 0)
+++ core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriter.java  
2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,54 @@
+
+package org.cytoscape.io.write;
+
+import org.cytoscape.session.CySessionManager;
+import org.cytoscape.io.CyFileFilter;
+import org.cytoscape.work.TaskMonitor;
+import org.cytoscape.work.AbstractTask;
+import java.io.File;
+import java.util.List;
+
+/**
+ */
+public final class SessionWriter extends AbstractTask implements CyWriter {
+
+       private final CySessionManager sessionMgr; 
+       private final SessionWriterManager writerMgr; 
+       private final File outputFile; 
+
+       private boolean cancelTask;
+
+    public SessionWriter(SessionWriterManager writerMgr, CySessionManager 
sessionMgr, File outputFile) {
+
+               if ( writerMgr == null )
+                       throw new NullPointerException("Writer Manager is 
null");
+               this.writerMgr = writerMgr;
+
+               if ( sessionMgr == null )
+                       throw new NullPointerException("Session Manager is 
null");
+               this.sessionMgr = sessionMgr;
+
+               if ( outputFile == null )
+                       throw new NullPointerException("Output File is null");
+               this.outputFile = outputFile;
+       }
+
+       public final void run(TaskMonitor tm) {
+
+               List<CyFileFilter> filters = writerMgr.getAvailableWriters();
+               if ( filters == null || filters.size() < 1)
+                       throw new NullPointerException("No Session file filters 
found");
+               if ( filters.size() > 1 )
+                       throw new IllegalArgumentException("Found too many 
session filters!");
+
+               CyWriter writer = 
writerMgr.getWriter(sessionMgr,filters.get(0),outputFile); 
+        if ( writer == null )
+            throw new NullPointerException("No CyWriter found for specified 
file type!");
+
+               insertTaskAfterCurrentTask( writer );
+       }
+
+       public void cancel() {
+               cancelTask = true;
+       }
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterFactory.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterFactory.java
                           (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterFactory.java
   2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,12 @@
+package org.cytoscape.io.write;
+
+
+import org.cytoscape.session.CySessionManager;
+
+/**
+ * Returns a Task that will write
+ */
+public interface SessionWriterFactory extends CyWriterFactory {
+
+       void setSessionManager(CySessionManager mgr);
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterManager.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterManager.java
                           (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/SessionWriterManager.java
   2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,44 @@
+/*
+ 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.write;
+
+import org.cytoscape.session.CySessionManager;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+public interface SessionWriterManager extends CyWriterManager {
+
+       CyWriter getWriter(CySessionManager mgr, CyFileFilter filter, File 
file);
+}

Added: core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriter.java
===================================================================
--- core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriter.java     
                        (rev 0)
+++ core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriter.java     
2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,31 @@
+
+package org.cytoscape.io.write;
+
+import org.cytoscape.view.model.View;
+import org.cytoscape.view.presentation.RenderingEngine;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+/**
+ */
+public final class ViewWriter extends AbstractCyWriter<ViewWriterManager> {
+
+       private final View<?> view;
+       private final RenderingEngine re;
+
+    public ViewWriter(ViewWriterManager writerManager, View<?> view, 
RenderingEngine re ) {
+               super(writerManager);
+
+               if ( view == null )
+                       throw new NullPointerException("view is null");
+               this.view = view;
+
+               if ( re == null )
+                       throw new NullPointerException("rendering engine is 
null");
+               this.re = re;
+       }
+
+       protected CyWriter getWriter(CyFileFilter filter, File file) {
+               return writerManager.getWriter(view,re,filter,file);
+       }
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterFactory.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterFactory.java  
                            (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterFactory.java  
    2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,13 @@
+package org.cytoscape.io.write;
+
+
+import org.cytoscape.view.presentation.RenderingEngine;
+import org.cytoscape.view.model.View;
+
+/**
+ * Returns a Task that will write
+ */
+public interface ViewWriterFactory extends CyWriterFactory {
+
+       void setViewRenderer(View<?> view, RenderingEngine re);
+}

Added: 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterManager.java
===================================================================
--- 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterManager.java  
                            (rev 0)
+++ 
core3/io-api/trunk/src/main/java/org/cytoscape/io/write/ViewWriterManager.java  
    2010-09-10 00:43:07 UTC (rev 21782)
@@ -0,0 +1,45 @@
+/*
+ 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.write;
+
+import org.cytoscape.view.model.View;
+import org.cytoscape.view.presentation.RenderingEngine;
+import org.cytoscape.io.CyFileFilter;
+import java.io.File;
+
+public interface ViewWriterManager extends CyWriterManager {
+
+       CyWriter getWriter(View<?> view, RenderingEngine re, CyFileFilter 
filter, File file);
+}

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