Author: scooter
Date: 2012-04-25 21:40:49 -0700 (Wed, 25 Apr 2012)
New Revision: 29012

Modified:
   core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroup.java
   
core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroupFactory.java
   
core3/api/trunk/group-api/src/test/java/org/cytoscape/group/AbstractCyGroupTest.java
Log:
Add method to support session loading of groups.  Also remove
methods in the API to be conceptually consistent with the changes
in the events.


Modified: 
core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroup.java
===================================================================
--- core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroup.java    
2012-04-26 01:05:49 UTC (rev 29011)
+++ core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroup.java    
2012-04-26 04:40:49 UTC (rev 29012)
@@ -95,29 +95,6 @@
        CyNetwork getGroupNetwork();
 
        /**
-        * Add a node to a group
-        *
-        * @param node the node to add
-        */
-       void addNode(CyNode node);
-
-       /**
-        * Add an internal edge to a group.  Both the source and destination
-        * nodes must already be added.
-        *
-        * @param edge the edge to add
-        */
-       void addInternalEdge(CyEdge edge);
-
-       /**
-        * Add an external edge to a group.  One of the source and destination
-        * nodes must already be added.
-        *
-        * @param edge the edge to add
-        */
-       void addExternalEdge(CyEdge edge);
-
-       /**
         * Add a list of nodes and their edges
         *
         * @param nodes the list of nodes to add

Modified: 
core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroupFactory.java
===================================================================
--- 
core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroupFactory.java 
    2012-04-26 01:05:49 UTC (rev 29011)
+++ 
core3/api/trunk/group-api/src/main/java/org/cytoscape/group/CyGroupFactory.java 
    2012-04-26 04:40:49 UTC (rev 29012)
@@ -83,4 +83,17 @@
        public CyGroup createGroup(CyNetwork network, 
                                   CyNode node, List<CyNode>nodes, 
                                   List<CyEdge> edges, boolean register);
+
+       /**
+        * Creates a CyGroup object in the referenced network from 
+        * an existing {@link CyNode}. If the {@link CyNode} has a
+        * network pointer in the same root network as the referenced
+        * network, it is used as the group network.
+        *
+        * @param network the {@link CyNetwork} this group is part of
+        * @param node the {@link CyNode} to convert into a group
+        * @param register if true, register the {@link CyGroup}
+        * @return A new {@link CyGroup} as part of the designated network.
+        */
+       public CyGroup createGroup(CyNetwork network, CyNode node, boolean 
register);
 }

Modified: 
core3/api/trunk/group-api/src/test/java/org/cytoscape/group/AbstractCyGroupTest.java
===================================================================
--- 
core3/api/trunk/group-api/src/test/java/org/cytoscape/group/AbstractCyGroupTest.java
        2012-04-26 01:05:49 UTC (rev 29011)
+++ 
core3/api/trunk/group-api/src/test/java/org/cytoscape/group/AbstractCyGroupTest.java
        2012-04-26 04:40:49 UTC (rev 29012)
@@ -95,7 +95,9 @@
 
        @Test
        public void testAddExternalEdge() {
-               group.addExternalEdge(edge5);
+               List<CyEdge> edgeList = new ArrayList<CyEdge>();
+               edgeList.add(edge5);
+               group.addEdges(edgeList);
     assertTrue("group external edge count = 3", 
group.getExternalEdgeList().size() == 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.

Reply via email to