Author: jm
Date: 2011-05-03 09:36:28 -0700 (Tue, 03 May 2011)
New Revision: 24896

Added:
   
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractTableTaskFactory.java
   
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskFactoryTest.java
   
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskTest.java
Removed:
   
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTask.java
   
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTaskFactory.java
   
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskFactoryTest.java
   
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
Modified:
   
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/exporttable/ExportCurrentTableTaskFactory.java
Log:
Removed AbstractDataTableTask since it's the same as AbstractTableTask
Renamed AbstractDataTableTaskFactory to AbstractTableTaskFactory


Deleted: 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTask.java
===================================================================
--- 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTask.java
       2011-05-03 00:47:13 UTC (rev 24895)
+++ 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTask.java
       2011-05-03 16:36:28 UTC (rev 24896)
@@ -1,50 +0,0 @@
-/*
-
-  Copyright (c) 2006, 2010, The Cytoscape Consortium (www.cytoscape.org)
-
-  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.task;
-
-
-import org.cytoscape.model.CyTable;
-import org.cytoscape.work.AbstractTask;
-
-
-public abstract class AbstractDataTableTask extends AbstractTask {
-       /** The table that this task operates on.
-        */
-       final protected CyTable table;
-
-       /** Initialises the Task with the table that it will operate on.
-        *  @param table  the reference to a CyTable that descendent tasks will 
operate on
-        */
-       public AbstractDataTableTask(final CyTable table) {
-               if (table == null)
-                       throw new NullPointerException("CyTable is null");
-
-               this.table = table;     
-       }
-}

Deleted: 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTaskFactory.java
===================================================================
--- 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTaskFactory.java
        2011-05-03 00:47:13 UTC (rev 24895)
+++ 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTaskFactory.java
        2011-05-03 16:36:28 UTC (rev 24896)
@@ -1,49 +0,0 @@
-/*
-  Copyright (c) 2006, 2010, The Cytoscape Consortium (www.cytoscape.org)
-
-  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.task;
-
-
-import org.cytoscape.model.CyTable;
-
-
-public abstract class AbstractDataTableTaskFactory implements 
DataTableTaskFactory {
-       /** The table that will be passed into any Task constructor.
-        */
-       protected CyTable table;
-
-       /** Provisions this factory with a table that will be used to construct 
tasks.
-        *  @param table the {@link CyTable} to be passed into 
<code>Task</code> constructors; <b>must</b> not be null!
-        */
-       public void setDataTable(final CyTable table) {
-               if (table == null)
-                       throw new NullPointerException("CyTable is null");
-
-               this.table = table;
-       }
-
-}

Copied: 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractTableTaskFactory.java
 (from rev 24891, 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractDataTableTaskFactory.java)
===================================================================
--- 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractTableTaskFactory.java
                            (rev 0)
+++ 
core3/core-task-api/trunk/src/main/java/org/cytoscape/task/AbstractTableTaskFactory.java
    2011-05-03 16:36:28 UTC (rev 24896)
@@ -0,0 +1,49 @@
+/*
+  Copyright (c) 2006, 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+  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.task;
+
+
+import org.cytoscape.model.CyTable;
+
+
+public abstract class AbstractTableTaskFactory implements DataTableTaskFactory 
{
+       /** The table that will be passed into any Task constructor.
+        */
+       protected CyTable table;
+
+       /** Provisions this factory with a table that will be used to construct 
tasks.
+        *  @param table the {@link CyTable} to be passed into 
<code>Task</code> constructors; <b>must</b> not be null!
+        */
+       public void setDataTable(final CyTable table) {
+               if (table == null)
+                       throw new NullPointerException("CyTable is null");
+
+               this.table = table;
+       }
+
+}

Deleted: 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskFactoryTest.java
===================================================================
--- 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskFactoryTest.java
    2011-05-03 00:47:13 UTC (rev 24895)
+++ 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskFactoryTest.java
    2011-05-03 16:36:28 UTC (rev 24896)
@@ -1,83 +0,0 @@
-/*
-  Copyright (c) 2010, 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.task;
-
-import static org.mockito.Mockito.*;
-import static org.junit.Assert.*;
-import org.junit.Test;
-import org.junit.Before;
-
-import org.cytoscape.model.CyTableFactory;
-import org.cytoscape.model.CyTable;
-
-import org.cytoscape.work.TaskIterator;
-
-public class AbstractDataTableTaskFactoryTest {
-       
-       private class DataTableTaskFactory extends AbstractDataTableTaskFactory 
{
-               public TaskIterator getTaskIterator() {
-                       return null;
-               }
-       }
-
-       DataTableTaskFactory factory; 
-
-       @Before
-       public void setUp() {
-               factory = new DataTableTaskFactory();
-       }
-       
-       @Test(expected=NullPointerException.class)
-       public void testNullSetDataTable() throws Exception {
-               factory.setDataTable(null);
-       }
-
-       @Test
-       public void testGoodSetDataTable() throws Exception {
-               factory.setDataTable(mock(CyTable.class));
-               assertNotNull( factory.table );
-       }
-
-       @Test
-       public void testNotFinal() throws Exception {
-               factory.setDataTable(mock(CyTable.class));
-               CyTable t1 = factory.table;
-               factory.setDataTable(mock(CyTable.class));
-               CyTable t2 = factory.table;
-               assertFalse( (t1 == t2) );
-       }
-}

Deleted: 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
===================================================================
--- 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
   2011-05-03 00:47:13 UTC (rev 24895)
+++ 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
   2011-05-03 16:36:28 UTC (rev 24896)
@@ -1,69 +0,0 @@
-/*
-  Copyright (c) 2010, 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.task;
-
-import static org.mockito.Mockito.*;
-import static org.junit.Assert.*;
-import org.junit.Test;
-
-import org.cytoscape.model.CyTable;
-import org.cytoscape.work.TaskMonitor;
-
-public class AbstractDataTableTaskTest {
-       
-       private class DataTableTask extends AbstractDataTableTask {
-               DataTableTask(CyTable tab) { super(tab); }
-               public void run(TaskMonitor tm) { 
-                       assertNotNull(table);
-               }
-
-               @Override
-               public void cancel() {
-               }
-       }
-       
-       @Test(expected=NullPointerException.class)
-       public void testNullDataTable() throws Exception {
-               new DataTableTask(null);
-       }
-
-       @Test
-       public void testGoodDataTable() throws Exception {
-               DataTableTask rt = new DataTableTask( mock(CyTable.class) );
-               rt.run(mock(TaskMonitor.class));
-       }
-}

Copied: 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskFactoryTest.java
 (from rev 24837, 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskFactoryTest.java)
===================================================================
--- 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskFactoryTest.java
                                (rev 0)
+++ 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskFactoryTest.java
        2011-05-03 16:36:28 UTC (rev 24896)
@@ -0,0 +1,82 @@
+/*
+  Copyright (c) 2010, 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.task;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.mock;
+
+import org.cytoscape.model.CyTable;
+import org.cytoscape.work.TaskIterator;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AbstractTableTaskFactoryTest {
+       
+       private class TableTaskFactory extends AbstractTableTaskFactory {
+               public TaskIterator getTaskIterator() {
+                       return null;
+               }
+       }
+
+       TableTaskFactory factory; 
+
+       @Before
+       public void setUp() {
+               factory = new TableTaskFactory();
+       }
+       
+       @Test(expected=NullPointerException.class)
+       public void testNullSetDataTable() throws Exception {
+               factory.setDataTable(null);
+       }
+
+       @Test
+       public void testGoodSetDataTable() throws Exception {
+               factory.setDataTable(mock(CyTable.class));
+               assertNotNull( factory.table );
+       }
+
+       @Test
+       public void testNotFinal() throws Exception {
+               factory.setDataTable(mock(CyTable.class));
+               CyTable t1 = factory.table;
+               factory.setDataTable(mock(CyTable.class));
+               CyTable t2 = factory.table;
+               assertFalse( (t1 == t2) );
+       }
+}

Copied: 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskTest.java
 (from rev 24837, 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java)
===================================================================
--- 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskTest.java
                               (rev 0)
+++ 
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractTableTaskTest.java
       2011-05-03 16:36:28 UTC (rev 24896)
@@ -0,0 +1,69 @@
+/*
+  Copyright (c) 2010, 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.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.model.CyTable;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractTableTaskTest {
+       
+       private class DataTableTask extends AbstractTableTask {
+               DataTableTask(CyTable tab) { super(tab); }
+               public void run(TaskMonitor tm) { 
+                       assertNotNull(table);
+               }
+
+               @Override
+               public void cancel() {
+               }
+       }
+       
+       @Test(expected=NullPointerException.class)
+       public void testNullDataTable() throws Exception {
+               new DataTableTask(null);
+       }
+
+       @Test
+       public void testGoodDataTable() throws Exception {
+               DataTableTask rt = new DataTableTask( mock(CyTable.class) );
+               rt.run(mock(TaskMonitor.class));
+       }
+}

Modified: 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/exporttable/ExportCurrentTableTaskFactory.java
===================================================================
--- 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/exporttable/ExportCurrentTableTaskFactory.java
 2011-05-03 00:47:13 UTC (rev 24895)
+++ 
core3/core-task-impl/trunk/src/main/java/org/cytoscape/task/internal/exporttable/ExportCurrentTableTaskFactory.java
 2011-05-03 16:36:28 UTC (rev 24896)
@@ -1,11 +1,11 @@
 package org.cytoscape.task.internal.exporttable;
 
 import org.cytoscape.io.write.CyTableWriterManager;
-import org.cytoscape.task.AbstractDataTableTaskFactory;
+import org.cytoscape.task.AbstractTableTaskFactory;
 import org.cytoscape.task.internal.io.CyTableWriter;
 import org.cytoscape.work.TaskIterator;
 
-public class ExportCurrentTableTaskFactory extends 
AbstractDataTableTaskFactory {
+public class ExportCurrentTableTaskFactory extends AbstractTableTaskFactory {
 
        private final CyTableWriterManager writerManager;
 

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