Author: scooter
Date: 2012-03-15 01:44:52 -0700 (Thu, 15 Mar 2012)
New Revision: 28548

Added:
   core3/api/trunk/group-data-api/
   core3/api/trunk/group-data-api/pom.xml
   core3/api/trunk/group-data-api/src/
   core3/api/trunk/group-data-api/src/main/
   core3/api/trunk/group-data-api/src/main/java/
   core3/api/trunk/group-data-api/src/main/java/org/
   core3/api/trunk/group-data-api/src/main/java/org/cytoscape/
   core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/
   core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/
   
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/Aggregator.java
   
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/AttributeHandlingType.java
   
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/CyGroupSettings.java
Modified:
   core3/api/trunk/pom.xml
Log:
Added group-data-api


Added: core3/api/trunk/group-data-api/pom.xml
===================================================================
--- core3/api/trunk/group-data-api/pom.xml                              (rev 0)
+++ core3/api/trunk/group-data-api/pom.xml      2012-03-15 08:44:52 UTC (rev 
28548)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+       <parent>
+               <artifactId>api-parent</artifactId>
+               <groupId>org.cytoscape</groupId>
+               <version>3.0.0-alpha8-SNAPSHOT</version>
+       </parent>
+
+       <properties>
+               
<bundle.symbolicName>org.cytoscape.group-data-api</bundle.symbolicName>
+               <bundle.namespace>org.cytoscape.group.data</bundle.namespace>
+       </properties>
+
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.cytoscape</groupId>
+       <artifactId>group-data-api</artifactId>
+
+       <name>${bundle.symbolicName} [${bundle.namespace}]</name>
+
+       <packaging>bundle</packaging>
+
+       <repositories>
+               <!-- bootstrap for cytoscape dependencies, namely the parent 
POM snapshots -->
+               <repository>
+                       <id>cytoscape_snapshots</id>
+                       <snapshots>
+                               <enabled>true</enabled>
+                       </snapshots>
+                       <releases>
+                               <enabled>false</enabled>
+                       </releases>
+                       <name>Cytoscape Snapshots</name>
+                       
<url>http://code.cytoscape.org/nexus/content/repositories/snapshots/</url>
+               </repository>
+               <!-- bootstrap for cytoscape dependencies, namely the parent 
POM releases -->
+               <repository>
+                       <id>cytoscape_releases</id>
+                       <snapshots>
+                               <enabled>false</enabled>
+                       </snapshots>
+                       <releases>
+                               <enabled>true</enabled>
+                       </releases>
+                       <name>Cytoscape Releases</name>
+                       
<url>http://code.cytoscape.org/nexus/content/repositories/releases/</url>
+               </repository>
+       </repositories>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               
<version>${maven-bundle-plugin.version}</version>
+                               <extensions>true</extensions>
+                               <configuration>
+                                       <instructions>
+                                               
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
+                                               
<Bundle-Version>${project.version}</Bundle-Version>
+                                               
<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${project.version}"</Export-Package>
+                                               
<Private-Package>${bundle.namespace}.internal.*</Private-Package>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-jar-plugin</artifactId>
+                               <version>${maven-jar-plugin.version}</version>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>test-jar</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>model-api</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>group-api</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-all</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>event-api</artifactId>
+                       <version>${project.version}</version>
+                       <type>test-jar</type>
+                       <scope>test</scope>
+               </dependency>
+
+       </dependencies>
+
+</project>

Added: 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/Aggregator.java
===================================================================
--- 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/Aggregator.java
                               (rev 0)
+++ 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/Aggregator.java
       2012-03-15 08:44:52 UTC (rev 28548)
@@ -0,0 +1,20 @@
+package org.cytoscape.group.data;
+
+import org.cytoscape.group.CyGroup;
+import org.cytoscape.model.CyColumn;
+import org.cytoscape.model.CyTable;
+  
+public interface Aggregator<T> {
+       /**
+        * Aggregate the column for the members of the specified group into
+        * the group.
+        *
+        * @param table the CyTable for this group
+        * @param group the group
+        * @param column the column we're aggregating
+        * @return the aggregated value
+        */
+  public <T> T aggregate(CyTable table, CyGroup group, CyColumn column);
+    
+} 
+

Added: 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/AttributeHandlingType.java
===================================================================
--- 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/AttributeHandlingType.java
                            (rev 0)
+++ 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/AttributeHandlingType.java
    2012-03-15 08:44:52 UTC (rev 28548)
@@ -0,0 +1,61 @@
+/* vim: set ts=2: */
+/**
+ * Copyright (c) 2008 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *   1. Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions, and the following disclaimer.
+ *   2. Redistributions in binary form must reproduce the above
+ *      copyright notice, this list of conditions, and the following
+ *      disclaimer in the documentation and/or other materials provided
+ *      with the distribution.
+ *   3. Redistributions must acknowledge that this software was
+ *      originally developed by the UCSF Computer Graphics Laboratory
+ *      under support by the NIH National Center for Research Resources,
+ *      grant P41-RR01081.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+package org.cytoscape.group.data;
+
+/**
+ * The AttributeHandlingType enum contains the list of all of the
+ * different ways that attributes can be aggregated. Note that there
+ * is no explicit mapping from attribute type to allowable attribute
+ * aggregation type.  That mapping is contained within the various
+ * AttributeHandlingType arrays defined below.
+ */
+public enum AttributeHandlingType {
+       NONE("None"),
+       CSV("Comma-separated Values"),
+       TSV("Tab-separated Values"),
+       MCV("Most Common Value"),
+       SUM("Sum"),
+       AVG("Average"),
+       MIN("Minimum value"),
+       MAX("Maximum value"),
+       MEDIAN("Median value"),
+       CONCAT("Concatenate"),
+       UNIQUE("Unique Values"),
+       AND("Logical AND"),
+       OR("Logical OR"),
+       DEFAULT("(no override)");
+
+       private String name;
+       private AttributeHandlingType(String s) { name = s; }
+       public String toString() { return name; }
+}

Added: 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/CyGroupSettings.java
===================================================================
--- 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/CyGroupSettings.java
                          (rev 0)
+++ 
core3/api/trunk/group-data-api/src/main/java/org/cytoscape/group/data/CyGroupSettings.java
  2012-03-15 08:44:52 UTC (rev 28548)
@@ -0,0 +1,109 @@
+/* vim: set ts=2: */
+/**
+ * Copyright (c) 2012 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *   1. Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions, and the following disclaimer.
+ *   2. Redistributions in binary form must reproduce the above
+ *      copyright notice, this list of conditions, and the following
+ *      disclaimer in the documentation and/or other materials provided
+ *      with the distribution.
+ *   3. Redistributions must acknowledge that this software was
+ *      originally developed by the UCSF Computer Graphics Laboratory
+ *      under support by the NIH National Center for Research Resources,
+ *      grant P41-RR01081.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+package org.cytoscape.group.data;
+
+import org.cytoscape.group.CyGroup;
+import org.cytoscape.model.CyColumn;
+import org.cytoscape.model.CyTable;
+
+/**
+ * CyGroupSettings provides interfaces to access user-requested settings
+ * that influence how the {@link CyGroup} system works.  There are several 
groups
+ * of settings that influence different aspects of groups: visual settings,
+ * attribute aggregation settings, user interaction settings.
+ *
+ * <b>Visual Settings</b>
+ *
+ * <b>Attribute Aggregation Settings</b>
+ *
+ * <b>User Interaction Settings</b>
+ * <ul><li>Double-click action: what should happen when a user double-clicks 
+ * on a group node or a group member.  This can be either: <i>None</i>, 
<i>ExpandContract</i>,
+ * or <i>Select</i>.</li>
+ * </ul>
+ */
+
+public interface CyGroupSettings {
+       enum DoubleClickAction { 
+               None("None"), 
+               ExpandContract("Expand/Contract"), 
+               Select("Select");
+
+               private final String name;
+               DoubleClickAction(String n) {this.name = n;}
+               public String toString() {return name;}
+ }
+
+       /**
+        * Get the action to use when the user double-clicks on a group node or 
member node.
+        * This settings has no impact if Cytoscape is headless.
+        *
+        * @return the double-click action
+        */
+       public DoubleClickAction getDoubleClickAction();
+
+       /**
+        * Set the action to use when the user double-clicks on a group node or 
member node.
+        * This settings has no impact if Cytoscape is headless.
+        *
+        * @param action the double-click action
+        */
+       public void setDoubleClickAction(DoubleClickAction action);
+
+       /**
+        * Determine whether attribute aggregation (aggregating all of the 
attributes from member nodes
+        * onto the group node).
+        *
+        * @return whether attribute aggregation is enabled (true) or not 
(false)
+        */
+       public boolean getEnableAttributeAggregation();
+
+       /**
+        * Set whether attribute aggregation (aggregating all of the attributes 
from member nodes
+        * onto the group node).
+        *
+        * @param aggregateAttributes whether attribute aggregation is enabled 
(true) or not (false)
+        */
+       public void setEnableAttributeAggregation(boolean aggregateAttributes);
+
+  public Aggregator getAggregator(CyGroup group, CyColumn column);
+
+  public void setDefaultAggregation(CyGroup group, Class ovClass, Aggregator 
agg);
+
+  public void setDefaultAggregation(Class ovClass, Aggregator agg);
+
+  public void setOverrideAggregation(CyGroup group, CyColumn column, 
Aggregator agg);
+
+  public void setOverrideAggregation(CyColumn column, Aggregator agg);
+
+}

Modified: core3/api/trunk/pom.xml
===================================================================
--- core3/api/trunk/pom.xml     2012-03-15 08:43:34 UTC (rev 28547)
+++ core3/api/trunk/pom.xml     2012-03-15 08:44:52 UTC (rev 28548)
@@ -39,6 +39,7 @@
                <module>application-api</module>
                <module>datasource-api</module>
                <module>group-api</module>
+               <module>group-data-api</module>
                <module>webservice-swing-api</module>
        </modules>
 
@@ -87,4 +88,4 @@
                </plugins>
        </build>
 
-</project>
\ No newline at end of file
+</project>

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