Skip to content

Commit

Permalink
New fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Sep 25, 2024
1 parent c7f8084 commit 0c2d85d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
27 changes: 22 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
<groupId>org.orbisgis</groupId>
<artifactId>demat</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>bundle</packaging>
<packaging>jar</packaging>
<description>Demat is breton word to said "Hello". Demat is library to run Vega-lite specifications.</description>
<!-- Properties -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>YYYY-MM-dd</maven.build.timestamp.format>
<buildNumber>${maven.build.timestamp}</buildNumber>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven-version>3.5.0</maven-version>
<java-version>11</java-version>

Expand All @@ -27,19 +29,26 @@
<!-- Plugins versions -->
<exec-maven-version>3.0.0</exec-maven-version>
<gmaven-version>3.0.2</gmaven-version>
<maven-archetype-plugin-version>3.2.0</maven-archetype-plugin-version>
<maven-assembly-version>3.3.0</maven-assembly-version>
<maven-bundle-version>5.1.2</maven-bundle-version>
<maven-clean-version>3.1.0</maven-clean-version>
<maven-compiler-version>3.8.1</maven-compiler-version>
<maven-deploy-version>3.0.0-M1</maven-deploy-version>
<maven-enforcer-version>3.0.0</maven-enforcer-version>
<maven-gpg-plugin-version>3.0.1</maven-gpg-plugin-version>
<maven-install-version>3.0.0-M1</maven-install-version>
<maven-jar-version>3.2.0</maven-jar-version>
<maven-javadoc-version>3.3.1</maven-javadoc-version>
<maven-release-version>3.0.0-M4</maven-release-version>
<maven-resources-version>3.2.0</maven-resources-version>
<maven-site-version>3.9.1</maven-site-version>
<maven-surefire-version>3.0.0-M5</maven-surefire-version>
<version-maven-version>2.8.1</version-maven-version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<!-- Extensions version -->
<archetype-packaging-version>3.1.2</archetype-packaging-version>

</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -105,6 +114,14 @@

<!-- Build Settings -->
<build>
<!-- Extension for Maven archetype -->
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>${archetype-packaging-version}</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<!-- Clean -->
Expand Down Expand Up @@ -289,15 +306,15 @@
<doclint>all,-missing</doclint>
<quiet>true</quiet>
</configuration>
<executions>
<!--<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</executions>-->
</plugin>
<!-- Maven release generation -->
<plugin>
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/module-info.java

This file was deleted.

14 changes: 5 additions & 9 deletions src/main/java/org/orbisgis/demat/JavascriptEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,13 @@ void initV8Engine() throws JavetException, IOException {
"}";
v8Runtime.getExecutor(svgFunction).executeVoid();
jsonMapper = new ObjectMapper();

}

/**
* Save the vega-lite chart in a SVG file
*
* @param outputFile
* @return
* @throws JavetException
* @param outputFile the file to store the result
* @return the absolute path of the file
*/
public String saveSVG(String json, File outputFile, boolean delete) throws JavetException, IOException {
if (outputFile.exists()) {
Expand Down Expand Up @@ -162,13 +160,12 @@ public String saveSVG(String json, File outputFile, boolean delete) throws Javet
return outputFile.getAbsolutePath();
}


/**
* Save the vega-lite chart in a PNG file
*
* @param outputFile
* @return
* @throws JavetException
* @param vega_spec the input vega spec
* @param outputFile the file to store the result
* @return the absolute path of the file
*/
public String savePNG(String vega_spec, File outputFile, boolean delete, float ratio) throws JavetException {
if (outputFile.exists()) {
Expand Down Expand Up @@ -204,7 +201,6 @@ public String savePNG(String vega_spec, File outputFile, boolean delete, float r
return outputFile.getAbsolutePath();
}


public void setDirectory(String jsDirectory) throws JavetException, IOException {
if (!this.jsDirectory.equals(jsDirectory)) {
this.jsDirectory = jsDirectory;
Expand Down

0 comments on commit 0c2d85d

Please sign in to comment.