[LutinJ2R-commits] r82 - in nuiton-j2r/trunk: . src/main/assembly src/main/java/org src/main/java/org/nuiton src/main/java/org/nuiton/j2r src/main/java/org/nuiton/j2r/jni src/main/java/org/nuiton/j2r/net src/main/java/org/nuiton/j2r/types src/site src/test/java/org src/test/java/org/nuiton src/test/java/org/nuiton/j2r
Author: tchemit Date: 2009-05-16 16:25:39 +0000 (Sat, 16 May 2009) New Revision: 82 Added: nuiton-j2r/trunk/src/main/java/org/nuiton/ nuiton-j2r/trunk/src/test/java/org/nuiton/ Removed: nuiton-j2r/trunk/src/main/java/org/codelutin/ nuiton-j2r/trunk/src/test/java/org/codelutin/ Modified: nuiton-j2r/trunk/pom.xml nuiton-j2r/trunk/src/main/assembly/deps.xml nuiton-j2r/trunk/src/main/assembly/full.xml nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/REngine.java nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/RException.java nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/RProxy.java nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/jni/RJniEngine.java nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/net/RNetEngine.java nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java nuiton-j2r/trunk/src/site/site.xml nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/DataframeTest.java nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/JNITest.java nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/JPurTest.java nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/LutinTimer.java nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/NetTest.java nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/TestConstants.java Log: migrate to nuiton Modified: nuiton-j2r/trunk/pom.xml =================================================================== --- nuiton-j2r/trunk/pom.xml 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/pom.xml 2009-05-16 16:25:39 UTC (rev 82) @@ -1,3 +1,4 @@ + <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"> <modelVersion>4.0.0</modelVersion> @@ -7,21 +8,29 @@ <!-- ************************************************************* --> <parent> - <groupId>org.codelutin</groupId> - <artifactId>lutinproject</artifactId> - <version>3.5</version> + <groupId>org.nuiton</groupId> + <artifactId>mavenpom</artifactId> + <version>1.0.0-SNAPSHOT</version> </parent> - <artifactId>lutinj2r</artifactId> - <version>0.5-SNAPSHOT</version> + <artifactId>nuiton-j2r</artifactId> + <version>1.0.0-SNAPSHOT</version> - <dependencies> + <dependencies> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + <!-- dependency> <groupId>externallib</groupId> <artifactId>JRclient</artifactId> <version>RF503</version> <scope>compile</scope> </dependency--> + <dependency> <groupId>externallib</groupId> <artifactId>JRI</artifactId> @@ -31,15 +40,24 @@ <dependency> <groupId>externallib</groupId> <artifactId>REngine</artifactId> - <version>0.6-0</version> + <version>${r.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>externallib</groupId> <artifactId>Rserve</artifactId> - <version>0.6-0</version> + <version>${r.version}</version> <scope>compile</scope> </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.6</version> + <scope>test</scope> + </dependency> + + </dependencies> <!-- ************************************************************* --> @@ -59,16 +77,18 @@ <packaging>jar</packaging> <properties> - <!-- id du projet du labs --> - <labs.id>109</labs.id> - <labs.project>lutinj2r</labs.project> + <r.version>0.6-0</r.version> - <!-- FIXME --> - <maven.test.skip>true</maven.test.skip> + <!-- FIXME better than skip... --> + <maven.test.testFailureIgnore>true</maven.test.testFailureIgnore> <!-- Jar main class --> <!--maven.jar.main.class>org.codelutin.j2r.RProxy</maven.jar.main.class--> + + <!-- a supprimer des qu'on pourra deployer les sites sur nuiton --> + <site.deploy.url>scpexe://labs.libre-entreprise.org/home/groups/lutinj2r/htdocs</site.deploy.url> + </properties> <build> @@ -76,28 +96,14 @@ <plugins> - <!-- Always process jrst files, but only called on pre-site phase --> - <plugin> - <groupId>org.codelutin</groupId> - <artifactId>maven-jrst-plugin</artifactId> - <version>0.8.4</version> - <configuration> - <defaultLocale>fr</defaultLocale> - </configuration> - <executions> - <execution> - <goals> - <goal>jrst</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> <pluginManagement> <plugins> + <plugin> <artifactId>maven-assembly-plugin</artifactId> + <version>2.1</version> <configuration> <descriptors> <descriptor>src/main/assembly/deps.xml</descriptor> @@ -105,32 +111,30 @@ </descriptors> <attach>false</attach> </configuration> - <executions> - <execution> - <id>create-assembly</id> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> </plugin> + + <plugin> + <artifactId>maven-site-plugin</artifactId> + <dependencies> + <dependency> + <groupId>org.codelutin</groupId> + <artifactId>doxia-module-jrst</artifactId> + <version>1.0.1</version> + </dependency> + </dependencies> + </plugin> + </plugins> </pluginManagement> </build> - <scm> - <connection>${maven.scm.connection}</connection> - <developerConnection>${maven.scm.developerConnection}</developerConnection> - <url>${maven.scm.url}</url> - </scm> - - <!--Code Lutin Repository--> + <!--Nuiton Repository : pourra etre supprimer lorsqu'on sera sur central --> <repositories> <repository> - <id>codelutin-repository</id> - <name>CodeLutinRepository</name> - <url>http://lutinbuilder.labs.libre-entreprise.org/maven2</url> + <id>nuiton-repository</id> + <name>NuitonRepository</name> + <url>${repository.home.url}</url> <snapshots> <enabled>true</enabled> <checksumPolicy>warn</checksumPolicy> @@ -152,6 +156,7 @@ </property> </activation> <build> + <plugins> <!-- launch in a release the assembly automaticly --> @@ -159,23 +164,10 @@ <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> - <id>create-assembly</id> - <phase>package</phase> - </execution> - </executions> - </plugin> - - <!-- always add license and third-party files to classpath --> - <plugin> - <groupId>org.codelutin</groupId> - <artifactId>maven-license-switcher-plugin</artifactId> - <version>0.6</version> - <executions> - <execution> - <id>attach-licenses</id> + <id>attach-assembly</id> + <phase>verify</phase> <goals> - <goal>license</goal> - <goal>third-party</goal> + <goal>single</goal> </goals> </execution> </executions> Modified: nuiton-j2r/trunk/src/main/assembly/deps.xml =================================================================== --- nuiton-j2r/trunk/src/main/assembly/deps.xml 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/assembly/deps.xml 2009-05-16 16:25:39 UTC (rev 82) @@ -14,21 +14,32 @@ <scope>runtime</scope> </dependencySet> </dependencySets> - <files> - <file> - <!--source>target/${artifact.artifactId}-${artifact.version}.jar</source--> - <source>target/${project.build.finalName}.jar</source> - </file> - <file> - <source>target/classes/THIRD-PARTY.txt</source> - </file> - </files> <fileSets> <fileSet> + <directory>target</directory> + <outputDirectory>/</outputDirectory> <includes> + <include>*.jar</include> + </includes> + <excludes> + <exclude>*-sources.jar</exclude> + <exclude>*-javadoc.jar</exclude> + </excludes> + </fileSet> + <fileSet> + <outputDirectory>/</outputDirectory> + <includes> <include>README*</include> <include>LICENSE*</include> + <include>pom.xml</include> </includes> </fileSet> + <fileSet> + <outputDirectory>/</outputDirectory> + <directory>target/classes</directory> + <includes> + <include>THIRD-PARTY.txt</include> + </includes> + </fileSet> </fileSets> </assembly> \ No newline at end of file Modified: nuiton-j2r/trunk/src/main/assembly/full.xml =================================================================== --- nuiton-j2r/trunk/src/main/assembly/full.xml 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/assembly/full.xml 2009-05-16 16:25:39 UTC (rev 82) @@ -13,26 +13,35 @@ <scope>runtime</scope> </dependencySet> </dependencySets> - <files> - <file> - <!--source>target/${artifact.artifactId}-${artifact.version}.jar</source--> - <source>target/${project.build.finalName}.jar</source> - </file> - <file> - <source>target/classes/THIRD-PARTY.txt</source> - </file> - </files> <fileSets> <fileSet> + <directory>target</directory> + <outputDirectory>/</outputDirectory> <includes> + <include>*.jar</include> + </includes> + <excludes> + <exclude>*-sources.jar</exclude> + </excludes> + </fileSet> + <fileSet> + <outputDirectory>/</outputDirectory> + <includes> <include>README*</include> <include>LICENSE*</include> <include>pom.xml</include> </includes> </fileSet> <fileSet> + <outputDirectory>/</outputDirectory> + <directory>target/classes</directory> + <includes> + <include>THIRD-PARTY.txt</include> + </includes> + </fileSet> + <fileSet> <directory>src</directory> - <useDefaultExcludes>true</useDefaultExcludes> + <!--useDefaultExcludes>true</useDefaultExcludes--> </fileSet> </fileSets> </assembly> \ No newline at end of file Copied: nuiton-j2r/trunk/src/main/java/org/nuiton (from rev 81, nuiton-j2r/trunk/src/main/java/org/codelutin) Property changes on: nuiton-j2r/trunk/src/main/java/org/nuiton ___________________________________________________________________ Name: svn:mergeinfo + Modified: nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/REngine.java =================================================================== --- nuiton-j2r/trunk/src/main/java/org/codelutin/j2r/REngine.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/REngine.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,10 +27,9 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; import java.io.File; -import java.util.List; /** * Cette interface est le point commun entre les differentes technologies @@ -141,7 +140,7 @@ * * @param rObject * R object to save - * @param outputFileName + * @param outputFile * the file to save * @throws RException */ Modified: nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/RException.java =================================================================== --- nuiton-j2r/trunk/src/main/java/org/codelutin/j2r/RException.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/RException.java 2009-05-16 16:25:39 UTC (rev 82) @@ -16,55 +16,55 @@ * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * -* RException.java -* -* Created: 22 aout 06 -* -* @author Arnaud Thimel <thimel@codelutin.com> -* @version $Revision: $ -* -* Mise a jour: $Date: $ -* par : $Author: $ -*/ + * RException.java + * + * Created: 22 aout 06 + * + * @author Arnaud Thimel <thimel@codelutin.com> + * @version $Revision: $ + * + * Mise a jour: $Date: $ + * par : $Author: $ + */ +package org.nuiton.j2r; -package org.codelutin.j2r; - /** * Exception levee lorsqu'une erreur est intervenue pendant la communication * avec R (quelque soit le mode de communication). */ public class RException extends Exception { - /** - * Constructeur de l'exception. - */ - public RException() { - super(); - } + private static final long serialVersionUID = 1L; - /** - * Constructeur de l'exception. - * @param message texte decrivant l'exception - */ - public RException(String message) { - super(message); - } + /** + * Constructeur de l'exception. + */ + public RException() { + super(); + } - /** - * Constructeur de l'exception. - * @param cause l'instance de Throwable qui a declenche cette exception - */ - public RException(Throwable cause) { - super(cause); - } + /** + * Constructeur de l'exception. + * @param message texte decrivant l'exception + */ + public RException(String message) { + super(message); + } - /** - * Constructeur de l'exception. - * @param message texte decrivant l'exception - * @param cause l'instance de Throwable qui a declenche cette exception - */ - public RException(String message, Throwable cause) { - super(message, cause); - } + /** + * Constructeur de l'exception. + * @param cause l'instance de Throwable qui a declenche cette exception + */ + public RException(Throwable cause) { + super(cause); + } + /** + * Constructeur de l'exception. + * @param message texte decrivant l'exception + * @param cause l'instance de Throwable qui a declenche cette exception + */ + public RException(String message, Throwable cause) { + super(message, cause); + } } //RException Modified: nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/RProxy.java =================================================================== --- nuiton-j2r/trunk/src/main/java/org/codelutin/j2r/RProxy.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/RProxy.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,14 +27,14 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; import java.io.File; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codelutin.j2r.jni.RJniEngine; -import org.codelutin.j2r.net.RNetEngine; +import org.nuiton.j2r.jni.RJniEngine; +import org.nuiton.j2r.net.RNetEngine; /** * Cette classe permet d'initialiser un REngine sans savoir quelle est @@ -114,6 +114,7 @@ /* (non-Javadoc) * @see org.codelutin.R.REngine#eval(java.lang.String) */ + @Override public Object eval(String expr) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -126,6 +127,7 @@ /* (non-Javadoc) * @see org.codelutin.j2r.REngine#init() */ + @Override public boolean init() { String RType = System.getProperty("R.type"); if (RType == null || "".equals(RType)) { @@ -146,6 +148,7 @@ /* (non-Javadoc) * @see org.codelutin.j2r.REngine#terminate() */ + @Override public void terminate() throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -158,6 +161,7 @@ /* (non-Javadoc) * @see org.codelutin.j2r.REngine#voidEval(java.lang.String) */ + @Override public void voidEval(String expr) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -174,6 +178,7 @@ * directory where the .RData file is located * @throws RException */ + @Override public void loadRData(File directory) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -191,6 +196,7 @@ * where the .RData file will be saved * @throws RException */ + @Override public void saveRData(File directory) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -208,6 +214,7 @@ * to set * @throws RException */ + @Override public void setwd(File directory) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -224,7 +231,7 @@ * the engine is not initialized * @throws RException */ - + @Override public File getwd() throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -245,6 +252,7 @@ * name of the file to save * @throws RException */ + @Override public void dput(String rObject, String outputFileName) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -266,6 +274,7 @@ * name of the file to load * @throws RException */ + @Override public void dget(String rObject, String inputFileName) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -282,10 +291,11 @@ * * @param rObject * R object to save - * @param outputFileName + * @param outputFile * the file to save * @throws RException */ + @Override public void dput(String rObject, File outputFile) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -310,6 +320,7 @@ * file to load * @throws RException */ + @Override public void dget(String rObject, File inputFile) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -324,6 +335,7 @@ setwd(workingdir); } + @Override public void remove(String rObject) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -333,6 +345,7 @@ engine.remove(rObject); } + @Override public void mv(String inputObject, String outputObject) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -343,6 +356,7 @@ } + @Override public void cp(String inputObject, String outputObject) throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -353,6 +367,7 @@ } + @Override public String[] ls() throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " @@ -362,6 +377,7 @@ return engine.ls(); } + @Override public void clearSession() throws RException { if (engine == null) { log.fatal("The R Proxy is not initialized. An error probably " Modified: nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/jni/RJniEngine.java =================================================================== --- nuiton-j2r/trunk/src/main/java/org/codelutin/j2r/jni/RJniEngine.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/jni/RJniEngine.java 2009-05-16 16:25:39 UTC (rev 82) @@ -15,14 +15,14 @@ * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ -package org.codelutin.j2r.jni; +package org.nuiton.j2r.jni; import java.io.File; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codelutin.j2r.REngine; -import org.codelutin.j2r.RException; +import org.nuiton.j2r.REngine; +import org.nuiton.j2r.RException; import org.rosuda.JRI.REXP; import org.rosuda.JRI.Rengine; @@ -50,6 +50,7 @@ * * @see org.codelutin.j2r.REngine#init() */ + @Override public boolean init() { if (engine == null) { try { @@ -75,6 +76,7 @@ * * @see org.codelutin.R.REngine#eval(java.lang.String) */ + @Override public Object eval(String expr) throws RException { REXP result = null; try { @@ -166,6 +168,7 @@ * * @see org.codelutin.j2r.REngine#terminate() */ + @Override public void terminate() { if (engine.isAlive()) { engine.end(); @@ -177,6 +180,7 @@ * * @see org.codelutin.j2r.REngine#voidEval(java.lang.String) */ + @Override public void voidEval(String expr) throws RException { // voidEval is not really supproted by JRI, we just discard the result // conversion @@ -195,6 +199,7 @@ * directory where the .RData file is located * @throws RException */ + @Override public void loadRData(File directory) throws RException { setwd(directory); voidEval("load(\".RData\")"); @@ -207,6 +212,7 @@ * where the .RData file will be saved * @throws RException */ + @Override public void saveRData(File directory) throws RException { setwd(directory); voidEval("save.image()"); @@ -219,6 +225,7 @@ * to set * @throws RException */ + @Override public void setwd(File directory) throws RException { voidEval("setwd(\"" + directory.getAbsolutePath().replaceAll("\\\\", "/") + "\")"); } @@ -230,6 +237,7 @@ * @throws RException */ + @Override public File getwd() throws RException { String directory = (String) eval("getwd()"); return new File(directory); @@ -245,6 +253,7 @@ * name of the file to save * @throws RException */ + @Override public void dput(String rObject, String outputFileName) throws RException { String rInstruction = "dput(%s,file=\"%s\")"; voidEval(String.format(rInstruction, rObject, outputFileName)); @@ -261,6 +270,7 @@ * name of the file to load * @throws RException */ + @Override public void dget(String rObject, String inputFileName) throws RException { String rInstruction = "%s <- dget(\"%s\")"; voidEval(String.format(rInstruction, rObject, inputFileName)); @@ -270,12 +280,11 @@ /** * Use the dput R instruction to store the content of a R object to a file. * - * @param rObject - * R object to save - * @param outputFileName - * the file to save + * @param rObject R object to save + * @param outputFile the file to save * @throws RException */ + @Override public void dput(String rObject, File outputFile) throws RException { File workingdir = getwd(); setwd(outputFile.getParentFile()); @@ -294,6 +303,7 @@ * file to load * @throws RException */ + @Override public void dget(String rObject, File inputFile) throws RException { File workingdir = getwd(); setwd(inputFile.getParentFile()); @@ -302,26 +312,31 @@ setwd(workingdir); } + @Override public void remove(String rObject) throws RException { voidEval("remove(" + rObject + ")"); } + @Override public void mv(String inputObject, String outputObject) throws RException { cp(inputObject, outputObject); remove(inputObject); } + @Override public void cp(String inputObject, String outputObject) throws RException { voidEval(outputObject + "<-" + inputObject); } + @Override public String[] ls() throws RException { String[] Robjects = (String[]) eval("ls()"); return Robjects; } + @Override public void clearSession() throws RException { String[] Robjects = ls(); for (int i = 0; i < Robjects.length; i++) { Modified: nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/net/RNetEngine.java =================================================================== --- nuiton-j2r/trunk/src/main/java/org/codelutin/j2r/net/RNetEngine.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/net/RNetEngine.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,15 +27,14 @@ * par : $Author: $ */ -package org.codelutin.j2r.net; +package org.nuiton.j2r.net; import java.io.File; -import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codelutin.j2r.REngine; -import org.codelutin.j2r.RException; +import org.nuiton.j2r.REngine; +import org.nuiton.j2r.RException; import org.rosuda.REngine.REXP; import org.rosuda.REngine.REXPMismatchException; import org.rosuda.REngine.Rserve.RConnection; @@ -65,6 +64,7 @@ * * @see org.codelutin.j2r.REngine#init() */ + @Override public boolean init() { String typeProp = System.getProperty("R.type", "net"); int urlPos = typeProp.indexOf("net://"); @@ -119,6 +119,7 @@ * * @see org.codelutin.R.REngine#eval(java.lang.String) */ + @Override public Object eval(String expr) throws RException { REXP result = null; try { @@ -204,6 +205,7 @@ * * @see org.codelutin.j2r.REngine#terminate() */ + @Override public void terminate() throws RException { if (conn != null && conn.isConnected()) { conn.close(); @@ -215,6 +217,7 @@ * * @see org.codelutin.j2r.REngine#voidEval(java.lang.String) */ + @Override public void voidEval(String expr) throws RException { try { conn.voidEval(expr); @@ -230,6 +233,7 @@ * directory where the .RData file is located * @throws RException */ + @Override public void loadRData(File directory) throws RException { setwd(directory); voidEval("load(\".RData\")"); @@ -242,6 +246,7 @@ * where the .RData file will be saved * @throws RException */ + @Override public void saveRData(File directory) throws RException { setwd(directory); voidEval("save.image()"); @@ -254,6 +259,7 @@ * to set * @throws RException */ + @Override public void setwd(File directory) throws RException { voidEval("setwd(\"" + directory.getAbsolutePath().replaceAll("\\\\", "/") + "\")"); } @@ -265,6 +271,7 @@ * @throws RException */ + @Override public File getwd() throws RException { String directory = (String) eval("getwd()"); return new File(directory); @@ -280,6 +287,7 @@ * name of the file to save * @throws RException */ + @Override public void dput(String rObject, String outputFileName) throws RException { String rInstruction = "dput(%s,file=\"%s\")"; voidEval(String.format(rInstruction, rObject, outputFileName)); @@ -296,6 +304,7 @@ * name of the file to load * @throws RException */ + @Override public void dget(String rObject, String inputFileName) throws RException { String rInstruction = "%s <- dget(\"%s\")"; voidEval(String.format(rInstruction, rObject, inputFileName)); @@ -307,10 +316,11 @@ * * @param rObject * R object to save - * @param outputFileName + * @param outputFile * the file to save * @throws RException */ + @Override public void dput(String rObject, File outputFile) throws RException { File workingdir = getwd(); setwd(outputFile.getParentFile()); @@ -329,6 +339,7 @@ * file to load * @throws RException */ + @Override public void dget(String rObject, File inputFile) throws RException { File workingdir = getwd(); setwd(inputFile.getParentFile()); @@ -337,26 +348,31 @@ setwd(workingdir); } + @Override public void remove(String rObject) throws RException { voidEval("remove(" + rObject + ")"); } + @Override public void mv(String inputObject, String outputObject) throws RException { cp(inputObject, outputObject); remove(inputObject); } + @Override public void cp(String inputObject, String outputObject) throws RException { voidEval(outputObject + "<-" + inputObject); } + @Override public String[] ls() throws RException { String[] Robjects = (String[]) eval("ls()"); return Robjects; } + @Override public void clearSession() throws RException { String[] Robjects = ls(); for (int i = 0; i < Robjects.length; i++) { Modified: nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java =================================================================== --- nuiton-j2r/trunk/src/main/java/org/codelutin/j2r/types/RDataFrame.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/main/java/org/nuiton/j2r/types/RDataFrame.java 2009-05-16 16:25:39 UTC (rev 82) @@ -15,7 +15,7 @@ * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ -package org.codelutin.j2r.types; +package org.nuiton.j2r.types; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -27,8 +27,8 @@ import java.util.Set; import java.util.Vector; -import org.codelutin.j2r.REngine; -import org.codelutin.j2r.RException; +import org.nuiton.j2r.REngine; +import org.nuiton.j2r.RException; public class RDataFrame { @@ -57,7 +57,7 @@ super(); this.names = names; this.rowNames = rowNames; - this.data = (Vector<Vector<? extends Serializable>>) data; + this.data = data; this.variable = variable; if (checkConsistency() == false) { throw new RException("A dimension is wrong on the dataframe"); Modified: nuiton-j2r/trunk/src/site/site.xml =================================================================== --- nuiton-j2r/trunk/src/site/site.xml 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/site/site.xml 2009-05-16 16:25:39 UTC (rev 82) @@ -1,48 +1,57 @@ <?xml version="1.0" encoding="UTF-8"?> <project name="LutinJ2R"> - <publishDate format="dd/MM/yyyy"/> + <publishDate format="dd/MM/yyyy"/> - <skin> - <groupId>org.codelutin</groupId> - <artifactId>maven-lutin-skin</artifactId> - <version>0.2.3</version> - </skin> + <skin> + <groupId>org.codelutin</groupId> + <artifactId>maven-lutin-skin</artifactId> + <version>0.2.3</version> + </skin> - <bannerLeft> - <name>LutinJ2R</name> - </bannerLeft> + <bannerLeft> + <name>LutinJ2R</name> + </bannerLeft> - <bannerRight> - <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src> - <href>http://www.codelutin.com</href> - </bannerRight> + <bannerRight> + <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src> + <href>http://www.codelutin.com</href> + </bannerRight> - <poweredBy> - <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/> - <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/> - <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="images/restructuredtext-logo.png"/> - </poweredBy> + <poweredBy> + <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/> + <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/> + <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="images/restructuredtext-logo.png"/> + </poweredBy> - <body> - <links> - <item name="Labs" href="http://labs.libre-entreprise.org/"/> - <item name="Code Lutin" href="http://www.codelutin.com/"/> - </links> + <body> + <links> + <item name="Labs" href="http://labs.libre-entreprise.org/"/> + <item name="Nuiton" href="http://www.nuiton.org"/> + <item name="${project.organization.name}" href="${project.organization.url}"/> + </links> - <menu name="Utilisateur"> - <item href="index.html" name="Accueil"></item> - <item href="etude.html" name="Etude"></item> - <item href="installation.html" name="Installation"/> - <item href="module.html" name="Utilisation"/> - </menu> + <menu name="Utilisateur"> + <item href="index.html" name="Accueil"></item> + <item href="etude.html" name="Etude"></item> + <item href="installation.html" name="Installation"/> + <item href="module.html" name="Utilisation"/> + </menu> - <menu name="Téléchargement"> - <item href="http://lutinbuilder.labs.libre-entreprise.org/maven2/org/codelutin/lutinj2r/" name="Librairies Java"/> - <item href="../libsys/" name="Librairies Système"/> - </menu> + <menu name="Téléchargement"> + <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar" + name="Librairie (jar)"/> + <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar" + name="Javadoc (jar)"/> + <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-sources.jar" + name="Sources (jar)"/> + <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-deps.zip" + name="Bundle sans sources (zip)"/> + <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-full.zip" + name="Bundle complêt (zip)"/> + </menu> - ${reports} + <menu ref="reports"/> - </body> + </body> </project> Copied: nuiton-j2r/trunk/src/test/java/org/nuiton (from rev 81, nuiton-j2r/trunk/src/test/java/org/codelutin) Property changes on: nuiton-j2r/trunk/src/test/java/org/nuiton ___________________________________________________________________ Name: svn:mergeinfo + Modified: nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/DataframeTest.java =================================================================== --- nuiton-j2r/trunk/src/test/java/org/codelutin/j2r/DataframeTest.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/DataframeTest.java 2009-05-16 16:25:39 UTC (rev 82) @@ -15,7 +15,7 @@ * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ -package org.codelutin.j2r; +package org.nuiton.j2r; import java.io.File; import java.io.Serializable; @@ -24,7 +24,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.codelutin.j2r.types.RDataFrame; +import org.nuiton.j2r.types.RDataFrame; import org.junit.After; import org.junit.Assert; import org.junit.Before; Modified: nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/JNITest.java =================================================================== --- nuiton-j2r/trunk/src/test/java/org/codelutin/j2r/JNITest.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/JNITest.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,18 +27,18 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; -import static org.codelutin.j2r.TestConstants.S_NB_LOOPS; -import static org.codelutin.j2r.TestConstants.S_OP; -import static org.codelutin.j2r.TestConstants.S_T_MAX; -import static org.codelutin.j2r.TestConstants.V_MAX; -import static org.codelutin.j2r.TestConstants.V_NB_LOOPS; -import static org.codelutin.j2r.TestConstants.V_OP_A; -import static org.codelutin.j2r.TestConstants.V_OP_AB; -import static org.codelutin.j2r.TestConstants.V_OP_B; -import static org.codelutin.j2r.TestConstants.V_OP_R; +import static org.nuiton.j2r.TestConstants.S_NB_LOOPS; +import static org.nuiton.j2r.TestConstants.S_OP; +import static org.nuiton.j2r.TestConstants.S_T_MAX; +import static org.nuiton.j2r.TestConstants.V_MAX; +import static org.nuiton.j2r.TestConstants.V_NB_LOOPS; +import static org.nuiton.j2r.TestConstants.V_OP_A; +import static org.nuiton.j2r.TestConstants.V_OP_AB; +import static org.nuiton.j2r.TestConstants.V_OP_B; +import static org.nuiton.j2r.TestConstants.V_OP_R; import java.io.File; import org.apache.commons.logging.Log; Modified: nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/JPurTest.java =================================================================== --- nuiton-j2r/trunk/src/test/java/org/codelutin/j2r/JPurTest.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/JPurTest.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,9 +27,9 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; -import static org.codelutin.j2r.TestConstants.*; +import static org.nuiton.j2r.TestConstants.*; import junit.framework.TestCase; Modified: nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/LutinTimer.java =================================================================== --- nuiton-j2r/trunk/src/test/java/org/codelutin/j2r/LutinTimer.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/LutinTimer.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,7 +27,7 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; import java.util.ArrayList; import java.util.List; Modified: nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/NetTest.java =================================================================== --- nuiton-j2r/trunk/src/test/java/org/codelutin/j2r/NetTest.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/NetTest.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,17 +27,17 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; -import static org.codelutin.j2r.TestConstants.S_NB_LOOPS; -import static org.codelutin.j2r.TestConstants.S_OP; -import static org.codelutin.j2r.TestConstants.S_T_MAX; -import static org.codelutin.j2r.TestConstants.V_MAX; -import static org.codelutin.j2r.TestConstants.V_NB_LOOPS; -import static org.codelutin.j2r.TestConstants.V_OP_A; -import static org.codelutin.j2r.TestConstants.V_OP_AB; -import static org.codelutin.j2r.TestConstants.V_OP_B; +import static org.nuiton.j2r.TestConstants.S_NB_LOOPS; +import static org.nuiton.j2r.TestConstants.S_OP; +import static org.nuiton.j2r.TestConstants.S_T_MAX; +import static org.nuiton.j2r.TestConstants.V_MAX; +import static org.nuiton.j2r.TestConstants.V_NB_LOOPS; +import static org.nuiton.j2r.TestConstants.V_OP_A; +import static org.nuiton.j2r.TestConstants.V_OP_AB; +import static org.nuiton.j2r.TestConstants.V_OP_B; import java.io.File; import org.apache.commons.logging.Log; Modified: nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/TestConstants.java =================================================================== --- nuiton-j2r/trunk/src/test/java/org/codelutin/j2r/TestConstants.java 2009-05-16 15:43:07 UTC (rev 81) +++ nuiton-j2r/trunk/src/test/java/org/nuiton/j2r/TestConstants.java 2009-05-16 16:25:39 UTC (rev 82) @@ -27,7 +27,7 @@ * par : $Author: $ */ -package org.codelutin.j2r; +package org.nuiton.j2r; import org.junit.Ignore;
participants (1)
-
tchemit@users.labs.libre-entreprise.org