Author: echatellier Date: 2013-03-11 14:56:33 +0100 (Mon, 11 Mar 2013) New Revision: 3818 Url: http://forge.codelutin.com/projects/isis-fish/repository/revisions/3818 Log: Update lib and use jdk 1.7 Modified: branches/4.0.1/pom.xml branches/4.0.1/src/license/THIRD-PARTY.properties branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/AbstractSensitivityAnalysis.java branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/Distribution.java branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListModel.java branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListRenderer.java branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/EquationContinuousPanelUI.jaxx branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/FactorWizardUI.jaxx branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/SensitivityWizardHandler.java branches/4.0.1/src/main/java/fr/ifremer/isisfish/util/ScriptUtil.java branches/4.0.1/src/site/rst/v3/devel/mexico.rst branches/4.0.1/src/test/resources/mexico/mexicohelper_designplanV3.xml Modified: branches/4.0.1/pom.xml =================================================================== --- branches/4.0.1/pom.xml 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/pom.xml 2013-03-11 13:56:33 UTC (rev 3818) @@ -83,14 +83,14 @@ <dependency> <groupId>com.fifesoft</groupId> <artifactId>rsyntaxtextarea</artifactId> - <version>2.0.2</version> + <version>2.0.6</version> <scope>runtime</scope> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> - <version>1.4.5</version> + <version>1.4.7</version> <scope>compile</scope> </dependency> @@ -180,14 +180,14 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-math3</artifactId> - <version>3.0</version> + <version>3.1.1</version> <scope>runtime</scope> <!--script --> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-email</artifactId> - <version>1.2</version> + <version>1.3</version> </dependency> <dependency> @@ -260,7 +260,7 @@ <dependency> <groupId>org.swinglabs.swingx</groupId> <artifactId>swingx-core</artifactId> - <version>1.6.4</version> + <version>1.6.5-1</version> <scope>compile</scope> </dependency> @@ -286,7 +286,7 @@ <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> - <version>1.3.168</version> + <version>1.3.170</version> <scope>compile</scope> </dependency> @@ -373,7 +373,7 @@ <dependency> <groupId>org.tmatesoft.svnkit</groupId> <artifactId>svnkit</artifactId> - <version>1.7.6</version> + <version>1.7.8</version> <scope>compile</scope> </dependency> <!-- fin svnkit pour communication subversion --> @@ -522,13 +522,16 @@ <maven.jar.main.class>fr.ifremer.isisfish.IsisFish</maven.jar.main.class> <license.licenseName>gpl_v3</license.licenseName> <license.organizationName>Ifremer, Codelutin</license.organizationName> + <maven.compiler.source>1.7</maven.compiler.source> + <maven.compiler.target>1.7</maven.compiler.target> + <animal.sniffer.skip>true</animal.sniffer.skip> <!-- Dependencies version --> - <jaxxVersion>2.5.6</jaxxVersion> - <eugeneVersion>2.5</eugeneVersion> - <topiaVersion>2.7</topiaVersion> + <jaxxVersion>2.5.12</jaxxVersion> + <eugeneVersion>2.6.1</eugeneVersion> + <topiaVersion>2.7.1</topiaVersion> <hibernateVersion>3.6.10.Final</hibernateVersion> - <nuitonUtilsVersion>2.6.3</nuitonUtilsVersion> + <nuitonUtilsVersion>2.6.10</nuitonUtilsVersion> <nuitonI18nVersion>2.5</nuitonI18nVersion> <nuitonWidgetsVersion>1.1.1</nuitonWidgetsVersion> <aspectwerkzVersion>2.0</aspectwerkzVersion> Modified: branches/4.0.1/src/license/THIRD-PARTY.properties =================================================================== --- branches/4.0.1/src/license/THIRD-PARTY.properties 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/license/THIRD-PARTY.properties 2013-03-11 13:56:33 UTC (rev 3818) @@ -1,15 +1,10 @@ # Generated by org.codehaus.mojo.license.AddThirdPartyMojo #------------------------------------------------------------------------------- # Already used licenses in project : -# - ANTLR 3 License # - ASM License # - Apache Software License -# - Apache Software License Version 2.0 -# - Apache Software License, Version 1.1 # - Apache Software License, Version 2.0 # - BSD License -# - BSD licence -# - BSD style # - BSD-style license # - Bouncy Castle License # - CDDL @@ -17,13 +12,13 @@ # - Common Public License Version 1.0 # - GNU General Public License - Version 2 with the class path exception # - GNU Lesser General Public Licence +# - GNU Library or Lesser General Public License # - GPL +# - GPL (with dual licensing option) # - GPLv2+CE -# - ICU License # - Indiana University Extreme! Lab Software License, vesion 1.1.1 -# - JDom license # - Java Transaction API (JTA) License -# - Jaxen license +# - LGPL, version 2.1 # - Lesser General Public License (LGPL v. 2.1) # - Lesser General Public License (LGPL) # - Lesser General Public License (LGPL) v 3.0 @@ -32,36 +27,34 @@ # - MIT License # - MPL 1.1 # - Mozilla Public License +# - New BSD License # - OpenMap Software License Agreement # - Revised BSD +# - Sequence Library License # - Sun's Binary Code License +# - TMate Open Source License (with dual licensing option) # - The Apache Software License, Version 2.0 # - The H2 License, Version 1.0 -# - http://sqljet.com/ -# - http://svnkit.com/license.html -# - http://www.trilead.com/Products/Trilead_SSH_for_Java/License/ +# - Trilead Library License +# - http://jaxen.codehaus.org/license.html # - license.txt #------------------------------------------------------------------------------- # Please fill the missing licenses for dependencies : # # -#Thu Apr 26 16:37:35 CEST 2012 +#Mon Mar 11 14:26:22 CET 2013 antlr--antlr--2.7.6=BSD License aspectwerkz--aspectwerkz--2.0=GNU Lesser General Public License aspectwerkz--aspectwerkz-core--2.0=GNU Lesser General Public License aspectwerkz--aspectwerkz-jdk5--2.0=GNU Lesser General Public License -com.ibm.icu--icu4j--2.6.1=ICU License com.sun--tools--1.6.0.16=Sun's Binary Code License commons-jxpath--commons-jxpath--1.3=The Apache Software License, Version 2.0 commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 dom4j--dom4j--1.6.1=BSD License javax.activation--activation--1.1.1=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 javax.transaction--jta--1.1=Java Transaction API (JTA) License -jaxen--jaxen--1.1.1=Jaxen license -jdom--jdom--1.0=JDom license jrexx--jrexx--1.1.1=Apache Software License -net.java.dev.jna--jna--3.2.3=Lesser General Public License (LGPL v. 2.1) -org.antlr--antlr-runtime--3.1.3=ANTLR 3 License +org.antlr--antlr-runtime--3.4=BSD License org.nuiton.thirdparty--JRI--0.8-4=Lesser General Public License (LGPL v. 2.1) org.nuiton.thirdparty--REngine--0.6-1=Lesser General Public License (LGPL v. 2.1) org.nuiton.thirdparty--Rserve--0.6-1=Lesser General Public License (LGPL v. 2.1) @@ -70,5 +63,3 @@ org.nuiton.thirdparty--asm-util--1.5.4-snapshot=ASM License qdox--qdox--1.4=Apache Software License, Version 2.0 trove--trove--1.0.2=Lesser General Public License (LGPL) -xalan--xalan--2.6.0=Apache Software License Version 2.0 -xerces--xercesImpl--2.6.2=Apache Software License, Version 1.1 Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/AbstractSensitivityAnalysis.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/AbstractSensitivityAnalysis.java 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/AbstractSensitivityAnalysis.java 2013-03-11 13:56:33 UTC (rev 3818) @@ -25,6 +25,8 @@ package fr.ifremer.isisfish.simulator.sensitivity; +import static org.nuiton.i18n.I18n._; + import java.io.File; import java.io.IOException; import java.util.Collection; @@ -42,6 +44,7 @@ import org.nuiton.j2r.REngine; import org.nuiton.j2r.RException; import org.nuiton.j2r.RProxy; +import org.nuiton.math.matrix.MatrixND; import fr.ifremer.isisfish.datastore.SimulationStorage; import fr.ifremer.isisfish.export.SensitivityExport; @@ -49,21 +52,21 @@ import fr.ifremer.isisfish.simulator.sensitivity.domain.DiscreteDomain; public abstract class AbstractSensitivityAnalysis implements - SensitivityAnalysis { + SensitivityAnalysis { /** to use log facility, just put in your code: log.info("..."); */ - private static Log log = LogFactory - .getLog(AbstractSensitivityAnalysis.class); - + private static Log log = LogFactory.getLog(AbstractSensitivityAnalysis.class); + /** * Method to create the isis.factors dataframe in R. * * @param plan Design plan of the sensitivity analysis - * @param outputdirectory the directory on which we will calculate the - * destination RData file. The RData file will be named directory.RData and - * saved in the directory parent. + * @param outputdirectory the directory on which we will calculate the destination RData + * file. The RData file will be named directory.RData and saved + * in the directory parent. * - * @throws SensitivityException if an error occur while talking to R + * @throws SensitivityException + * if an error occur while talking to R */ public void setIsisFactorsR(DesignPlan plan, File outputdirectory) throws SensitivityException { @@ -79,24 +82,23 @@ String bsup = "Bsup<-c(%s)"; String bsupValues = ""; String attribute = "attr(isis.factors,\"%s\")<-\"%s\""; - String isisfactors = "isis.factors<-data.frame(" + - "\"nomFacteur\"=nomFacteur," + - "\"Nominal\"=Nominal," + - "\"Continu\"=Continu," + - "\"Binf\"=Binf," + - "\"Bsup\"=Bsup)"; + String isisfactors = "isis.factors<-data.frame(" + + "\"nomFacteur\"=nomFacteur," + "\"Nominal\"=Nominal," + + "\"Continu\"=Continu," + "\"Binf\"=Binf," + "\"Bsup\"=Bsup)"; - //Create the vectors + // Create the vectors List<Factor> factors = plan.getFactors(); - for (Factor factor:factors){ - if (factor instanceof FactorGroup && ((FactorGroup) factor).isDiscrete()) { + for (Factor factor : factors) { + if (factor instanceof FactorGroup + && ((FactorGroup) factor).isDiscrete()) { List<Factor> subfactors = ((FactorGroup) factor).getFactors(); int cardinality = subfactors.get(0).getCardinality(); - for (Factor subfactor:subfactors) { + for (Factor subfactor : subfactors) { if (subfactor.getCardinality() != cardinality) { - throw new SensitivityException("All the factors of group " + - factor.getName() + " do not have the same cardinality"); + throw new SensitivityException( + "All the factors of group " + factor.getName() + + " do not have the same cardinality"); } } } @@ -112,37 +114,35 @@ bsupValues += ","; } - //Factor names + // Factor names factorNames += "\"" + factor.getName() + "\""; if (factor.getDomain() instanceof ContinuousDomain) { - //Continu values, binf values, bsup values and discrete factors attributes + // Continu values, binf values, bsup values and discrete factors + // attributes nominalValues += "\"" + factor.getNominalValue() + "\""; - //Continu values + // Continu values continuValues += "TRUE"; - //Binf values + // Binf values // FIXME echatellier to replace since 4.0.1 - /*binfValues += ((ContinuousDomain) factor.getDomain()) - .getCalculatorMinBound(); + binfValues += "0.0"; //((ContinuousDomain) factor.getDomain()).getCalculatorMinBound(); + //Bsup values bsupValues += ((ContinuousDomain) + bsupValues += "0.0"; //factor.getDomain()) .getCalculatorMaxBound(); - //Bsup values - bsupValues += ((ContinuousDomain) factor.getDomain()) - .getCalculatorMaxBound();*/ - } else { nominalValues += "\"" + factor.getNominalValue() + "\""; - //Continu values + // Continu values continuValues += "FALSE"; - //Binf values + // Binf values binfValues += "0.0"; - //Bsup values + // Bsup values bsupValues += ((DiscreteDomain) factor.getDomain()).getValues() .size(); } @@ -150,11 +150,10 @@ String Rcall; - try { REngine engine = new RProxy(); - //clear the engine (to be sure it's empty) + // clear the engine (to be sure it's empty) engine.clearSession(); Rcall = String.format(nomFacteur, factorNames); @@ -177,12 +176,12 @@ Rcall = String.format(attribute, "nomModel", "isis-fish-externeR"); engine.voidEval(Rcall); - for (Factor factor:factors) { + for (Factor factor : factors) { if (factor.getDomain() instanceof DiscreteDomain) { String attributeValues = "list("; - Collection<Object> values = ((DiscreteDomain) factor.getDomain()) - .getValues().values(); - for (Object j:values) { + Collection<Object> values = ((DiscreteDomain) factor + .getDomain()).getValues().values(); + for (Object j : values) { attributeValues += j + ","; } attributeValues = attributeValues.substring(0, @@ -195,9 +194,9 @@ } } - //Save the Isis R session + // Save the Isis R session engine.saveRData(outputdirectory.getParentFile(), - outputdirectory.getName()); + outputdirectory.getName()); } catch (RException eee) { if (log.isErrorEnabled()) { @@ -209,45 +208,85 @@ } - protected String editRInstruction(String rCall){ - JLabel label = new JLabel( - "Modifier le code R envoyé si vous le souhaitez"); - JTextPane text = new JTextPane(); - text.setText(rCall); - text.setSize(400, 400); - text.setPreferredSize(text.getSize()); + /** + * Affiche une boite de dialogue modale permettant de modifier l'expression + * R. + * + * @param rCall r instruction to edit + * @return user edited r instruction + */ + protected String editRInstruction(String rCall) { + JLabel label = new JLabel(_("Modifier le code R envoyé si vous le souhaitez")); + JTextPane text = new JTextPane(); + text.setText(rCall); + text.setSize(400, 400); + text.setPreferredSize(text.getSize()); - Box box = Box.createVerticalBox(); - box.add(label); - box.add(new JScrollPane(text)); + Box box = Box.createVerticalBox(); + box.add(label); + box.add(new JScrollPane(text)); - JOptionPane.showMessageDialog(null, box, "R modif", - JOptionPane.QUESTION_MESSAGE); - return text.getText(); + JOptionPane.showMessageDialog(null, box, _("R modif"), JOptionPane.QUESTION_MESSAGE); + return text.getText(); } - protected void testNoDiscrete(List<Factor> factors) throws SensitivityException{ - for (Factor factor:factors) { + /** + * Test que tous les facteurs sont continues. Leve une exception si un + * facteur discret est présent. + * + * @param factors factor list to check + * @throws SensitivityException + */ + protected void checkAllFactorContinuous(List<Factor> factors) + throws SensitivityException { + for (Factor factor : factors) { if (factor.getDomain() instanceof DiscreteDomain) { - throw new SensitivityException(factor.getName() + - " has a discrete domain, this is not acceptable for " + - "this method."); + throw new SensitivityException(_("%s has a discrete domain, this is not acceptable for this method.", factor.getName())); } } } - protected String createImportInstruction( - SensitivityExport export, + /** + * Test que tous les facteurs sont continues. Leve une exception si un + * facteur discret est présent. + * + * @param factors factor list to check + * @throws SensitivityException + */ + protected void checkAllUniformDistribution(List<Factor> factors) + throws SensitivityException { + for (Factor factor : factors) { + if (factor.getDomain() instanceof ContinuousDomain) { + ContinuousDomain domain = (ContinuousDomain)factor.getDomain(); + Distribution distribution = domain.getDistribution(); + if (distribution != Distribution.QUNIFPC && distribution != Distribution.QUNIFMM) { + throw new SensitivityException(_("%s has a non uniform distribution, this is not acceptable for this method.", factor.getName())); + } + } else { + throw new SensitivityException(_("%s has a discrete domain, this is not acceptable for this method.", factor.getName())); + } + } + } + + /** + * Cree l'instruction R qui permet de relire le contenu d'un fichier genere + * par un Export Isis. + * + * @param export export to get filename to read + * @param simulationStorages simulation list to read export + * @return r instruction + */ + protected String createImportInstruction(SensitivityExport export, List<SimulationStorage> simulationStorages) { - //the filename to read + // the filename to read String name = export.getExportFilename(); - //the extension to read + // the extension to read String extension = export.getExtensionFilename(); - //the rInstruction + // the rInstruction String rInstruction = name + "<-c("; - //iterate on all the simulations and read the value for each one + // iterate on all the simulations and read the value for each one for (int l = 0; l < simulationStorages.size(); l++) { SimulationStorage simulationStorage = simulationStorages.get(l); @@ -258,15 +297,13 @@ File importFile = new File(directoryPath, name + extension); - String simulResult=""; - try{ + String simulResult = ""; + try { simulResult = FileUtils.readFileToString(importFile); } catch (IOException ioe) { - log.error ("An error occured trying to read a result file : " + - ioe.getMessage()); + log.error("An error occured trying to read a result file : ", ioe); } - double simulationResult = Double.valueOf(simulResult); if (l < simulationStorages.size() - 1) { @@ -280,12 +317,18 @@ return rInstruction; } + /** + * Renome les objets R en les prefixant par l'identifiant de la simulation. + * + * @param engine r engine + * @param simulationName simulation name + * @throws RException + */ protected void renameObjects(REngine engine, String simulationName) throws RException { String renameIsisSimule = "%s.isis.simule<-isis.simule"; - String renameIsisFactorDistribution = "%s.isis.factor.distribution" + - "<-isis.factor.distribution"; + String renameIsisFactorDistribution = "%s.isis.factor.distribution<-isis.factor.distribution"; String renameIsisFactor = "%s.isis.factor<-isis.factors"; String renameIsisMethodExp = "%s.isis.methodExp<-isis.MethodExp"; @@ -299,4 +342,71 @@ engine.voidEval(String.format(renameIsisMethodExp, simulationName)); } + /** + * Get factor domain min bound depending on distribution. + */ + protected double getMinBound(Factor factor) { + ContinuousDomain domain = (ContinuousDomain)factor.getDomain(); + Distribution distribution = domain.getDistribution(); + double result = 0; + if (distribution == Distribution.QUNIFPC) { + Object reference = (Double)domain.getDistributionParameter(Distribution.QUNIFPC.getDistibutionParams()[0].getName()); + if (reference instanceof MatrixND) { + result = 1; + } else { + Double coefficient = (Double)domain.getDistributionParameter(Distribution.QUNIFPC.getDistibutionParams()[1].getName()); + result = (Double)reference - ((Double)reference * coefficient); + } + } else if (distribution == Distribution.QUNIFMM) { + Object min = domain.getDistributionParameter(Distribution.QUNIFMM.getDistibutionParams()[0].getName()); + // pour les matrices, on prend 1 et on multipliera le retour + // de R sur la matrice pour faire varier la matrice completement + // note: on ne fait pas ca pour les réels car les utilisateurs + // prefere avoir les valeurs réelles dans le RData. + if (min instanceof MatrixND) { + result = 1; + } else { + result = (Double)min; + } + } else { + if (log.isWarnEnabled()) { + log.warn("Can't call getMinBound for distribution " + distribution); + } + } + return result; + } + + /** + * Get factor domain max bound depending on distribution. + */ + protected double getMaxBound(Factor factor) { + ContinuousDomain domain = (ContinuousDomain)factor.getDomain(); + Distribution distribution = domain.getDistribution(); + double result = 0; + if (distribution == Distribution.QUNIFPC) { + Object reference = (Double)domain.getDistributionParameter(Distribution.QUNIFPC.getDistibutionParams()[0].getName()); + if (reference instanceof MatrixND) { + result = 1; + } else { + Double coefficient = (Double)domain.getDistributionParameter(Distribution.QUNIFPC.getDistibutionParams()[1].getName()); + result = (Double)reference + ((Double)reference * coefficient); + } + } else if (distribution == Distribution.QUNIFMM) { + Object max = domain.getDistributionParameter(Distribution.QUNIFMM.getDistibutionParams()[1].getName()); + // pour les matrices, on prend 1 et on multipliera le retour + // de R sur la matrice pour faire varier la matrice completement + // note: on ne fait pas ca pour les réels car les utilisateurs + // prefere avoir les valeurs réelles dans le RData. + if (max instanceof MatrixND) { + result = 1; + } else { + result = (Double)max; + } + } else { + if (log.isWarnEnabled()) { + log.warn("Can't call getMaxBound for distribution " + distribution); + } + } + return result; + } } Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/Distribution.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/Distribution.java 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/simulator/sensitivity/Distribution.java 2013-03-11 13:56:33 UTC (rev 3818) @@ -1,25 +1,23 @@ /* * #%L - * - * * $Id$ * $HeadURL$ * %% * Copyright (C) 2012 Ifremer, Codelutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as + * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program 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. See the - * GNU General Lesser Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Lesser Public + * You should have received a copy of the GNU General Public * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ @@ -40,49 +38,71 @@ public enum Distribution { QUNIFPC(_("QUnif %"), + "runif", new DistributionParam("reference", _("Reference value"), true), new DistributionParam("coefficient", _("Coefficient"))), QUNIFMM(_("QUnif Min/Max"), + "runif", new DistributionParam("min", _("Minimum value"), true), new DistributionParam("max", _("Maximum value"), true)), DBINOM(_("Dbimom"), + "rbinom", new DistributionParam("size", _("number of trials (zero or more)")), new DistributionParam("prob", _("probability of success on each trial"))), DCAUCHY(_("dcauchy"), + "rcauchy", new DistributionParam("location", _("location and scale parameters. (location = 0, scale = 1)")), new DistributionParam("scale", _("location and scale parameters. (location = 0, scale = 1)"))), DCHISQ(_("dchisq"), + "rchisq", new DistributionParam("df", _("degrees of freedom (non-negative, but can be non-integer)")), new DistributionParam("ncp", _("non-centrality parameter (non-negative)."))), DEXP(_("dexp"), + "rexp", new DistributionParam("rate", _("vector of rates"))), DF(_("df"), + "rf", new DistributionParam("df1", _("degrees of freedom. 'Inf' is allowed")), new DistributionParam("df2", _("degrees of freedom. 'Inf' is allowed")), new DistributionParam("ncp", _("non-centrality parameter. If omitted the central F is assumed"))), DGAMMA(_("dgamma"), + "rgamma", + new DistributionParam("shape", _("shape and scale parameters. Must be positive, 'scale' strictly")), new DistributionParam("rate", _("an alternative way to specify the scale.")), - new DistributionParam("shape", _("shape and scale parameters. Must be positive, 'scale' strictly")), new DistributionParam("scale", _("shape and scale parameters. Must be positive, 'scale' strictly"))), DGEOM(_("dgeom"), + "rgeom", new DistributionParam("prob", _("probability of success in each trial. '0 < prob <= 1'"))), DHYPER(_("dhyper"), + "rhyper", new DistributionParam("m", _("the number of white balls in the urn.")), new DistributionParam("n", _("the number of black balls in the urn.")), new DistributionParam("k", _("the number of balls drawn from the urn."))), DLNORM(_("dlnorm"), + "rlnorm", new DistributionParam("meanlog", _("mean and standard deviation of the distribution on the log scale with default values of '0' and '1' respectively.")), new DistributionParam("sdlog", _("mean and standard deviation of the distribution on the log scale with default values of '0' and '1' respectively."))); protected String description; + protected String instruction; + protected DistributionParam[] params; - private Distribution(String description, DistributionParam... params) { + private Distribution(String description, String instruction, DistributionParam... params) { this.description = description; + this.instruction = instruction; this.params = params; } + public String getDescription() { + return description; + } + + public String getInstruction() { + return instruction; + } + public DistributionParam[] getDistibutionParams() { return params; } Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListModel.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListModel.java 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListModel.java 2013-03-11 13:56:33 UTC (rev 3818) @@ -9,7 +9,7 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 2 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListRenderer.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListRenderer.java 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/model/FactorListRenderer.java 2013-03-11 13:56:33 UTC (rev 3818) @@ -7,7 +7,7 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 2 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/EquationContinuousPanelUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/EquationContinuousPanelUI.jaxx 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/EquationContinuousPanelUI.jaxx 2013-03-11 13:56:33 UTC (rev 3818) @@ -9,7 +9,7 @@ %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 2 of the + published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-2.0.html>. + <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> <ContinuousPanel layout="{new BorderLayout()}"> Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/FactorWizardUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/FactorWizardUI.jaxx 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/FactorWizardUI.jaxx 2013-03-11 13:56:33 UTC (rev 3818) @@ -9,7 +9,7 @@ %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 2 of the + published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-2.0.html>. + <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> <JDialog title='isisfish.sensitivity.title' modal='{true}' layout='{new BorderLayout()}'> @@ -143,4 +143,4 @@ </cell> </row> </Table> -</JDialog> \ No newline at end of file +</JDialog> Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/SensitivityWizardHandler.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/SensitivityWizardHandler.java 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/sensitivity/wizard/SensitivityWizardHandler.java 2013-03-11 13:56:33 UTC (rev 3818) @@ -7,7 +7,7 @@ * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 2 of the + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-2.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/util/ScriptUtil.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/util/ScriptUtil.java 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/util/ScriptUtil.java 2013-03-11 13:56:33 UTC (rev 3818) @@ -1,5 +1,29 @@ package fr.ifremer.isisfish.util; +/* + * #%L + * IsisFish + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 1999 - 2013 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program 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. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import java.io.File; import java.io.IOException; Modified: branches/4.0.1/src/site/rst/v3/devel/mexico.rst =================================================================== --- branches/4.0.1/src/site/rst/v3/devel/mexico.rst 2013-03-11 13:14:28 UTC (rev 3817) +++ branches/4.0.1/src/site/rst/v3/devel/mexico.rst 2013-03-11 13:56:33 UTC (rev 3818) @@ -1,3 +1,26 @@ +.. - +.. * #%L +.. * IsisFish +.. * $Id:$ +.. * $HeadURL:$ +.. * %% +.. * Copyright (C) 1999 - 2013 Ifremer, Codelutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program 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. See the +.. * GNU General Public License for more details. +.. * +.. * You should have received a copy of the GNU General Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/gpl-3.0.html>. +.. * #L% +.. - Mexico ------ Modified: branches/4.0.1/src/test/resources/mexico/mexicohelper_designplanV3.xml =================================================================== (Binary files differ)