[kepler-code] r28801 - in trunk/modules: science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship science-pipes-frontend/WebContent/editor/parts

barseghian at ecoinformatics.org barseghian at ecoinformatics.org
Fri Oct 14 18:54:25 PDT 2011


Author: barseghian
Date: 2011-10-14 18:54:25 -0700 (Fri, 14 Oct 2011)
New Revision: 28801

Modified:
   trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurveCalc.java
   trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurvePlot.java
   trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.LifeTable.meta.xml
   trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurveCalc.meta.xml
   trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurvePlot.meta.xml
   trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor.meta.xml
   trunk/modules/science-pipes-frontend/WebContent/editor/parts/survivorship-actors.xml
Log:
improve naming of ports and data actor
add group-by user choice in frontend version of SurvivalCurveCalc

Modified: trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurveCalc.java
===================================================================
--- trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurveCalc.java	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurveCalc.java	2011-10-15 01:54:25 UTC (rev 28801)
@@ -106,10 +106,10 @@
 		// TODO: could probably change from read.table to read.csv
 		// XXX currently allowing strings with single quotes inside that are not in double quotes
 		String survivalCurveRcode = "" +
-			"demographyData <- read.table(\""+demographyFile.toString()+"\", sep=\",\", quote=\"\\\"\", header = TRUE)\n"+
+			"demographyData <- read.table(\"" + demographyFile.toString() + "\", sep=\",\", quote=\"\\\"\", header = TRUE)\n"+
 			"library(survival)\n" +
 			"attach(demographyData)\n" +
-			"demographyData.survFit <- survfit(Surv(Age) ~ "+groupByChoice+", conf.type=\"none\")\n" + 
+			"demographyData.survFit <- survfit(Surv(Age) ~ " + groupByChoice + ", conf.type=\"none\")\n" + 
 			"out <- demographyData.survFit\n";
 		
 		expression.setExpression(survivalCurveRcode);

Modified: trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurvePlot.java
===================================================================
--- trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurvePlot.java	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-backend/src/edu/cornell/birds/is/bap/actor/survivorship/SurvivalCurvePlot.java	2011-10-15 01:54:25 UTC (rev 28801)
@@ -72,7 +72,7 @@
 	public PortParameter yLabelPort;
 	public TypedIOPort outPort;
 	public PortParameter titlePort;
-	public PortParameter auxTitlePort;
+	public PortParameter subTitlePort;
 	public Parameter widthParameter;
 	public Parameter heightParameter;
 	public TypedIOPort dataPort;
@@ -108,9 +108,9 @@
 		titlePort.setDisplayName("Title");
 		titlePort.setStringMode(true);
 		
-		auxTitlePort = new PortParameter(this, "auxiliaryTitle");
-		auxTitlePort.setDisplayName("Auxiliary Title");
-		auxTitlePort.setStringMode(true);
+		subTitlePort = new PortParameter(this, "subTitle");
+		subTitlePort.setDisplayName("Auxiliary Title");
+		subTitlePort.setStringMode(true);
 
 		widthParameter = new Parameter(this, "width");
 		widthParameter.setTypeEquals(BaseType.INT);
@@ -189,8 +189,8 @@
     	titlePort.update();
     	Token titleToken = titlePort.getToken();
     	
-    	auxTitlePort.update();
-    	Token auxTitleToken = auxTitlePort.getToken(); 
+    	subTitlePort.update();
+    	Token auxTitleToken = subTitlePort.getToken(); 
     	
     	if (titleToken != null) { 
     		b.append(((StringToken)titleToken).stringValue());

Modified: trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.LifeTable.meta.xml
===================================================================
--- trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.LifeTable.meta.xml	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.LifeTable.meta.xml	2011-10-15 01:54:25 UTC (rev 28801)
@@ -17,18 +17,18 @@
 			<configure>Life table data.</configure>
 		</property>
 	</property>
-	<property name="_iconSmall" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconSmall" class="ptolemy.kernel.util.StringAttribute" value="icon_generic.png">
     </property>
-	<property name="_iconMedium" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconMedium" class="ptolemy.kernel.util.StringAttribute" value="icon_generic.png">
     </property>
-	<property name="_iconLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_generic.png">
     </property>
-	<property name="_iconXLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconXLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_generic.png">
     </property>
     
 	<port name="dataPort" class="ptolemy.actor.TypedIOPort">
 		<property name="input"/>
-		<display name="dataPort"/>
+		<display name="Data Input"/>
 	</port>
 	<port name="output" class="ptolemy.actor.TypedIOPort">
 		<property name="output"/>

Modified: trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurveCalc.meta.xml
===================================================================
--- trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurveCalc.meta.xml	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurveCalc.meta.xml	2011-10-15 01:54:25 UTC (rev 28801)
@@ -17,22 +17,36 @@
 			<configure>Demography data to operate on.</configure>
 		</property>
 	</property>
-	<property name="_iconSmall" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconSmall" class="ptolemy.kernel.util.StringAttribute" value="icon_calculator.png">
     </property>
-	<property name="_iconMedium" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconMedium" class="ptolemy.kernel.util.StringAttribute" value="icon_calculator.png">
     </property>
-	<property name="_iconLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_calculator.png">
     </property>
-	<property name="_iconXLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconXLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_calculator.png">
     </property>
 	
 	<port name="dataPort" class="ptolemy.actor.TypedIOPort">
 		<property name="input"/>
-		<display name="dataPort"/>
+		<display name="Data Input"/>
 	</port>
 	<port name="out" class="ptolemy.actor.TypedIOPort">
 		<property name="output"/>
-		<display name="out"/>
+		<display name="Out"/>
 	</port>
+		<property name="groupByText" class="edu.cornell.birds.is.bap.ptolemy.StringChoiceParameter" value="Gender">
+		<display name="Group By"/>
+		<property name="_parameterHint" class="ptolemy.kernel.util.StringAttribute">
+        </property>
+		<property name="_visibilityHint" class="ptolemy.kernel.util.StringAttribute" value="full">
+        </property>
+		<property name="_uiHint" class="ptolemy.kernel.util.StringAttribute" value="default">
+        </property>
+		<property name="style" class="ptolemy.actor.gui.style.ChoiceStyle">
+			<property name="Gender" class="ptolemy.kernel.util.ConfigurableAttribute">
+				<configure>Gender</configure>
+			</property>
+		</property>
+	</property>
 	
 </entity>
\ No newline at end of file

Modified: trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurvePlot.meta.xml
===================================================================
--- trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurvePlot.meta.xml	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivalCurvePlot.meta.xml	2011-10-15 01:54:25 UTC (rev 28801)
@@ -19,7 +19,7 @@
 		<property name="port:xLabel" class="ptolemy.kernel.util.ConfigurableAttribute">
 			<configure>Text to use for the x-axis label</configure>
 		</property>
-		<property name="port:auxiliaryTitle" class="ptolemy.kernel.util.ConfigurableAttribute">
+		<property name="port:subTitle" class="ptolemy.kernel.util.ConfigurableAttribute">
 			<configure>Text to use for secondary chart title</configure>
 		</property>
 		<property name="port:out" class="ptolemy.kernel.util.ConfigurableAttribute">
@@ -50,13 +50,13 @@
 			<configure>Text to use for primary chart title</configure>
 		</property>
 	</property>
-	<property name="_iconSmall" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconSmall" class="ptolemy.kernel.util.StringAttribute" value="icon_line_chart.png">
     </property>
-	<property name="_iconMedium" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconMedium" class="ptolemy.kernel.util.StringAttribute" value="icon_line_chart.png">
     </property>
-	<property name="_iconLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_line_chart.png">
     </property>
-	<property name="_iconXLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_data.png">
+	<property name="_iconXLarge" class="ptolemy.kernel.util.StringAttribute" value="icon_line_chart.png">
     </property>
 	
 	<property name="title" class="ptolemy.actor.parameters.PortParameter" value="">
@@ -66,7 +66,7 @@
 		<property name="_uiHint" class="ptolemy.kernel.util.StringAttribute" value="default">
         </property>
 	</property>
-	<property name="auxiliaryTitle" class="ptolemy.actor.parameters.PortParameter" value="">
+	<property name="subTitle" class="ptolemy.actor.parameters.PortParameter" value="">
 		<display name="Sub-Title"/>
 		<property name="_parameterHint" class="ptolemy.kernel.util.StringAttribute">
         </property>
@@ -89,15 +89,15 @@
 	</property>
 	<port name="dataPort" class="ptolemy.actor.TypedIOPort">
 		<property name="input"/>
-		<display name="dataPort"/>
+		<display name="Data Input"/>
 	</port>
 	<port name="out" class="ptolemy.actor.TypedIOPort">
 		<property name="output"/>
-		<display name="image"/>
+		<display name="Image"/>
 	</port>
 	<port name="title" class="ptolemy.actor.parameters.ParameterPort">
 		<property name="input"/>
-		<display name="title"/>
+		<display name="Title"/>
 		<property name="tokenConsumptionRate" class="ptolemy.data.expr.Parameter" value="1">
 			<display name="tokenConsumptionRate"/>
 			<property name="_parameterHint" class="ptolemy.kernel.util.StringAttribute">
@@ -106,9 +106,9 @@
             </property>
 		</property>
 	</port>
-	<port name="auxiliaryTitle" class="ptolemy.actor.parameters.ParameterPort">
+	<port name="subTitle" class="ptolemy.actor.parameters.ParameterPort">
 		<property name="input"/>
-		<display name="auxiliaryTitle"/>
+		<display name="Sub-Title"/>
 		<property name="tokenConsumptionRate" class="ptolemy.data.expr.Parameter" value="1">
 			<display name="tokenConsumptionRate"/>
 			<property name="_parameterHint" class="ptolemy.kernel.util.StringAttribute">

Modified: trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor.meta.xml
===================================================================
--- trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor.meta.xml	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-frontend/WebContent/editor/parts/edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor.meta.xml	2011-10-15 01:54:25 UTC (rev 28801)
@@ -65,6 +65,6 @@
 	</port>
 	<port name="cemeteryName" class="ptolemy.actor.TypedIOPort">
 		<property name="output"/>
-		<display name="cemeteryName"/>
+		<display name="Cemetery Name"/>
 	</port>
 </entity>

Modified: trunk/modules/science-pipes-frontend/WebContent/editor/parts/survivorship-actors.xml
===================================================================
--- trunk/modules/science-pipes-frontend/WebContent/editor/parts/survivorship-actors.xml	2011-10-15 01:48:04 UTC (rev 28800)
+++ trunk/modules/science-pipes-frontend/WebContent/editor/parts/survivorship-actors.xml	2011-10-15 01:54:25 UTC (rev 28801)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <actorList name="root">
   <group name="Data" expanded="true" id="data">
-  		<actor class="edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor" name="SurvivorshipDataActor" guid="edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor"/>
+  		<actor class="edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor" name="Survivorship Data" guid="edu.cornell.birds.is.bap.actor.survivorship.SurvivorshipDataActor"/>
   </group>
 
   <group name="Operations" expanded="true" id="ops">
@@ -16,8 +16,6 @@
 	<actor class="edu.cornell.birds.is.bap.actor.jfreechart.GraphSeriesUnion" name="Bar Chart Series Union" guid="edu.cornell.birds.is.bap.actor.jfreechart.GraphSeriesUnion"/>		
 	<actor class="edu.cornell.birds.is.bap.actor.jfreechart.BarChart" name="Bar Chart" guid="edu.cornell.birds.is.bap.actor.jfreechart.BarChart"/>
 	<actor class="edu.cornell.birds.is.bap.actor.jfreechart.PieChart" name="Pie Chart" guid="edu.cornell.birds.is.bap.actor.jfreechart.PieChart"/>
-	<actor class="edu.cornell.birds.is.bap.actor.crossingboundaries.DataJoiner" name="Scatter Plot Data Matcher" guid="edu.cornell.birds.is.bap.actor.crossingboundaries.DataJoiner"/>  	
-	<actor class="edu.cornell.birds.is.bap.actor.jfreechart.LabeledScatterPlot" name="Scatter Plot" guid="edu.cornell.birds.is.bap.actor.jfreechart.LabeledScatterPlot"/>
 	<actor class="ptolemy.actor.lib.gui.Display" name="Data Viewer" guid="ptolemy.actor.lib.gui.Display"/>
   </group>
 </actorList>
\ No newline at end of file



More information about the Kepler-cvs mailing list