diff --git a/.github/workflows/CI build.yml b/.github/workflows/CI build.yml
index 348c1b28..43cb54b8 100644
--- a/.github/workflows/CI build.yml
+++ b/.github/workflows/CI build.yml
@@ -15,6 +15,17 @@ jobs:
# Main build job used to
name: Build
runs-on: ubuntu-latest
+ services:
+ postgres:
+ image: postgis/postgis:16-3.4
+ env:
+ POSTGRES_USER: orbisgis
+ POSTGRES_PASSWORD: orbisgis
+ POSTGRES_DB: orbisgis_db
+ ports:
+ - 5432:5432
+ # needed because the postgres container does not provide a healthcheck
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
# Checkout the source code of the project
- name: Checkout
@@ -27,16 +38,6 @@ jobs:
distribution: 'temurin'
java-version: '11'
- # Setup postgis test DB
- - uses: SPalominos/PostGIS-Installer-Action@v1.0.1
- with:
- psql_version: '9.6'
- pgis_version: '2.5'
- docker_image: 'postgis/postgis'
- db_password: 'orbisgis'
- db_user: 'orbisgis'
- db_name: 'orbisgis_db'
-
# Build the project using
# - clean : clean up the workspace
# - validate : perform different check like the dependency and plugin version update
@@ -62,4 +63,4 @@ jobs:
- if: steps.changes.outputs.changelog == 'false' && github.event_name != 'workflow_dispatch' && steps.changes.outputs.sources == 'true'
run: |
echo "Please update the Changelog.md file."
- exit 1
+ exit 1
\ No newline at end of file
diff --git a/.github/workflows/CI release.yml b/.github/workflows/CI release.yml
index 45b08716..646c0a6b 100644
--- a/.github/workflows/CI release.yml
+++ b/.github/workflows/CI release.yml
@@ -11,6 +11,17 @@ jobs:
build:
name: Release and next iteration
runs-on: ubuntu-latest
+ services:
+ postgres:
+ image: postgis/postgis:16-3.4
+ env:
+ POSTGRES_USER: orbisgis
+ POSTGRES_PASSWORD: orbisgis
+ POSTGRES_DB: orbisgis_db
+ ports:
+ - 5432:5432
+ # needed because the postgres container does not provide a healthcheck
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
# Checkout the source code of the project
- name: Checkout
@@ -37,16 +48,6 @@ jobs:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- # Setup postgis test DB
- - uses: SPalominos/PostGIS-Installer-Action@v1.0.1
- with:
- psql_version: '9.6'
- pgis_version: '2.5'
- docker_image: 'postgis/postgis'
- db_password: 'orbisgis'
- db_user: 'orbisgis'
- db_name: 'orbisgis_db'
-
# Configure git user in order to sign release with OrbisGIS user.
- name: Configure Git User
run: |
@@ -100,7 +101,6 @@ jobs:
git commit -a -m "Empty changelog."
git push origin master
-
# If the version change is a major or minor, create a branch from the previous tag for future revisions.
- name: Branch fork
run: |
@@ -117,4 +117,4 @@ jobs:
mvn versions:set -DnewVersion="${SPLIT0[0]}.${SPLIT0[1]}.$((${SPLIT0[2]}+1))-SNAPSHOT"
git commit -a -m "Set next version."
git push -u origin "$BRANCH"
- fi
+ fi
\ No newline at end of file
diff --git a/.github/workflows/CI snapshot.yml b/.github/workflows/CI snapshot.yml
index 7c6ab1f2..70a4f2dd 100644
--- a/.github/workflows/CI snapshot.yml
+++ b/.github/workflows/CI snapshot.yml
@@ -2,7 +2,7 @@ name: CI_snapshot
on:
push:
- branches: [ '**' ]
+ branches: [ 'master' ]
workflow_run:
workflows: ["CI release"]
branches: [ '**' ]
@@ -14,6 +14,18 @@ jobs:
build:
name: Upload Snapshot
runs-on: ubuntu-latest
+ services:
+ postgres:
+ image: postgis/postgis:16-3.4
+ env:
+ # must specify password for PG Docker container image, see: https://registry.hub.docker.com/_/postgres?tab=description&page=1&name=10
+ POSTGRES_USER: orbisgis
+ POSTGRES_PASSWORD: orbisgis
+ POSTGRES_DB: orbisgis_db
+ ports:
+ - 5432:5432
+ # needed because the postgres container does not provide a healthcheck
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
# Checkout the source code of the project
- name: Checkout
@@ -40,21 +52,10 @@ jobs:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- # Setup postgis test DB
- - uses: SPalominos/PostGIS-Installer-Action@v1.0.1
- with:
- psql_version: '9.6'
- pgis_version: '2.5'
- docker_image: 'postgis/postgis'
- db_password: 'orbisgis'
- db_user: 'orbisgis'
- db_name: 'orbisgis_db'
-
-
# Deploy the snapshot
- name: Deploy
run: mvn deploy -ntp --batch-mode
env:
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
- MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
\ No newline at end of file
diff --git a/commons/pom.xml b/commons/pom.xml
index 19eaa470..0702b18c 100644
--- a/commons/pom.xml
+++ b/commons/pom.xml
@@ -14,14 +14,6 @@
commonsLibrary to manage OrbisData utilities
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
diff --git a/data/data-api/pom.xml b/data/data-api/pom.xml
index d2629cae..0bc325bb 100644
--- a/data/data-api/pom.xml
+++ b/data/data-api/pom.xml
@@ -16,20 +16,11 @@
data-apiDATA API define extension point of OrbisData
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
org.apache.groovygroovy
- ${groovy-version}org.locationtech.jts
@@ -59,43 +50,4 @@
h2gis-utilities
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- org.codehaus.gmavenplus
- gmavenplus-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- 0.8.0
- true
-
- central
-
-
-
-
\ No newline at end of file
diff --git a/data/dataframe/pom.xml b/data/dataframe/pom.xml
index 6785edad..3d2016f4 100644
--- a/data/dataframe/pom.xml
+++ b/data/dataframe/pom.xml
@@ -16,14 +16,6 @@
dataframeLibrary to manage dataframe
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
Erwan Bocher
@@ -40,40 +32,31 @@
com.h2databaseh2
- ${h2-version}org.orbisgiscommons
- ${project.version}
- compileorg.orbisgis.datadata-api
- ${project.version}
- compileorg.orbisgis.datajdbc
- ${project.version}testorg.apache.groovygroovy
- ${groovy-version}org.apache.groovygroovy-sql
- ${groovy-version}org.apache.groovygroovy-templates
- ${groovy-version}org.orbisgis
@@ -106,7 +89,6 @@
org.orbisgis.datah2gis
- ${project.version}test
@@ -114,39 +96,10 @@
-
- org.apache.felix
- maven-bundle-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- org.codehaus.gmavenplusgmavenplus-plugin
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- 0.8.0
- true
-
- central
-
-
-
+
\ No newline at end of file
diff --git a/data/h2gis/pom.xml b/data/h2gis/pom.xml
index 4f694650..fbd43efe 100644
--- a/data/h2gis/pom.xml
+++ b/data/h2gis/pom.xml
@@ -16,14 +16,6 @@
h2gisLibrary to manage h2gis database
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
@@ -37,22 +29,18 @@
com.h2databaseh2
- ${h2-version}org.apache.groovygroovy
- ${groovy-version}org.apache.groovygroovy-sql
- ${groovy-version}org.apache.groovygroovy-templates
- ${groovy-version}org.orbisgis
@@ -93,12 +81,10 @@
commons-dbcpcommons-dbcp
- 1.4org.orbisgis.datapostgis
- ${project.version}test
@@ -106,39 +92,10 @@
-
- org.apache.felix
- maven-bundle-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- org.codehaus.gmavenplusgmavenplus-plugin
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- 0.8.0
- true
-
- central
-
-
\ No newline at end of file
diff --git a/data/jdbc/pom.xml b/data/jdbc/pom.xml
index 1b4d62f3..f0e027dc 100644
--- a/data/jdbc/pom.xml
+++ b/data/jdbc/pom.xml
@@ -16,14 +16,6 @@
jdbcLibrary to manage jdbc connection
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
@@ -37,22 +29,18 @@
com.h2databaseh2
- ${h2-version}org.apache.groovygroovy
- ${groovy-version}org.apache.groovygroovy-sql
- ${groovy-version}org.apache.groovygroovy-templates
- ${groovy-version}org.orbisgis
@@ -91,43 +79,4 @@
test
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- org.codehaus.gmavenplus
- gmavenplus-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- 0.8.0
- true
-
- central
-
-
-
-
-
+
\ No newline at end of file
diff --git a/data/pom.xml b/data/pom.xml
index dfb3276e..cfb4a47a 100644
--- a/data/pom.xml
+++ b/data/pom.xml
@@ -22,49 +22,4 @@
postgis
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- org.codehaus.gmavenplus
- gmavenplus-plugin
-
-
- org.apache.maven.plugins
- maven-resources-plugin
-
-
- org.jacoco
- jacoco-maven-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
-
-
+
\ No newline at end of file
diff --git a/data/postgis/pom.xml b/data/postgis/pom.xml
index a427beaf..772bb250 100644
--- a/data/postgis/pom.xml
+++ b/data/postgis/pom.xml
@@ -16,14 +16,6 @@
postgisLibrary to manage postgis database
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
@@ -37,22 +29,18 @@
com.h2databaseh2
- ${h2-version}org.apache.groovygroovy
- ${groovy-version}org.apache.groovygroovy-sql
- ${groovy-version}org.apache.groovygroovy-templates
- ${groovy-version}org.orbisgis
@@ -81,46 +69,16 @@
commons-dbcpcommons-dbcp
- 1.4
-
- org.apache.felix
- maven-bundle-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- org.codehaus.gmavenplusgmavenplus-plugin
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- 0.8.0
- true
-
- central
-
-
\ No newline at end of file
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 9acb4ba7..9034ce1e 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,2 +1,3 @@
## Changelog for v2.1.3
+- Clean the poms + remove usused module process
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b60810b6..4af9fb91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,158 +1,214 @@
4.0.0
+
+
org.orbisgisorbisdata2.1.3-SNAPSHOTpom
+
+
+ OrbisData
+ Data managing for OrbisGIS application
+
commonsdata
+
+ Lab-STICC - CNRS UMR 6285
+ https://www.labsticc.fr
+
+
+ https://github.com/orbisgis/orbisdata
+
+
+
+ The GNU General Public License, Version 3.0
+ http://www.gnu.org/licenses/gpl-3.0.txt
+ repo
+
+
+
+
+
+ Erwan Bocher
+ ebocher
+ https://github.com/ebocher
+ Lab-STICC - CNRS UMR 6285
+ https://www.labsticc.fr
+
+
+ Sylvain Palominos
+ SPalominos
+ https://github.com/spalominos
+ Lab-STICC - CNRS UMR 6285
+ https://www.labsticc.fr
+
+
+
+
+ scm:git:https://github.com/orbisgis/orbisdata.git
+ scm:git:https://github.com/orbisgis/orbisdata.git
+ git@github.com:orbisgis/orbisdata.git
+ HEAD
+
+
+
+ Github
+ https://github.com/orbisgis/orbisdata/issues
+
+
UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- 11
- 11
- 3.5.0
- 3.2.111
- ${project.basedir}
-
-
- 5.9.2
- 2.2.6-SNAPSHOT
- 1.20.0
- 4.0.29
- 4.7.7
- 2.4.240
- 1.7.2
- 2.21.0
- 1.28.0
- 2.0.17
- 2.5.3
- 1.4.18
-
-
- 3.0.0
- 3.0.2
- 0.8.12
- 3.2.1
- 3.6.0
- 5.1.2
- 3.3.2
- 3.11.0
- 3.1.1
- 3.4.1
- 3.1.0
- 3.1.1
- 3.3.0
- 3.6.2
- 3.4.5
- 3.0.1
- 3.3.1
- 4.0.0-M11
- 3.2.2
- 3.2.2
- 2.16.0
+
+ ${java-version}
+
-
- 3.1.2
+
+
+
+ repo1.maven.org
+ Maven2 repository 1
+ https://repo1.maven.org/maven2
+
+
+ Central Portal Snapshots
+ central-portal-snapshots
+ https://central.sonatype.com/repository/maven-snapshots/
+
+ false
+
+
+ true
+
+
+
-
+
+
+ central
+ https://repo1.maven.org/maven2
+
+ true
+
+
+
+
- org.slf4j
- slf4j-api
- ${slf4j-version}
+ org.orbisgis
+ commons
+ ${project.version}
- org.locationtech.jts
- jts-core
- ${jts-version}
+ org.orbisgis.data
+ data-api
+ ${project.version}
- org.apache.commons
- commons-compress
- ${commons-compress-version}
+ org.orbisgis.data
+ jdbc
+ ${project.version}
- commons-io
- commons-io
- ${commons-io-version}
+ org.orbisgis.data
+ h2gis
+ ${project.version}
+
+
+ org.orbisgis.data
+ postgis
+ ${project.version}
+
+
org.orbisgish2gis
- ${h2gis-version}
+ 2.2.6-SNAPSHOTorg.orbisgish2gis-utilities
- ${h2gis-version}
+ 2.2.6-SNAPSHOTorg.orbisgish2gis-network
- ${h2gis-version}
+ 2.2.6-SNAPSHOTorg.orbisgispostgis-jts
- ${h2gis-version}
+ 2.2.6-SNAPSHOTorg.orbisgiscts
- ${cts-version}
+ 1.7.2
- org.orbisgis
- commons
- ${project.version}
- compile
+ com.h2database
+ h2
+ 2.4.240
- org.orbisgis.data
- data-api
- ${project.version}
- compile
+ org.locationtech.jts
+ jts-core
+ 1.20.0
+
+
- org.orbisgis.data
- jdbc
- ${project.version}
- compile
+ org.apache.groovy
+ groovy
+ 4.0.29
-
- org.orbisgis.data
- h2gis
- ${project.version}
- compile
+ org.apache.groovy
+ groovy-sql
+ 4.0.29
- org.orbisgis.data
- postgis
- ${project.version}
- compile
+ org.apache.groovy
+ groovy-templates
+ 4.0.29
+
+
+
+
+ org.slf4j
+ slf4j-api
+ 2.0.17
+
+
+ org.apache.commons
+ commons-compress
+ 1.28.0
+
+
+ commons-io
+ commons-io
+ 2.21.0
+
+
+ commons-dbcp
+ commons-dbcp
+ 1.4com.github.haifenglsmile-core
- ${smile-version}
+ 2.5.3com.github.haifeng
@@ -163,66 +219,93 @@
com.github.haifenglsmile-data
- ${smile-version}
-
-
- com.thoughtworks.xstream
- xstream
- ${xstream-version}
+ 2.5.3
+
org.slf4jslf4j-simple
- ${slf4j-version}
+ 2.0.17testorg.junit.jupiterjunit-jupiter-api
- ${junit-version}
+ 5.9.2testorg.junit.jupiterjunit-jupiter-engine
- ${junit-version}
- test
-
-
- org.junit.jupiter
- junit-jupiter-params
- ${junit-version}
+ 5.9.2test
+
+
+ deploy
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+
+
+
+
+
+
-
-
-
- org.apache.maven.archetype
- archetype-packaging
- ${archetype-packaging-version}
-
-
-
+
org.apache.maven.pluginsmaven-clean-plugin
- ${maven-clean-version}
+ 3.4.0
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.3.1
-
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.16.0
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+ 3.2.0
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.1.2
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+ 3.6.0
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 3.0.0
+
+
org.codehaus.gmavenplusgmavenplus-plugin
- ${gmaven-version}
+ 3.0.2
- ${maven.compiler.target}
+ ${java-version}
@@ -233,36 +316,46 @@
-
+
org.apache.maven.plugins
- maven-compiler-plugin
- ${maven-compiler-version}
+ maven-gpg-plugin
+ 3.1.0
- ${maven.compiler.source}
- ${maven.compiler.target}
- true
+
+ --pinentry-mode
+ loopback
+
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
-
org.apache.maven.pluginsmaven-surefire-plugin
- ${maven-surefire-version}
+ 3.2.2false
+
org.apache.maven.plugins
- maven-surefire-report-plugin
- ${maven-surefire-report-plugin-version}
+ maven-jar-plugin
+ 3.3.0org.apache.felixmaven-bundle-plugin
- ${maven-bundle-version}
+ 5.1.2true
@@ -270,23 +363,11 @@
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- ${maven-deploy-version}
-
-
-
- org.apache.maven.plugins
- maven-install-plugin
- ${maven-install-version}
- org.apache.maven.pluginsmaven-enforcer-plugin
- ${maven-enforcer-version}
+ 3.4.1enforce-versions
@@ -303,7 +384,7 @@
- ${maven-version}
+ 3.6.3${java-version}
@@ -317,68 +398,18 @@
org.codehaus.mojoversions-maven-plugin
- ${version-maven-version}
+ 2.16.0
https://raw.githubusercontent.com/orbisgis/orbisgis-parents/master/maven-version-rules.xml
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
- ${maven-project-info-reports-version}
-
-
-
- org.jacoco
- jacoco-maven-plugin
- ${jacoco-maven-version}
-
-
- initialize
-
- prepare-agent
-
-
-
- test
-
- report
-
-
-
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- ${exec-maven-version}
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
- ${maven-assembly-version}
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- ${maven-jar-version}
-
-
-
- org.apache.maven.plugins
- maven-archetype-plugin
- ${maven-archetype-plugin-version}
- org.apache.maven.pluginsmaven-javadoc-plugin
- ${maven-javadoc-version}
+ 3.6.2all,-missingtrue
@@ -393,10 +424,11 @@
+
org.apache.maven.pluginsmaven-source-plugin
- ${maven-source-version}
+ 3.2.1attach-sources
@@ -411,45 +443,12 @@
org.apache.maven.pluginsmaven-release-plugin
- ${maven-release-version}
+ 3.0.1truev@{project.version}
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- ${maven-gpg-plugin-version}
-
-
- --pinentry-mode
- loopback
-
-
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- ${maven-resources-version}
-
-
-
- org.apache.maven.plugins
- maven-site-plugin
- ${maven-site-version}
-
@@ -458,11 +457,6 @@
maven-bundle-plugin
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
org.apache.maven.pluginsmaven-surefire-plugin
@@ -482,20 +476,17 @@
false
-
org.apache.maven.pluginsmaven-enforcer-plugin
-
org.apache.maven.pluginsmaven-javadoc-plugin
-
- org.jacoco
- jacoco-maven-plugin
+ org.apache.maven.plugins
+ maven-source-pluginorg.sonatype.central
@@ -508,137 +499,4 @@
-
-
-
- deploy
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- ${maven-gpg-plugin-version}
-
-
- --pinentry-mode
- loopback
-
-
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
-
- dependency-updates-report
- plugin-updates-report
- property-updates-report
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- public
-
-
-
-
-
-
- OrbisData
- Data managing for OrbisGIS application
- https://github.com/orbisgis/orbisdata
-
-
- The GNU General Public License, Version 3.0
- http://www.gnu.org/licenses/gpl-3.0.txt
- repo
-
-
-
- Lab-STICC - CNRS UMR 6285
- https://www.labsticc.fr
-
-
-
- Erwan Bocher
- ebocher
- https://github.com/ebocher
- Lab-STICC - CNRS UMR 6285
- Lab-STICC - CNRS UMR 6285
-
-
- Sylvain Palominos
- SPalominos
- https://github.com/spalominos
- Lab-STICC - CNRS UMR 6285
- Lab-STICC - CNRS UMR 6285
-
-
-
-
-
- Github
- https://github.com/orbisgis/orbisdata/issues
-
-
- scm:git:https://github.com/orbisgis/orbisdata.git
- scm:git:https://github.com/orbisgis/orbisdata.git
- git@github.com:orbisgis/orbisdata.git
- HEAD
-
-
-
-
- repo1.maven.org
- Maven2 repository 1
- https://repo1.maven.org/maven2
-
-
- Central Portal Snapshots
- central-portal-snapshots
- https://central.sonatype.com/repository/maven-snapshots/
-
- false
-
-
- true
-
-
-
-
-
-
- central
- https://repo1.maven.org/maven2
-
- true
-
-
-
diff --git a/process/pom.xml b/process/pom.xml
deleted file mode 100644
index 4b63b93c..00000000
--- a/process/pom.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
- 4.0.0
-
-
-
- org.orbisgis
- orbisdata
- 2.1.3-SNAPSHOT
-
- process
- bundle
-
-
-
- UTF-8
- YYYY-MM-dd
- ${maven.build.timestamp}
- ${project.parent.basedir}
-
-
-
-
-
- org.orbisgis.data
- data-api
- ${project.version}
-
-
- org.slf4j
- slf4j-api
-
-
- org.junit.jupiter
- junit-jupiter-api
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- test
-
-
- org.locationtech.jts
- jts-core
- test
-
-
- org.orbisgis.data
- h2gis
- ${project.version}
- test
-
-
- org.slf4j
- slf4j-simple
- test
-
-
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- org.codehaus.mojo
- versions-maven-plugin
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
- org.codehaus.gmavenplus
- gmavenplus-plugin
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
-
-
-
\ No newline at end of file
diff --git a/process/src/main/java/org/orbisgis/process/GroovyProcessFactory.java b/process/src/main/java/org/orbisgis/process/GroovyProcessFactory.java
deleted file mode 100644
index bb38477a..00000000
--- a/process/src/main/java/org/orbisgis/process/GroovyProcessFactory.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.*;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessBuilder;
-import org.orbisgis.process.api.IProcessFactory;
-import org.orbisgis.process.api.IProcessManager;
-
-import java.util.Optional;
-import java.util.UUID;
-
-/**
- * Implementation of the {@link IProcessFactory} class dedicated to Groovy.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public abstract class GroovyProcessFactory extends Script implements IProcessFactory, GroovyObject, GroovyInterceptable {
- private final ProcessFactory factory = new ProcessFactory();
- /**
- * MetaClass use for groovy methods/properties binding
- */
- protected MetaClass metaClass = InvokerHelper.getMetaClass(ProcessManager.class);
- private IProcessManager processManager;
-
- @Override
- public void registerProcess(IProcess process) {
- factory.registerProcess(process);
- }
-
- @Override
- public boolean isLocked() {
- return factory.isLocked();
- }
-
- @Override
- public boolean isDefault() {
- return factory.isDefault();
- }
-
- @Override
- public Optional getProcess(String processId) {
- return factory.getProcess(processId);
- }
-
- @Override
- public IProcessBuilder create() {
- return factory.create();
- }
-
- @Override
- public Optional create(@DelegatesTo(IProcessBuilder.class) Closure> cl) {
- if(cl == null) {
- return Optional.empty();
- }
- else {
- IProcessBuilder builder = new ProcessBuilder(this, this);
- Closure> code = cl.rehydrate(builder, this, this);
- code.setResolveStrategy(Closure.DELEGATE_FIRST);
- return Optional.of(((IProcessBuilder) code.call()).getProcess());
- }
- }
-
- @Override
- public Object invokeMethod(String name, Object args) {
- if(name != null) {
- Object obj = getMetaClass().invokeMethod(this, name, args);
- if(obj instanceof Optional){
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
- else {
- return null;
- }
- }
-
- @Override
- public Object getProperty(String name) {
- if(name == null) {
- return null;
- }
- Optional p = getProcess(name);
- if(p.isPresent()){
- return p.get().newInstance();
- }
- else{
- Object o = getMetaClass().getProperty(this, name);
- if(o instanceof Optional){
- return ((Optional) o).orElse(null);
- }
- return o;
- }
- }
-
- @Override
- public Optional getProcessManager() {
- return Optional.ofNullable(processManager);
- }
-
- @Override
- public void setProcessManager(IProcessManager processManager) {
- this.processManager = processManager;
- }
-
- /**
- * Prefix the given String with '_' and an UUID.
- *
- * @param name String to prefix
- * @return The prefixed String
- */
- public static String prefix(String name) {
- return UUID.randomUUID().toString().replaceAll("-", "_") + "_" + name;
- }
-
- /**
- * Prefix the given String with the given prefix.
- *
- * @param prefix Prefix
- * @param name String to prefix
- * @return The prefixed String
- */
- public static String prefix(String prefix, String name) {
- return prefix == null || prefix.isEmpty() ? name : prefix + "_" + name;
- }
-
- /**
- * Postfix the given String with '_' and an UUID..
- *
- * @param name String to postfix
- * @return The postfix String
- */
- public static String postfix(String name) {
- return name + "_" + UUID.randomUUID().toString().replaceAll("-", "_");
- }
-
- /**
- * Postfix the given String with the given postfix.
- *
- * @param postfix Postfix
- * @param name String to postfix
- * @return The postfix String
- */
- public static String postfix(String name, String postfix) {
- return postfix == null || postfix.isEmpty() ? name : name + "_" + postfix;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/GroovyProcessManager.java b/process/src/main/java/org/orbisgis/process/GroovyProcessManager.java
deleted file mode 100644
index 3a7a85de..00000000
--- a/process/src/main/java/org/orbisgis/process/GroovyProcessManager.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.*;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessBuilder;
-import org.orbisgis.process.api.IProcessFactory;
-import org.orbisgis.process.api.IProcessManager;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
-/**
- * Implementation of the {@link IProcessManager} class dedicated to Groovy.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2020)
- */
-public abstract class GroovyProcessManager extends Script implements IProcessManager, GroovyObject, GroovyInterceptable {
-
- /**
- * Internal ProcessManager.
- */
- private final IProcessManager pm = new ProcessManager();
- /**
- * MetaClass use for groovy methods/properties binding
- */
- protected MetaClass metaClass = InvokerHelper.getMetaClass(GroovyProcessManager.class);
-
- @Override
- public IProcessBuilder create() {
- return pm.create();
- }
-
- @Override
- public Optional create(Closure> cl) {
- return pm.create(cl);
- }
-
- @Override
- public List factoryIds() {
- return pm.factoryIds();
- }
-
- @Override
- public IProcessFactory factory(String identifier) {
- return pm.factory(identifier);
- }
-
- @Override
- public IProcessFactory factory() {
- return pm.factory();
- }
-
- @Override
- public Optional process(String processId) {
- return pm.process(processId);
- }
-
- @Override
- public Optional process(String processId, String factoryId) {
- return pm.process(processId, factoryId);
- }
-
- @Override
- public boolean registerFactory(String id, IProcessFactory factory) {
- boolean ret = pm.registerFactory(id, factory);
- factory.setProcessManager(this);
- return ret;
- }
-
- @Override
- public void register(Map map) {
- pm.register(map);
- map.values().forEach(factory -> factory.setProcessManager(this));
- }
-
- public void register(List> list) throws IllegalAccessException, InstantiationException {
- if(list != null) {
- for (Class extends GroovyProcessFactory> clazz : list) {
- GroovyProcessFactory gpf = clazz.newInstance();
- gpf.run();
- registerFactory(clazz.getSimpleName(), gpf);
- gpf.setProcessManager(this);
- }
- }
- }
-
- public static GroovyProcessManager load(Class extends GroovyProcessManager> clazz) throws IllegalAccessException, InstantiationException {
- GroovyProcessManager gpm = clazz.newInstance();
- gpm.run();
- return gpm;
- }
-
- public void setLogger(GroovyObject logger) {
- factoryIds().stream()
- .map(this::factory)
- .filter(pf -> pf instanceof GroovyProcessFactory)
- .map(pf -> (GroovyProcessFactory)pf);
- }
-
- @Override
- public Object invokeMethod(String name, Object args) {
- if(name != null) {
- Object obj = getMetaClass().invokeMethod(this, name, args);
- if(obj instanceof Optional){
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
- else {
- return null;
- }
- }
-
- @Override
- public Object getProperty(String name) {
- if(name == null) {
- return null;
- }
- if(factoryIds().contains(name)){
- return factory(name);
- }
- else{
- return getMetaClass().getProperty(this, name);
- }
- }
-
- @Override
- public MetaClass getMetaClass() {
- return metaClass;
- }
-
- @Override
- public void setMetaClass(MetaClass metaClass) {
- this.metaClass = metaClass == null ? InvokerHelper.getMetaClass(this.getClass()) : metaClass;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/Linker.java b/process/src/main/java/org/orbisgis/process/Linker.java
deleted file mode 100644
index 2effb445..00000000
--- a/process/src/main/java/org/orbisgis/process/Linker.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import org.orbisgis.process.api.ILinker;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-import org.orbisgis.process.api.inoutput.IInput;
-import org.orbisgis.process.api.inoutput.IOutput;
-import org.orbisgis.process.inoutput.Input;
-import org.orbisgis.process.inoutput.Output;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-/**
- * This class manage the link between inputs, outputs and aliases.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public class Linker implements ILinker {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(Linker.class);
- /**
- * Array of inputs
- */
- private final List inputList = new ArrayList<>();
- /**
- * Array of outputs
- */
- private final List outputList = new ArrayList<>();
- /**
- * Map with the input as key and the output as value.
- */
- private final Map inputOutputMap;
- /**
- * Map of the aliases as key and the list of input/output as value.
- */
- private final Map> aliases;
- private final LinkedList inputs = new LinkedList<>();
- private final LinkedList outputs = new LinkedList<>();
-
- /**
- * Main constructor.
- *
- * @param inOutPuts Inputs or outputs to link.
- */
- protected Linker(IInOutPut... inOutPuts) {
- inputOutputMap = new HashMap<>();
- aliases = new HashMap<>();
- if (inOutPuts == null || inOutPuts.length == 0) {
- LOGGER.error("The input/output list should not be empty.");
- return;
- }
- boolean allInputs = true;
- boolean allOutputs = true;
- for (IInOutPut inOutPut : inOutPuts) {
- if (!inOutPut.getProcess().isPresent()) {
- allOutputs = false;
- allInputs = false;
- }
- else {
- if (inOutPut.getProcess().get().getInputs().stream()
- .noneMatch(input -> input.getName().equals(inOutPut.getName()))) {
- allInputs = false;
- }
- if (inOutPut.getProcess().get().getOutputs().stream()
- .noneMatch(output -> output.getName().equals(inOutPut.getName()))) {
- allOutputs = false;
- }
- }
- }
- if (!allInputs && !allOutputs) {
- LOGGER.error("Input and outputs should not be mixed.");
- } else if (allInputs) {
- inputList.addAll(Arrays.asList(inOutPuts));
- } else {
- outputList.addAll(Arrays.asList(inOutPuts));
- }
- }
-
- @Override
- public void to(IInOutPut... inOutPuts) {
- if (inOutPuts == null || inOutPuts.length == 0) {
- LOGGER.error("The input/output list should not be empty.");
- return;
- }
- if (Arrays.stream(inOutPuts).anyMatch(iInOutPut -> iInOutPut instanceof IInput) &&
- Arrays.stream(inOutPuts).anyMatch(iInOutPut -> iInOutPut instanceof IOutput)) {
- LOGGER.error("Input and outputs should not be mixed.");
- return;
- }
- if (!inputList.isEmpty()) {
- if (Arrays.stream(inOutPuts).noneMatch(iInOutPut -> iInOutPut instanceof IOutput)) {
- LOGGER.error("Inputs should be link to outputs.");
- return;
- }
- outputList.addAll(Arrays.asList(inOutPuts));
- } else if (!outputList.isEmpty()) {
- if (Arrays.stream(inOutPuts).noneMatch(iInOutPut -> iInOutPut instanceof IInput)) {
- LOGGER.error("Outputs should be link to inputs.");
- return;
- }
- inputList.addAll(Arrays.asList(inOutPuts));
- }
- for (IInOutPut input : inputList) {
- for (IInOutPut output : outputList) {
- inputOutputMap.put(input, output);
- }
- }
- }
-
- @Override
- public void to(String alias) {
- List inOutPuts = new ArrayList<>();
- inOutPuts.addAll(inputList);
- inOutPuts.addAll(outputList);
- for (IInOutPut inOutPut : inOutPuts) {
- if (aliases.get(alias) != null) {
- aliases.get(alias).add(inOutPut);
- } else {
- aliases.put(alias, new ArrayList<>(inOutPuts));
- }
- }
- if (!inputList.isEmpty() &&
- inputList.stream().map(IInOutPut::getName).map(Optional::get)
- .noneMatch(name -> name.equals(alias))) {
- inputs.add(new Input().name(alias));
- }
- if (!outputList.isEmpty() &&
- outputList.stream().map(IInOutPut::getName).map(Optional::get)
- .noneMatch(name -> name.equals(alias))) {
- outputs.add(new Output().name(alias));
- }
- }
-
- public Map> getAliases() {
- return aliases;
- }
-
- public Map getInputOutputMap() {
- return inputOutputMap;
- }
-
- public LinkedList getInputs() {
- return inputs;
- }
-
- public LinkedList getOutputs() {
- return outputs;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/Process.java b/process/src/main/java/org/orbisgis/process/Process.java
deleted file mode 100644
index 2acb00f9..00000000
--- a/process/src/main/java/org/orbisgis/process/Process.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.Closure;
-import groovy.lang.GroovyInterceptable;
-import groovy.lang.GroovyObject;
-import groovy.lang.MetaClass;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-import org.orbisgis.process.api.inoutput.IInput;
-import org.orbisgis.process.api.inoutput.IOutput;
-import org.orbisgis.process.inoutput.Input;
-import org.orbisgis.process.inoutput.Output;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * Implementation of the {@link IProcess} interface dedicated to the local creation and execution of process (no link with
- * WPS process for now).
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public class Process implements IProcess, GroovyObject, GroovyInterceptable {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(Process.class);
-
- /**
- * Title of the process
- */
- private String title;
- /**
- * Process version
- */
- private String version;
- /**
- * Human readable description of the process
- */
- private String description;
- /**
- * List of simple keyword (one word) of the process
- */
- private String[] keywords;
- /**
- * List of inputs
- */
- private LinkedList inputs;
- /**
- * List of outputs
- */
- private LinkedList outputs;
- /**
- * Closure containing the code to execute on the process execution
- */
- private Closure> closure;
- /**
- * Map of the process Result
- */
- private Map resultMap;
- /**
- * Unique identifier
- */
- private String identifier;
- /**
- * MetaClass use for groovy methods/properties binding
- */
- private MetaClass metaClass;
- /**
- * Map of the defaults values
- */
- private Map defaultValues;
-
- /**
- * Create a new Process with its title, description, keyword array, input map, output map, version
- * and the closure containing the code to execute on the process execution. The Closure will receive all the input
- * as parameter in the same order as the order of the input map. So the list of parameter of the closure, the
- * array of input and the map of input given on the execution should have the same size and meaning.
- *
- * @param title Title of the process.
- * @param description Human readable description of the process.
- * @param keywords List of simple keyword (one word) of the process.
- * @param inputs Map of inputs with the name as key and the input class as value. The names will be used to link
- * the closure parameters with the execution input data map.
- * @param outputs Map of outputs with the name as key and the output class as value. Those names will be used to
- * generate the Map of the getResults Method.
- * @param version Process version.
- * @param closure Closure containing the code to execute on the process execution.
- */
- Process(String title, String description, String[] keywords, LinkedHashMap inputs,
- LinkedHashMap outputs, String version, Closure> closure) {
- this(null, title, description, keywords, inputs, outputs, version, closure);
- }
-
- /**
- * Create a new Process with its title, description, keyword array, input map, output map, version
- * and the closure containing the code to execute on the process execution. The Closure will receive all the input
- * as parameter in the same order as the order of the input map. So the list of parameter of the closure, the
- * array of input and the map of input given on the execution should have the same size and meaning.
- *
- * @param id Identifier of the process.
- * @param title Title of the process.
- * @param description Human readable description of the process.
- * @param keywords List of simple keyword (one word) of the process.
- * @param inputs Map of inputs with the name as key and the input class as value. The names will be used to link
- * the closure parameters with the execution input data map.
- * @param outputs Map of outputs with the name as key and the output class as value. Those names will be used to
- * generate the Map of the getResults Method.
- * @param version Process version.
- * @param closure Closure containing the code to execute on the process execution.
- */
- Process(String id, String title, String description, String[] keywords, LinkedHashMap inputs,
- LinkedHashMap outputs, String version, Closure> closure) {
- if (inputs != null && closure != null && closure.getMaximumNumberOfParameters() != inputs.size()) {
- LOGGER.error("The number of the closure parameters and the number of process input names are different.");
- return;
- }
- this.title = title;
- this.version = version;
- this.description = description;
- this.keywords = keywords;
- this.inputs = new LinkedList<>();
- this.defaultValues = new HashMap<>();
- if (inputs != null) {
- for (Map.Entry entry : inputs.entrySet()) {
- Input input;
- if (entry.getValue() instanceof Class) {
- input = new Input().type((Class>) entry.getValue());
- } else if (entry.getValue() instanceof Input) {
- input = (Input) entry.getValue();
- if (input.isOptional()) {
- this.defaultValues.put(entry.getKey(), input.getDefaultValue().orElse(null));
- }
- } else {
- input = new Input()
- .type(entry.getValue().getClass())
- .optional(entry.getValue());
- this.defaultValues.put(entry.getKey(), entry.getValue());
- }
- input.process(this).name(entry.getKey());
- this.inputs.add(input);
- }
- }
- this.outputs = new LinkedList<>();
- if (outputs != null) {
- for (Map.Entry entry : outputs.entrySet()) {
- Output output;
- if (entry.getValue() instanceof Class) {
- output = new Output().type((Class>) entry.getValue());
- } else {
- output = ((Output) entry.getValue());
- }
- output.process(this).name(entry.getKey());
- this.outputs.add(output);
- }
- }
- this.closure = closure;
- this.resultMap = new HashMap<>();
- this.identifier = id == null ? UUID.randomUUID().toString() : id;
- this.metaClass = InvokerHelper.getMetaClass(getClass());
- }
-
- @Override
- public IProcess newInstance() {
- Process process = new Process(title, description, keywords, null, null,
- version, closure);
- process.inputs = this.inputs.stream().map(IInput::copy).collect(Collectors.toCollection(LinkedList::new));
- process.inputs.forEach(in -> in.setProcess(process));
- process.outputs = this.outputs.stream().map(IOutput::copy).collect(Collectors.toCollection(LinkedList::new));
- process.outputs.forEach(out -> out.setProcess(process));
- process.defaultValues = this.defaultValues;
- return process;
- }
-
- @Override
- public IProcess copy() {
- Process process = new Process(title, description, keywords, null, null,
- version, closure);
- process.inputs = this.inputs.stream().map(IInput::copy).collect(Collectors.toCollection(LinkedList::new));
- process.inputs.forEach(in -> in.setProcess(process));
- process.outputs = this.outputs.stream().map(IOutput::copy).collect(Collectors.toCollection(LinkedList::new));
- process.outputs.forEach(out -> out.setProcess(process));
- process.defaultValues = this.defaultValues;
- process.identifier = this.identifier;
- return process;
- }
-
- /**
- * Return the curry closure taking into account the optional arguments.
- *
- * @param inputDataMap Map containing the data for the execution of the closure. This map may not contains several
- * inputs.
- * @param cl Closure to curry.
- * @return The closure if the missing inputs are all optional, false otherwise.
- */
- private Closure> getClosureWithCurry(LinkedHashMap inputDataMap, Closure> cl) {
- int curryIndex = 0;
- List names = inputs.stream().map(IInOutPut::getName).map(Optional::get).collect(Collectors.toCollection(LinkedList::new));
- for (String name : names) {
- if (!inputDataMap.containsKey(name)) {
- if (defaultValues.get(name) == null) {
- LOGGER.error("The parameter " + name + " has no default value.");
- return null;
- }
- cl = cl.ncurry(curryIndex, defaultValues.get(name));
- curryIndex--;
- }
- curryIndex++;
- }
- return cl;
- }
-
- /**
- * Returns the input data as an Object array.
- *
- * @param inputDataMap Map containing the data for the execution of the closure.
- * @return The casted input data as an Object array.
- */
- private Object[] getClosureArgs(LinkedHashMap inputDataMap) {
- return inputs
- .stream()
- .map(IInOutPut::getName)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .filter(inputDataMap::containsKey)
- .map(inputDataMap::get)
- .toArray();
- }
-
- @Override
- public boolean execute(LinkedHashMap inputDataMap) {
- LinkedHashMap map = (inputDataMap == null ? new LinkedHashMap<>() : inputDataMap);
- if (closure == null) {
- LOGGER.error("The process should have a Closure defined.");
- return false;
- }
- LOGGER.debug("Starting the execution of '" + this.getTitle() + "'.");
- if ((inputs.size() < map.size() || inputs.size() - defaultValues.size() > map.size())) {
- LOGGER.error("The number of the input data map and the number of process input are different, should" +
- " be between " + (closure.getMaximumNumberOfParameters() - defaultValues.size()) + " and " +
- closure.getMaximumNumberOfParameters() + ".");
- return false;
- }
- Object result;
- try {
- if (inputs.size() != 0) {
- Closure> cl = getClosureWithCurry(map, closure);
- if (cl == null) {
- return false;
- }
- result = cl.call(getClosureArgs(map));
- } else {
- result = closure.call();
- }
- } catch (Exception e) {
- LOGGER.error("Error while executing the process.", e);
- return false;
- }
- if (outputs.size() == 0) {
- resultMap = new HashMap<>();
- resultMap.put("result", result);
- return true;
- }
- else if (outputs.size() == 1) {
- if(result == null){
- return false;
- }
- if(result instanceof Map){
- resultMap.putAll(((Map) result));
- return true;
- }
- else {
- resultMap = new HashMap<>();
- resultMap.put("result", result);
- return true;
- }
- } else if (result == null) {
- return false;
- } else {
- return checkResults(result);
- }
- }
-
- /**
- * Check that the process result contains all the process outputs and store the results of the process execution.
- *
- * @param result Result of the process execution.
- * @return True if the execution hes been successful, false otherwise.
- */
- private boolean checkResults(Object result) {
- Map map;
- if (!(result instanceof Map)) {
- return false;
- } else {
- map = (Map) result;
- }
- boolean isResultValid = outputs.stream()
- .map(IInOutPut::getName)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .allMatch(map::containsKey);
- LOGGER.debug("End of the execution of '" + this.getTitle() + "'.");
- if (!isResultValid) {
- LOGGER.debug("The output of the execution are not compatible with process output.");
- return false;
- } else {
- resultMap.putAll(map);
- return true;
- }
- }
-
- @Override
- public Optional getTitle() {
- return Optional.ofNullable(title);
- }
-
- @Override
- public Optional getVersion() {
- return Optional.ofNullable(version);
- }
-
- @Override
- public Optional getDescription() {
- return Optional.ofNullable(description);
- }
-
- @Override
- public Optional getKeywords() {
- return Optional.ofNullable(keywords);
- }
-
- @Override
- public Map getResults() {
- return resultMap;
- }
-
- @Override
- public String getIdentifier() {
- return identifier;
- }
-
- @Override
- public List getInputs() {
- return inputs;
- }
-
- @Override
- public List getOutputs() {
- return outputs;
- }
-
- //Groovy object methods
- @Override
- public Object invokeMethod(String name, Object args) {
- if(name == null) {
- return null;
- }
- Object obj = metaClass.invokeMethod(this, name, args);
- if(obj instanceof Optional) {
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
-
- @Override
- public Object getProperty(String propertyName) {
- if(propertyName == null){
- return null;
- }
- if (inputs.stream()
- .map(IInOutPut::getName)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .anyMatch(propertyName::equals)) {
- return new Input().process(this).name(propertyName);
- }
- if (outputs.stream()
- .map(IInOutPut::getName)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .anyMatch(propertyName::equals)) {
- return new Output().process(this).name(propertyName);
- }
- Object obj = metaClass.getProperty(this, propertyName);
- if(obj instanceof Optional) {
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
-
- @Override
- public MetaClass getMetaClass() {
- return metaClass;
- }
-
- @Override
- public void setMetaClass(MetaClass metaClass) {
- this.metaClass = metaClass == null ? InvokerHelper.getMetaClass(this.getClass()) : metaClass;
- }
-
- @Override
- public boolean call(LinkedHashMap inputDataMap) {
- return execute(inputDataMap);
- }
-
- @Override
- public boolean equals(Object obj){
- if(! (obj instanceof Process)){
- return false;
- }
- Process p = (Process)obj;
- return Objects.equals(this.getIdentifier(), p.getIdentifier());
- }
-}
\ No newline at end of file
diff --git a/process/src/main/java/org/orbisgis/process/ProcessBuilder.java b/process/src/main/java/org/orbisgis/process/ProcessBuilder.java
deleted file mode 100644
index 47fe1d2e..00000000
--- a/process/src/main/java/org/orbisgis/process/ProcessBuilder.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.Closure;
-import org.orbisgis.commons.utilities.CheckUtils;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessBuilder;
-import org.orbisgis.process.api.IProcessFactory;
-
-import java.util.LinkedHashMap;
-
-/**
- * Implementation of the interface {@link IProcessBuilder}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public class ProcessBuilder implements IProcessBuilder {
-
- /**
- * {@link IProcessFactory} used to register the process.
- */
- private final IProcessFactory factory;
- /**
- * Delegate for the closure
- */
- private final Object delegate;
- /**
- * Identifier of the process.
- */
- private String id;
- /**
- * Title of the process.
- */
- private String title;
- /**
- * Human readable description of the process.
- */
- private String description;
- /**
- * List of simple keyword (one word) of the process.
- */
- private String[] keywords;
- /**
- * @link LinkedHashMap} of inputs with the name as key and the input Object as value.
- */
- private LinkedHashMap inputs;
- /**
- * {@link LinkedHashMap} of outputs with the name as key and the output Object as value.
- */
- private LinkedHashMap outputs;
- /**
- * Process version.
- */
- private String version;
- /**
- * {@link Closure} containing the code to execute on the process execution.
- */
- private Closure> closure;
-
- /**
- * Main constructor.
- *
- * @param factory {@link IProcessFactory} used to register the process.
- * @param delegate Delegate for the closure.
- */
- public ProcessBuilder(IProcessFactory factory, Object delegate) {
- CheckUtils.checkNotNull(factory, "The ProcessFactory should not be null.");
- CheckUtils.checkNotNull(delegate, "The Closure delegate object should not be null.");
- this.factory = factory;
- this.delegate = delegate;
- }
-
- @Override
- public IProcessBuilder id(String id) {
- this.id = id;
- return this;
- }
-
- @Override
- public IProcessBuilder title(String title) {
- this.title = title;
- return this;
- }
-
- @Override
- public IProcessBuilder description(String description) {
- this.description = description;
- return this;
- }
-
- @Override
- public IProcessBuilder keywords(String[] keywords) {
- this.keywords = keywords;
- return this;
- }
-
- @Override
- public IProcessBuilder inputs(LinkedHashMap inputs) {
- this.inputs = inputs;
- return this;
- }
-
- @Override
- public IProcessBuilder outputs(LinkedHashMap outputs) {
- this.outputs = outputs;
- return this;
- }
-
- @Override
- public IProcessBuilder version(String version) {
- this.version = version;
- return this;
- }
-
- @Override
- public IProcessBuilder run(Closure> closure) {
- this.closure = closure;
- if (closure != null) {
- this.closure.setDelegate(delegate);
- this.closure.setResolveStrategy(Closure.DELEGATE_FIRST);
- }
- return this;
- }
-
- @Override
- public IProcess getProcess() {
- IProcess process = new Process(id, title, description, keywords, inputs, outputs, version, closure);
- factory.registerProcess(process);
- return process;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/ProcessFactory.java b/process/src/main/java/org/orbisgis/process/ProcessFactory.java
deleted file mode 100644
index 7489783b..00000000
--- a/process/src/main/java/org/orbisgis/process/ProcessFactory.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.*;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessBuilder;
-import org.orbisgis.process.api.IProcessFactory;
-import org.orbisgis.process.api.IProcessManager;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-/**
- * Implementation of the {@link IProcessFactory}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public class ProcessFactory implements IProcessFactory, GroovyObject, GroovyInterceptable {
-
- /**
- * Indicated if the process creation is allowed.
- */
- protected boolean isLock;
- /**
- * Indicates if the factory should be used as the default one.
- */
- protected boolean isDefault;
- /**
- * List of the processes created with this factory.
- */
- private final List processList;
- private IProcessManager processManager;
- /**
- * {@link MetaClass}
- */
- private MetaClass metaClass = InvokerHelper.getMetaClass(ProcessFactory.class);
-
- /**
- * Default empty constructor.
- */
- ProcessFactory() {
- this(false, false);
- }
-
- /**
- * Constructor allowing to configure the factory.
- *
- * @param lock If true, not process creation allowed.
- * @param dflt If true, it will be selected as the default factory.
- */
- ProcessFactory(boolean lock, boolean dflt) {
- isLock = lock;
- isDefault = dflt;
- processList = new ArrayList<>();
- }
-
- @Override
- public void registerProcess(IProcess process) {
- if (!isLock && process != null) {
- List list = new ArrayList<>();
- for (IProcess p : processList) {
- if (p.getIdentifier().equals(process.getIdentifier())) {
- list.add(p);
- }
- }
- processList.removeAll(list);
- processList.add(process);
- }
- }
-
- @Override
- public boolean isLocked() {
- return isLock;
- }
-
- @Override
- public boolean isDefault() {
- return isDefault;
- }
-
- @Override
- public Optional getProcess(String processId) {
- return processList
- .stream()
- .filter(iProcess -> iProcess.getIdentifier().equals(processId))
- .findFirst()
- .map(IProcess::newInstance);
- }
-
- @Override
- public IProcessBuilder create() {
- return new ProcessBuilder(this, this);
- }
-
- @Override
- public Optional create(@DelegatesTo(IProcessBuilder.class) Closure> cl) {
- if(cl == null) {
- return Optional.empty();
- }
- else {
- IProcessBuilder builder = new ProcessBuilder(this, this);
- Closure> code = cl.rehydrate(builder, this, this);
- code.setResolveStrategy(Closure.DELEGATE_FIRST);
- return Optional.of(((IProcessBuilder) code.call()).getProcess());
- }
- }
-
- @Override
- public Optional getProcessManager() {
- return Optional.ofNullable(processManager);
- }
-
- @Override
- public void setProcessManager(IProcessManager processManager) {
- this.processManager = processManager;
- }
-
- @Override
- public Object invokeMethod(String name, Object args) {
- if(name != null) {
- Object obj = this.metaClass.invokeMethod(this, name, args);
- if(obj instanceof Optional){
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
- else {
- return null;
- }
- }
-
- @Override
- public MetaClass getMetaClass() {
- return metaClass;
- }
-
- @Override
- public void setMetaClass(MetaClass metaClass) {
- this.metaClass = metaClass == null ? InvokerHelper.getMetaClass(this.getClass()) : metaClass;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/ProcessManager.java b/process/src/main/java/org/orbisgis/process/ProcessManager.java
deleted file mode 100644
index 1634c0e8..00000000
--- a/process/src/main/java/org/orbisgis/process/ProcessManager.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.*;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessBuilder;
-import org.orbisgis.process.api.IProcessFactory;
-import org.orbisgis.process.api.IProcessManager;
-
-import java.util.*;
-
-/**
- * Implementation of IProcessManager as a singleton.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public class ProcessManager implements IProcessManager, GroovyObject, GroovyInterceptable {
-
- /**
- * Default factory name
- */
- private static final String DEFAULT_FACTORY_NAME = "Default";
- /**
- * Unique ProcessManager instance.
- */
- private static ProcessManager instance = null;
-
- /**
- * Map of the process factory and their identifier.
- */
- private final Map processFactoryMap;
- /**
- * Default factory
- */
- private final IProcessFactory defaultFactory;
- /**
- * MetaClass use for groovy methods/properties binding
- */
- protected MetaClass metaClass = InvokerHelper.getMetaClass(ProcessManager.class);
-
- /**
- * Private constructor in order to make it unique.
- */
- protected ProcessManager() {
- defaultFactory = new ProcessFactory(false, true);
- defaultFactory.setProcessManager(this);
- processFactoryMap = new HashMap<>();
- processFactoryMap.put(DEFAULT_FACTORY_NAME, defaultFactory);
- }
-
- /**
- * Return the unique instance of the ProcessManager.
- *
- * @return The unique instance of the ProcessManager.
- */
- public static ProcessManager getProcessManager() {
- if (instance == null) {
- instance = new ProcessManager();
- }
- return instance;
- }
-
- @Override
- public IProcessBuilder create() {
- return new ProcessBuilder(defaultFactory, defaultFactory);
- }
-
- @Override
- public Optional create(@DelegatesTo(IProcessBuilder.class) Closure> cl) {
- if(cl == null) {
- return Optional.empty();
- }
- IProcessBuilder builder = new ProcessBuilder(defaultFactory, defaultFactory);
- Closure> code = cl.rehydrate(builder, this, this);
- code.setResolveStrategy(Closure.DELEGATE_FIRST);
- code.call();
- Process p = (Process)builder.getProcess();
- return Optional.of(p);
- }
-
- @Override
- public List factoryIds() {
- return new ArrayList<>(processFactoryMap.keySet());
- }
-
- @Override
- public IProcessFactory factory(String identifier) {
- if(identifier == null) {
- return factory();
- }
- if (!processFactoryMap.containsKey(identifier)) {
- IProcessFactory factory = new ProcessFactory();
- factory.setProcessManager(this);
- processFactoryMap.put(identifier, factory);
- }
- return processFactoryMap.get(identifier);
- }
-
- public static IProcessFactory createFactory(String identifier) {
- return getProcessManager().factory(
- identifier != null && !identifier.isEmpty() ? identifier : "factory_"+ UUID.randomUUID());
- }
-
- @Override
- public IProcessFactory factory() {
- return defaultFactory;
- }
-
- public static IProcessFactory createFactory() {
- return getProcessManager().factory();
- }
-
- @Override
- public Optional process(String processId) {
- return factory().getProcess(processId);
- }
-
- @Override
- public Optional process(String processId, String factoryId) {
- return factory(factoryId).getProcess(processId);
- }
-
- @Override
- public boolean registerFactory(String id, IProcessFactory factory) {
- if(factory == null || id == null || id.isEmpty() || processFactoryMap.containsKey(id)) {
- return false;
- }
- processFactoryMap.put(id, factory);
- factory.setProcessManager(this);
- return true;
- }
-
- @Override
- public void register(Map map) {
- if(map != null) {
- map.forEach(this::registerFactory);
- }
- }
-
- @Override
- public Object invokeMethod(String name, Object args) {
- if(name != null) {
- Object obj = getMetaClass().invokeMethod(this, name, args);
- if(obj instanceof Optional){
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
- else {
- return null;
- }
- }
-
- @Override
- public MetaClass getMetaClass() {
- return metaClass;
- }
-
- @Override
- public void setMetaClass(MetaClass metaClass) {
- this.metaClass = metaClass == null ? InvokerHelper.getMetaClass(this.getClass()) : metaClass;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/ProcessMapper.java b/process/src/main/java/org/orbisgis/process/ProcessMapper.java
deleted file mode 100644
index 80eae891..00000000
--- a/process/src/main/java/org/orbisgis/process/ProcessMapper.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import groovy.lang.GroovyInterceptable;
-import groovy.lang.GroovyObject;
-import groovy.lang.MetaClass;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.orbisgis.process.api.ILinker;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessMapper;
-import org.orbisgis.process.api.check.ICheckDataBuilder;
-import org.orbisgis.process.api.check.IProcessCheck;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-import org.orbisgis.process.api.inoutput.IInput;
-import org.orbisgis.process.api.inoutput.IOutput;
-import org.orbisgis.process.check.CheckDataBuilder;
-import org.orbisgis.process.check.ProcessCheck;
-import org.orbisgis.process.inoutput.Input;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * Implementation of IProcessMapper. This class should not be used will using a IProcess executing and mapping
- * processes is easier.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public class ProcessMapper implements IProcessMapper, GroovyObject, GroovyInterceptable {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(ProcessMapper.class);
-
- private LinkedList inputs;
- private LinkedList outputs;
- private List> executionTree;
- private Map results;
- /**
- * List of all the processes used in this mapper.
- */
- private List processList;
- /**
- * List of check to do before process execution
- */
- private final List beforeList;
- /**
- * List of check to do after process execution
- */
- private final List afterList;
- /**
- * List of linker used to rebuild the execution.
- */
- private List linkerList;
- /**
- * Map with the input as key and the output as value.
- */
- private final Map inputOutputMap;
- /**
- * Map of the aliases as key and the list of input/output as value.
- */
- private final Map> aliases;
- /**
- * Title of the mapper.
- */
- private final String title;
-
- /**
- * Groovy {@link MetaClass}.
- */
- protected MetaClass metaClass = InvokerHelper.getMetaClass(ProcessMapper.class);
-
- /**
- * Main empty constructor.
- */
- public ProcessMapper() {
- this("mapper_" + UUID.randomUUID());
- }
-
- /**
- * Main constructor.
- */
- public ProcessMapper(String title) {
- this.title = title;
- beforeList = new ArrayList<>();
- afterList = new ArrayList<>();
- linkerList = new ArrayList<>();
- inputs = new LinkedList<>();
- outputs = new LinkedList<>();
- aliases = new HashMap<>();
- inputOutputMap = new HashMap<>();
- }
-
- /**
- * Return the alias of the given input or output.
- *
- * @param name Name of the alias.
- * @param process {@link IProcess} containing the input/output with the alias.
- * @return The alias name if there is one, null otherwise.
- */
- private String getAlias(String name, IProcess process) {
- return aliases.entrySet()
- .stream()
- .filter(entry ->
- entry.getValue().stream().map(IInOutPut::getName).map(Optional::get).anyMatch(n -> n.equals(name)) &&
- entry.getValue().stream().map(IInOutPut::getProcess).map(Optional::get).anyMatch(p -> p.equals(process)))
- .findFirst()
- .orElse(new AbstractMap.SimpleEntry<>(null, null))
- .getKey();
- }
-
- /**
- * Fill the process list.
- */
- private void fillProcessList() {
- processList.addAll(
- inputOutputMap.keySet().stream()
- .map(IInOutPut::getProcess)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .collect(Collectors.toList()));
- processList.addAll(
- inputOutputMap.values().stream()
- .map(IInOutPut::getProcess)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .collect(Collectors.toList()));
- processList.addAll(
- aliases.values().stream()
- .flatMap(Collection::stream)
- .map(IInOutPut::getProcess)
- .map(Optional::get)
- .collect(Collectors.toList()));
- //Keep distinct processes
- processList = processList.stream().distinct().collect(Collectors.toList());
- }
-
- private Collection collectInput(IInput input, IProcess process) {
- Collection collection = new ArrayList<>();
- if (inputOutputMap.keySet().stream().noneMatch(in -> in.equals(input))) {
- if (getAlias(input.getName().orElse(null), process) == null) {
- inputs.add(input);
- }
- collection.add(new Input().process(process).name(input.getName().orElse(null)));
- }
- return collection;
- }
-
- private void collectOutput(IOutput output, IProcess process) {
- if (inputOutputMap.values().stream().noneMatch(out -> out.equals(output)) &&
- getAlias(output.getName().orElse(null), process) == null) {
- outputs.add(output);
- }
- }
-
- /**
- * Collect all the not linked inputs/outputs to set the {@link ProcessMapper} inputs/outputs.
- *
- * @return The list of available inputs.
- */
- private List collectInputOutput() {
- List availableIn = new ArrayList<>();
- for (IProcess process : processList) {
- process.getInputs().forEach(input -> availableIn.addAll(collectInput(input, process)));
- process.getOutputs().forEach(output -> collectOutput(output, process));
- }
- return availableIn;
- }
-
- private void buildExecutionTreeLevel(List iterableProcessList, List availableIn,
- int i, List newIn) {
- for (Iterator iterator = iterableProcessList.iterator(); iterator.hasNext(); ) {
- IProcess process = iterator.next();
- boolean isAllInput = true;
- for (IInput input : process.getInputs()) {
- boolean isInputAvailable = false;
- for (IInOutPut processInput : availableIn) {
- if (processInput.equals(input)) {
- isInputAvailable = true;
- break;
- }
- }
- if (!isInputAvailable) {
- isAllInput = false;
- break;
- }
- }
- if (isAllInput) {
- executionTree.get(i).add(process);
- for (IOutput output : process.getOutputs()) {
- for (Map.Entry entry : inputOutputMap.entrySet()) {
- if (entry.getValue().equals(output)) {
- newIn.add(entry.getKey());
- }
- }
- }
- iterator.remove();
- }
- }
- }
-
- /**
- * Link the inputs, the outputs and the aliases to prepare the execution.
- */
- private boolean link() {
- executionTree = new ArrayList<>();
- results = new HashMap<>();
- processList = new ArrayList<>();
-
- linkerList.stream().map(Linker::getAliases).forEach(aliases::putAll);
- linkerList.stream().map(Linker::getInputOutputMap).forEach(inputOutputMap::putAll);
- linkerList.stream().map(Linker::getInputs).forEach(inputs::addAll);
- linkerList.stream().map(Linker::getOutputs).forEach(outputs::addAll);
-
- fillProcessList();
-
- List availableIn = collectInputOutput();
-
- //Build the execution tree
- List iterableProcessList = new ArrayList<>(processList);
- int i = 0;
- List newIn = new ArrayList<>();
- do {
- availableIn.addAll(newIn);
- newIn = new ArrayList<>();
- executionTree.add(new ArrayList<>());
- buildExecutionTreeLevel(iterableProcessList, availableIn, i, newIn);
- i++;
- } while (!iterableProcessList.isEmpty() && !executionTree.get(i - 1).isEmpty());
-
- if (!iterableProcessList.isEmpty()) {
- LOGGER.error("Unable to link the processes '" +
- iterableProcessList.stream()
- .map(IProcess::getTitle)
- .filter(Optional::isPresent)
- .map(Optional::get)
- .collect(Collectors.joining(",")) + "'");
- return false;
- }
- return true;
- }
-
- @Override
- public List getInputs() {
- return inputs;
- }
-
- @Override
- public List getOutputs() {
- return outputs;
- }
-
- @Override
- public IProcessMapper newInstance() {
- ProcessMapper mapper = new ProcessMapper();
- mapper.processList = new ArrayList<>(processList);
- mapper.executionTree = new ArrayList<>(executionTree);
- mapper.linkerList = new ArrayList<>(linkerList);
- mapper.inputs = this.inputs.stream().map(IInput::copy).collect(Collectors.toCollection(LinkedList::new));
- mapper.outputs = this.outputs.stream().map(IOutput::copy).collect(Collectors.toCollection(LinkedList::new));
- return mapper;
- }
-
- @Override
- public IProcessMapper copy() {
- ProcessMapper mapper = new ProcessMapper();
- mapper.processList = new ArrayList<>(processList);
- mapper.executionTree = new ArrayList<>(executionTree);
- mapper.linkerList = new ArrayList<>(linkerList);
- mapper.inputs = this.inputs.stream().map(IInput::copy).collect(Collectors.toCollection(LinkedList::new));
- mapper.outputs = this.outputs.stream().map(IOutput::copy).collect(Collectors.toCollection(LinkedList::new));
- return mapper;
- }
-
- /**
- * Return a {@link LinkedHashMap} with the input data for the given {@link IProcess} execution.
- *
- * @param process {@link IProcess} which will executed.
- * @param dataMap {@link Map} with the {@link ProcessMapper} input data.
- * @return A {@link LinkedHashMap} with the input data for the given {@link IProcess}.
- */
- private LinkedHashMap getInputDataMap(IProcess process, Map dataMap) {
- LinkedHashMap processInData = new LinkedHashMap<>();
- for (IInput in : process.getInputs()) {
- //Try to get the data directly from the out of a process
- String alias = getAlias(in.getName().orElse(null), process);
- final Object[] data = new Object[1];
- if (alias != null) {
- data[0] = dataMap.get(alias);
- } else {
- data[0] = dataMap.get(in.getName().orElse(null));
- }
- //Get the link between the input 'in' and a process output if exists
- inputOutputMap.forEach((input, output) -> {
- if (process.equals(input.getProcess().orElse(null)) &&
- input.getName().equals(in.getName())) {
- //get the process with the output linked to 'in'
- for (IProcess p : processList) {
- if (p.equals(output.getProcess().orElse(null))) {
- data[0] = p.getResults().get(output.getName().orElse(null));
- }
- }
- }
- });
- //Do not add null value for optional input
- if (in.isOptional() && data[0] == null) {
- processInData.put(in.getName().orElse(null), in.getDefaultValue().orElse(null));
- } else {
- processInData.put(in.getName().orElse(null), data[0]);
- }
- }
- return processInData;
- }
-
- @Override
- public boolean execute(LinkedHashMap inputDataMap) {
- if (!link()) {
- return false;
- }
- Map dataMap = inputDataMap == null ? new HashMap<>() : new HashMap<>(inputDataMap);
- //Iterate over the execution tree
- for (List processes : executionTree) {
- for (IProcess process : processes) {
- LinkedHashMap processInData = getInputDataMap(process, dataMap);
- //Do the before check
- beforeList.stream()
- .filter(check -> check.getProcess().isPresent())
- .filter(check -> check.getProcess().get().getIdentifier().equals(process.getIdentifier()))
- .forEach(check -> check.run(processInData));
- //Execute the process
- process.execute(processInData);
- storeResults(process);
- //Do the after check
- afterList.stream()
- .filter(check -> check.getProcess().isPresent())
- .filter(check -> check.getProcess().get().getIdentifier().equals(process.getIdentifier()))
- .forEach(check -> check.run(processInData));
- }
- }
- return true;
- }
-
- /**
- * Store the result of the {@link IProcess} execution.
- *
- * @param process {@link IProcess} which results should be stored.
- */
- private void storeResults(IProcess process) {
- for (String key : process.getResults().keySet()) {
- boolean isBetween = inputOutputMap.values().stream()
- .anyMatch(value -> key.equals(value.getName().orElse(null)) &&
- process.equals(value.getProcess().orElse(null)));
- String alias = getAlias(key, process);
- if (alias != null) {
- results.put(alias, process.getResults().get(key));
- } else {
- if (!isBetween) {
- results.put(key, process.getResults().get(key));
- }
- }
- }
- }
-
- @Override
- public Optional getTitle() {
- return Optional.ofNullable(title);
- }
-
- @Override
- public Map getResults() {
- return results;
- }
-
- @Override
- public ILinker link(IInOutPut... inOutPuts) {
- Linker linker = new Linker(inOutPuts);
- linkerList.add(linker);
- return linker;
- }
-
- @Override
- public ICheckDataBuilder before(IProcess process) {
- IProcessCheck processCheck = new ProcessCheck(process);
- beforeList.add(processCheck);
- return new CheckDataBuilder(processCheck);
- }
-
- @Override
- public ICheckDataBuilder after(IProcess process) {
- IProcessCheck processCheck = new ProcessCheck(process);
- afterList.add(processCheck);
- return new CheckDataBuilder(processCheck);
- }
-
- @Override
- public boolean call(LinkedHashMap inputDataMap) {
- return execute(inputDataMap);
- }
-
- @Override
- public Object getProperty(String propertyName){
- if(propertyName != null) {
- Object obj = this.metaClass.getProperty(this, propertyName);
- if(obj instanceof Optional){
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
- else {
- return null;
- }
- }
-
- @Override
- public Object invokeMethod(String name, Object args) {
- if(name != null) {
- Object obj = this.metaClass.invokeMethod(this, name, args);
- if(obj instanceof Optional){
- return ((Optional>)obj).orElse(null);
- }
- else {
- return obj;
- }
- }
- else {
- return null;
- }
- }
-
- @Override
- public MetaClass getMetaClass() {
- return metaClass;
- }
-
- @Override
- public void setMetaClass(MetaClass metaClass) {
- this.metaClass = metaClass == null ? InvokerHelper.getMetaClass(this.getClass()) : metaClass;
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/ProgressMonitor.java b/process/src/main/java/org/orbisgis/process/ProgressMonitor.java
deleted file mode 100644
index 99af8b11..00000000
--- a/process/src/main/java/org/orbisgis/process/ProgressMonitor.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process;
-
-import org.orbisgis.process.api.IProgressMonitor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-/**
- * Implementation of the {@link IProgressMonitor} interface.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2020)
- */
-public class ProgressMonitor implements IProgressMonitor {
-
- /**
- * Actual step of the progression.
- */
- private int step;
- /**
- * Maximum step count.
- */
- private final int maximum;
- /**
- * True if the progression should be logged, false otherwise.
- */
- private final boolean autoLog;
- /**
- * {@link Logger} used to log progression.
- */
- private final Logger logger;
- /**
- * List of child.
- */
- private final List children;
- /**
- * Name of the task.
- */
- private final String name;
- /**
- * Reference to the parent {@link IProgressMonitor}
- */
- private final IProgressMonitor parent;
- /**
- * Indicates if the progression has end.
- */
- private boolean end;
-
- /**
- * Returns a child {@link IProgressMonitor} with the given name as task name, the given maximum as maximum
- * step count and logging the progression if autoLog to true.
- *
- * @param parent Parent {@link IProgressMonitor}.
- * @param taskName Name of the task.
- * @param maximum Maximum step number.
- * @param autoLog Log the progression if true, otherwise do not log.
- */
- public ProgressMonitor(IProgressMonitor parent, String taskName, int maximum, boolean autoLog){
- this.name = taskName == null ? "task_" + UUID.randomUUID() : taskName;
- this.maximum = maximum;
- this.step = 0;
- this.children = new ArrayList<>();
- this.autoLog = autoLog;
- this.logger = LoggerFactory.getLogger(ProgressMonitor.class);
- this.parent = parent;
- this.end = false;
- }
-
- /**
- * Creates a child {@link IProgressMonitor} with the given name as task name, the given maximum as maximum
- * step count and logging the progression if autoLog to true.
- *
- * @param taskName Name of the task.
- * @param maximum Maximum step number.
- * @param autoLog Log the progression if true, otherwise do not log.
- */
- public ProgressMonitor(String taskName, int maximum, boolean autoLog){
- this(null, taskName, maximum, autoLog);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} with the given maximum as maximum step count and logging the
- * progression if autoLog to true.
- *
- * @param maximum Maximum step number.
- * @param autoLog Log the progression if true, otherwise do not log.
- */
- public ProgressMonitor(int maximum, boolean autoLog){
- this(null, null, maximum, autoLog);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} with the given name as task name, without maximum step count and
- * logging the progression if autoLog to true.
- *
- * @param taskName Name of the task.
- * @param autoLog Log the progression if true, otherwise do not log.
- */
- public ProgressMonitor(String taskName, boolean autoLog){
- this(null, taskName, -1, autoLog);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} with the given name as task name and the given maximum as maximum
- * step count.
- *
- * @param taskName Name of the task.
- * @param maximum Maximum step number.
- */
- public ProgressMonitor(String taskName, int maximum){
- this(null, taskName, maximum, false);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} with the given name as task name, without maximum step count.
- *
- * @param taskName Name of the task.
- */
- public ProgressMonitor(String taskName){
- this(null, taskName, -1, false);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} with the given maximum as maximum step count.
- *
- * @param maximum Maximum step number.
- */
- public ProgressMonitor(int maximum){
- this(null, null, maximum, false);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} without maximum step count, logging the progression if autoLog to true.
- *
- * @param autoLog Log the progression if true, otherwise do not log.
- */
- public ProgressMonitor(boolean autoLog){
- this(null, null, -1, autoLog);
- }
-
- /**
- * Creates a child {@link IProgressMonitor} without maximum step count.
- */
- public ProgressMonitor(){
- this(null, null, -1, false);
- }
-
- @Override
- public void incrementStep() {
- if(step < maximum) {
- this.step++;
- }
- if(maximum != -1 && step >= maximum){
- end = true;
- }
- if(autoLog) {
- if(parent != null) {
- parent.log();
- }
- else {
- log();
- }
- }
- }
-
- @Override
- public double getProgress() {
- if(end){
- return 100;
- }
- if(maximum == -1){
- return -1;
- }
- if(children.stream().map(IProgressMonitor::getProgress).anyMatch(d -> d==-1)){
- return -1;
- }
- return 100.0 /
- (children.size() + maximum) *
- (children.stream().map(IProgressMonitor::getProgress).reduce(0.0, Double::sum)/100 +step);
- }
-
- @Override
- public int getMaxStep() {
- return maximum;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public IProgressMonitor getSubProgress(String taskName) {
- return getSubProgress(taskName, -1, autoLog);
- }
-
- @Override
- public IProgressMonitor getSubProgress(boolean autoLog) {
- return getSubProgress(null, -1, autoLog);
- }
-
- @Override
- public IProgressMonitor getSubProgress(int maximum) {
- return getSubProgress(null, maximum, autoLog);
- }
-
- @Override
- public IProgressMonitor getSubProgress(String taskName, int maximum) {
- return getSubProgress(taskName, maximum, autoLog);
- }
-
- @Override
- public IProgressMonitor getSubProgress(String taskName, boolean autoLog) {
- return getSubProgress(taskName, -1, autoLog);
- }
-
- @Override
- public IProgressMonitor getSubProgress(int maximum, boolean autoLog) {
- return getSubProgress(null, maximum, autoLog);
- }
-
- @Override
- public IProgressMonitor getSubProgress(String taskName, int maximum, boolean autoLog) {
- IProgressMonitor pm = new ProgressMonitor(this, taskName, maximum, autoLog);
- children.add(pm);
- return pm;
- }
-
- @Override
- public void log() {
- if(parent == null) {
- logger.info(name + " : " + String.format("%.2f", getProgress()) + "/100.00");
- }
- else {
- parent.log();
- }
- }
-
- @Override
- public void end() {
- end = true;
- if(autoLog){
- log();
- }
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/ILinker.java b/process/src/main/java/org/orbisgis/process/api/ILinker.java
deleted file mode 100644
index 7c5cefad..00000000
--- a/process/src/main/java/org/orbisgis/process/api/ILinker.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-import org.orbisgis.process.api.inoutput.IInOutPut;
-
-/**
- * This interface declare the methods used to link inputs, outputs and aliases. The first element to link is given
- * through the constructor, the second through the methods {@link ILinker#to(String)} or
- * {@link ILinker#to(IInOutPut[])}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS 2019)
- */
-public interface ILinker {
-
- /**
- * Second element to link.
- *
- * @param inOutPuts Inputs or Outputs to link.
- */
- void to(IInOutPut... inOutPuts);
-
- /**
- * Alias to give to the inputs or outputs.
- *
- * @param alias Alias to use.
- */
- void to(String alias);
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/IProcess.java b/process/src/main/java/org/orbisgis/process/api/IProcess.java
deleted file mode 100644
index 7da18dc6..00000000
--- a/process/src/main/java/org/orbisgis/process/api/IProcess.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-import org.orbisgis.process.api.inoutput.IInput;
-import org.orbisgis.process.api.inoutput.IOutput;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
-/**
- * Interface defining the main methods of a process.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS 2019)
- */
-public interface IProcess {
-
- /**
- * Return a new instance of the process.
- *
- * @return A process new instance.
- */
- IProcess newInstance();
-
- /**
- * Execute the process with the given inputs.
- *
- * @param inputDataMap Map of the inputs with the name as key and the input value as value.
- * @return True if the execution is successful, false otherwise.
- */
- boolean execute(LinkedHashMap inputDataMap);
-
- /**
- * Return the title of the process.
- *
- * @return The title of the process.
- */
- Optional getTitle();
-
- /**
- * Return the process version.
- *
- * @return The process version.
- */
- Optional getVersion();
-
- /**
- * Return the human readable description of the process.
- *
- * @return The description of the process.
- */
- Optional getDescription();
-
- /**
- * Return the array of the process keywords.
- *
- * @return The array of the process keywords.
- */
- Optional getKeywords();
-
- /**
- * Return the results of the process.
- *
- * @return A Map of the results with the output name as key and the output value as value.
- */
- Map getResults();
-
- /**
- * Return the process identifier.
- *
- * @return The process identifier.
- */
- String getIdentifier();
-
- /**
- * Return a {@link Map} with the input name as key and its {@link Class} as value.
- *
- * @return A {@link Map} with the input name as key and its {@link Class} as value.
- */
- List getInputs();
-
- /**
- * Return a {@link Map} with the output name as key and its {@link Class} as value.
- *
- * @return A {@link Map} with the output name as key and its {@link Class} as value.
- */
- List getOutputs();
-
- /**
- * Call the {@link IProcess#execute(LinkedHashMap)} method.
- *
- * @param inputDataMap Map of the inputs with the name as key and the input value as value.
- * @return True if the execution is successful, false otherwise.
- */
- boolean call(LinkedHashMap inputDataMap);
-
- /**
- * Create an exact copy of this {@link IProcess}.
- *
- * @return Exact copy of this {@link IProcess}
- */
- IProcess copy();
-}
\ No newline at end of file
diff --git a/process/src/main/java/org/orbisgis/process/api/IProcessBuilder.java b/process/src/main/java/org/orbisgis/process/api/IProcessBuilder.java
deleted file mode 100644
index abe28db9..00000000
--- a/process/src/main/java/org/orbisgis/process/api/IProcessBuilder.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-import groovy.lang.Closure;
-
-import java.util.LinkedHashMap;
-
-/**
- * Interface declaring all the methods for the building of a {@link IProcess}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS 2019)
- */
-public interface IProcessBuilder {
-
- /**
- * Set the identifier of the process.
- *
- * @param id Identifier of the process.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder id(String id);
-
- /**
- * Set the title of the process.
- *
- * @param title Title of the process.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder title(String title);
-
- /**
- * Set the description of the process.
- *
- * @param description Human readable description of the process.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder description(String description);
-
- /**
- * Set the keywords of the process.
- *
- * @param keywords List of simple keyword (one word) of the process.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder keywords(String[] keywords);
-
- /**
- * Set the inputs of the process.
- *
- * @param inputs {@link LinkedHashMap} of inputs with the name as key and the input Object as value.
- * The names will be used to link the closure parameters with the execution
- * input data map.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder inputs(LinkedHashMap inputs);
-
- /**
- * Set the outputs of the process.
- *
- * @param outputs {@link LinkedHashMap} of outputs with the name as key and the output Object as value.
- * Those names will be used to generate the LinkedHashMap of the
- * getResults Method.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder outputs(LinkedHashMap outputs);
-
- /**
- * Set the version of the process.
- *
- * @param version Process version.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder version(String version);
-
- /**
- * Set the closure of the process.
- *
- * @param closure {@link Closure} containing the code to execute on the process execution.
- * @return A {@link IProcessBuilder} to continue the building.
- */
- IProcessBuilder run(Closure> closure);
-
- /**
- * Build and return the process.
- *
- * @return The built {@link IProcess}.
- */
- IProcess getProcess();
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/IProcessFactory.java b/process/src/main/java/org/orbisgis/process/api/IProcessFactory.java
deleted file mode 100644
index 3e43bca1..00000000
--- a/process/src/main/java/org/orbisgis/process/api/IProcessFactory.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-import groovy.lang.Closure;
-import groovy.lang.DelegatesTo;
-
-import java.util.Optional;
-
-/**
- * This interface defines the methods dedicated to the process creation and managing.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface IProcessFactory {
-
- /**
- * Register a {@link IProcess}.
- *
- * @param process {@link IProcess} to register.
- */
- void registerProcess(IProcess process);
-
- /**
- * Return true if the process creation is locked, false otherwise.
- *
- * @return True if the process creation is locked, false otherwise.
- */
- boolean isLocked();
-
- /**
- * Return true if the factory if the default one, false otherwise.
- *
- * @return True if the factory if the default one, false otherwise.
- */
- boolean isDefault();
-
- /**
- * Returns the process with the given identifier.
- *
- * @param processId Identifier of the process to get.
- * @return The process with the given identifier.
- */
- Optional getProcess(String processId);
-
- /**
- * Return a {@link IProcessBuilder} to create a {@link IProcess}. Once the process created, it will be register
- * in this {@link IProcessFactory}.
- *
- * @return A {@link IProcessBuilder} to create a {@link IProcess}.
- */
- IProcessBuilder create();
-
- /**
- * Return a {@link IProcess} created from the given {@link Closure}. Once the process created, it will be register
- * in this {@link IProcessFactory}.
- *
- * @param cl {@link Closure} delegated to {@link IProcessBuilder}.
- * @return A {@link IProcess}.
- */
- Optional create(@DelegatesTo(IProcessBuilder.class) Closure> cl);
-
- /**
- * Return the {@link IProcess} containing the factory.
- *
- * @return The {@link IProcess} containing the factory.
- */
- Optional getProcessManager();
-
- /**
- * Set the {@link IProcessManager} containing the factory.
- *
- * @param processManager The {@link IProcessManager} containing the factory.
- */
- void setProcessManager(IProcessManager processManager);
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/IProcessManager.java b/process/src/main/java/org/orbisgis/process/api/IProcessManager.java
deleted file mode 100644
index 70f073eb..00000000
--- a/process/src/main/java/org/orbisgis/process/api/IProcessManager.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-import groovy.lang.Closure;
-import groovy.lang.DelegatesTo;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
-/**
- * This interface defines the methods dedicated to the process and process factory managing.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS 2019)
- */
-public interface IProcessManager {
-
- /**
- * Return a {@link IProcessBuilder} to create a {@link IProcess}. Once the process created, it will be register
- * in the default {@link IProcessFactory} if set.
- *
- * @return A {@link IProcessBuilder} to create a {@link IProcess}.
- */
- IProcessBuilder create();
-
- /**
- * Return a {@link IProcess} created from the given {@link Closure}. Once the process created, it will be register
- * in the default {@link IProcessFactory} if set.
- *
- * @param cl {@link Closure} delegated to {@link IProcessBuilder}.
- * @return A {@link IProcess}.
- */
- Optional create(@DelegatesTo(IProcessBuilder.class) Closure> cl);
-
- /**
- * Return the list of the factory identifiers.
- *
- * @return The list of the factory identifier.
- */
- List factoryIds();
-
- /**
- * Returns the process factory with the given identifier.
- *
- * @param identifier Identifier of the factory.
- * @return The process factory with the given identifier.
- */
- IProcessFactory factory(String identifier);
-
- /**
- * Returns the default process factory.
- *
- * @return The default process factory.
- */
- IProcessFactory factory();
-
- /**
- * Returns the process with the given identifier from the default factory.
- *
- * @param processId Identifier of the process to get.
- * @return The process with the given identifier from the default factory.
- */
- Optional process(String processId);
-
- /**
- * Returns the process with the given identifier from the factory with the given identifier.
- *
- * @param processId Identifier of the process to get.
- * @param factoryId Identifier of the factory.
- * @return The process with the given identifier from the factory with the given identifier.
- */
- Optional process(String processId, String factoryId);
-
- /**
- * Register the given factory with the given id.
- *
- * @param id Identifier of the factory to register.
- * @param factory Factory to register.
- */
- boolean registerFactory(String id, IProcessFactory factory);
-
- /**
- * Register a map of factories with the id as key and the factory as value.
- *
- * @param map Map of the factories.
- */
- void register(Map map);
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/IProcessMapper.java b/process/src/main/java/org/orbisgis/process/api/IProcessMapper.java
deleted file mode 100644
index 6729972f..00000000
--- a/process/src/main/java/org/orbisgis/process/api/IProcessMapper.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-import org.orbisgis.process.api.check.ICheckDataBuilder;
-import org.orbisgis.process.api.check.IProcessCheck;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-
-import java.util.Optional;
-import java.util.UUID;
-
-/**
- * This class should not be used will using a IProcess executing and mapping processes is easier.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS 2019)
- */
-public interface IProcessMapper extends IProcess {
-
- @Override
- IProcessMapper newInstance();
-
- @Override
- IProcessMapper copy();
-
- /**
- * Start to link the given inputs/outputs.
- *
- * @param inOutPuts Inputs or outputs to link.
- * @return A {@link ILinker} object which will do the link.
- */
- ILinker link(IInOutPut... inOutPuts);
-
- /**
- * Add a {@link IProcessCheck} before the execution of the given {@link IProcess}.
- *
- * @param process {@link IProcess} before which the check should be done.
- * @return A {@link ICheckDataBuilder} to continue the {@link IProcessCheck} build.
- */
- ICheckDataBuilder before(IProcess process);
-
-
- /**
- * Add a {@link IProcessCheck} after the execution of the given {@link IProcess}.
- *
- * @param process {@link IProcess} after which the check should be done.
- * @return A {@link ICheckDataBuilder} to continue the {@link IProcessCheck} build.
- */
- ICheckDataBuilder after(IProcess process);
-
- @Override
- default Optional getVersion() {
- return Optional.empty();
- }
-
- @Override
- default Optional getDescription() {
- return Optional.empty();
- }
-
- @Override
- default Optional getKeywords() {
- return Optional.empty();
- }
-
- @Override
- default String getIdentifier() {
- return UUID.randomUUID().toString();
- }
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/IProgressMonitor.java b/process/src/main/java/org/orbisgis/process/api/IProgressMonitor.java
deleted file mode 100644
index 604b7176..00000000
--- a/process/src/main/java/org/orbisgis/process/api/IProgressMonitor.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api;
-
-
-/**
- * This interface declare the methods for a progress monitoring the running of a {@link IProcess} or a
- * {@link IProcessMapper}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (Lab-STICC UBS 2020)
- */
-public interface IProgressMonitor {
-
- /**
- * Increments the current step of the progression.
- */
- void incrementStep();
-
- /**
- * Returns the progression or -1 if the {@link IProgressMonitor} has not maximum step count.
- *
- * @return The progression or -1.
- */
- double getProgress();
-
- /**
- * Returns the maximum count of steps.
- *
- * @return The maximum count of steps.
- */
- int getMaxStep();
-
- /**
- * Log the progression.
- */
- void log();
-
- /**
- * Make the progression reach its end.
- */
- void end();
-
- /**
- * Returns the {@link IProgressMonitor} name.
- *
- * @return The {@link IProgressMonitor} name.
- */
- String getName();
-
- /**
- * Returns a child {@link IProgressMonitor} with the given name as task name, without maximum step count.
- *
- * @param taskName Name of the task.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(String taskName);
-
- /**
- * Returns a child {@link IProgressMonitor} with the given maximum as maximum step count.
- *
- * @param maximum Maximum step number.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(int maximum);
-
- /**
- * Returns a child {@link IProgressMonitor} without maximum step count, logging the progression if autoLog to true.
- *
- * @param autoLog Log the progression if true, otherwise do not log.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(boolean autoLog);
-
- /**
- * Returns a child {@link IProgressMonitor} with the given name as task name and the given maximum as maximum
- * step count.
- *
- * @param taskName Name of the task.
- * @param maximum Maximum step number.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(String taskName, int maximum);
-
- /**
- * Returns a child {@link IProgressMonitor} with the given name as task name, without maximum step count and
- * logging the progression if autoLog to true.
- *
- * @param taskName Name of the task.
- * @param autoLog Log the progression if true, otherwise do not log.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(String taskName, boolean autoLog);
-
- /**
- * Returns a child {@link IProgressMonitor} with the given maximum as maximum step count and logging the
- * progression if autoLog to true.
- *
- * @param maximum Maximum step number.
- * @param autoLog Log the progression if true, otherwise do not log.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(int maximum, boolean autoLog);
-
- /**
- * Returns a child {@link IProgressMonitor} with the given name as task name, the given maximum as maximum
- * step count and logging the progression if autoLog to true.
- *
- * @param taskName Name of the task.
- * @param maximum Maximum step number.
- * @param autoLog Log the progression if true, otherwise do not log.
- * @return A child {@link IProgressMonitor}.
- */
- IProgressMonitor getSubProgress(String taskName, int maximum, boolean autoLog);
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/check/ICheckClosureBuilder.java b/process/src/main/java/org/orbisgis/process/api/check/ICheckClosureBuilder.java
deleted file mode 100644
index 2a97e935..00000000
--- a/process/src/main/java/org/orbisgis/process/api/check/ICheckClosureBuilder.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-
-package org.orbisgis.process.api.check;
-
-import groovy.lang.Closure;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-
-/**
- * Interface for the definition of which closure is provided for the Process check execution.
- * Instance is get from the {@link ICheckDataBuilder#with(IInOutPut...)}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface ICheckClosureBuilder {
-
- /**
- * Sets the {@link Closure} to execute to perform the check.
- * If the {@link Closure} is null, just check equality of data.
- *
- * @param cl {@link Closure} to execute to perform the check.
- * @return A {@link ICheckClosureBuilder} to continue the check building.
- */
- ICheckOptionBuilder check(Closure> cl);
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/check/ICheckDataBuilder.java b/process/src/main/java/org/orbisgis/process/api/check/ICheckDataBuilder.java
deleted file mode 100644
index 1ac6040b..00000000
--- a/process/src/main/java/org/orbisgis/process/api/check/ICheckDataBuilder.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api.check;
-
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.IProcessMapper;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-
-/**
- * Interface for the definition of which data are provided for the Process check execution.
- * Instance is get from the {@link IProcessMapper#after(IProcess)} and {@link IProcessMapper#before(IProcess)}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface ICheckDataBuilder {
-
- /**
- * Sets the inputs or outputs to use for the check.
- *
- * @param data Input or output list to use to do the check.
- * @return A {@link ICheckClosureBuilder} to continue the check building.
- */
- ICheckClosureBuilder with(IInOutPut... data);
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/check/ICheckOptionBuilder.java b/process/src/main/java/org/orbisgis/process/api/check/ICheckOptionBuilder.java
deleted file mode 100644
index 9541e7ec..00000000
--- a/process/src/main/java/org/orbisgis/process/api/check/ICheckOptionBuilder.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api.check;
-
-import groovy.lang.Closure;
-
-/**
- * Interface for the definition of the getProcess check execution options.
- * Instance is get from the {@link ICheckClosureBuilder#check(Closure)}.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface ICheckOptionBuilder {
-
- /**
- * Make the check log the given message and stop the program on fail .
- *
- * @param message Message to log.
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder stopOnFail(String message);
-
- /**
- * Make the check stop the program on fail .
- *
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder stopOnFail();
-
- /**
- * Make the check log the given message and stop the program on success .
- *
- * @param message Message to log.
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder stopOnSuccess(String message);
-
- /**
- * Make the check stop the program on success .
- *
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder stopOnSuccess();
-
- /**
- * Make the check log the given message and continue the program on fail .
- *
- * @param message Message to log.
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder continueOnFail(String message);
-
- /**
- * Make the check continue the program on fail .
- *
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder continueOnFail();
-
- /**
- * Make the check log the given message and continue the program on success .
- *
- * @param message Message to log.
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder continueOnSuccess(String message);
-
- /**
- * Make the check continue the program on success .
- *
- * @return A {@link ICheckOptionBuilder} to continue the check building.
- */
- ICheckOptionBuilder continueOnSuccess();
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/check/IProcessCheck.java b/process/src/main/java/org/orbisgis/process/api/check/IProcessCheck.java
deleted file mode 100644
index f604033b..00000000
--- a/process/src/main/java/org/orbisgis/process/api/check/IProcessCheck.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api.check;
-
-import groovy.lang.Closure;
-import org.orbisgis.process.api.IProcess;
-import org.orbisgis.process.api.inoutput.IInOutPut;
-
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.Optional;
-
-/**
- * Interface for the definition of getProcess check.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface IProcessCheck {
-
- /**
- * Enumeration of the action to do after a process check.
- */
- enum Action{CONTINUE, STOP}
-
- /**
- * Run the check with output data given with {@link #setInOutPuts(IInOutPut...)} and the input data from the given
- * {@link LinkedHashMap}. On fail, return false and apply the action set with {@link #onFail(Action, String)}.
- * On success, return true and apply the action set with {@link #onSuccess(Action, String)}.
- *
- * I not process have been provided, the default values of the mapper input are checked. The given map represents
- * the inputs to check as key and there default value as value.
- *
- * @param processInData {@link LinkedHashMap} containing the input data for the {@link IProcess} execution.
- * @return True if the process should continue, false otherwise
- */
- boolean run(LinkedHashMap processInData);
-
- /**
- * Set the action to do on check fail. If action is null, use {@link Action#STOP} by default.
- *
- * @param action Action to do on fail.
- * @param message Message to log.
- */
- void onFail(Action action, String message);
-
- /**
- * Set the message on check fail. By default use {@link Action#STOP}.
- *
- * @param message Message to log.
- */
- void onFail(String message);
-
- /**
- * Set the action to do on check success. If action is null, use {@link Action#STOP} by default.
- *
- * @param action Action to do on success.
- * @param message Message to log.
- */
- void onSuccess(Action action, String message);
-
- /**
- * Set the message on check success. By default use {@link Action#CONTINUE}.
- *
- * @param message Message to log.
- */
- void onSuccess(String message);
-
- /**
- * Sets the input and output to use inside the check.
- *
- * @param inputOrOutput Input or output list to use for the check.
- */
- void setInOutPuts(IInOutPut... inputOrOutput);
-
- /**
- * Returns the input and output to use inside the check.
- *
- * @return The input or output list to use for the check.
- */
- LinkedList getInOutPuts();
-
- /**
- * Set the {@link Closure} to call to execute the check.
- *
- * @param cl {@link Closure} to call to execute the check.
- */
- void setClosure(Closure> cl);
-
- /**
- * Returns the {@link Closure} to call to execute the check.
- *
- * @return The {@link Closure} to call to execute the check.
- */
- Optional> getClosure();
-
- /**
- * Method executed on check fail. If process should stop, returns true, false otherwise.
- *
- * @return False if the process should stop, true otherwise.
- * @throws IllegalStateException Exception thrown when check should stop.
- */
- boolean fail() throws IllegalStateException;
-
- /**
- * Method executed on check success. If process should stop, returns true, false otherwise.
- *
- * @return False if the process should stop, true otherwise.
- * @throws IllegalStateException Exception thrown when check should stop.
- */
- boolean success() throws IllegalStateException;
-
- /**
- * Return the {@link IProcess} concerned by the check.
- *
- * @return The {@link IProcess} concerned by the check.
- */
- Optional getProcess();
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/inoutput/IInOutPut.java b/process/src/main/java/org/orbisgis/process/api/inoutput/IInOutPut.java
deleted file mode 100644
index 4692a486..00000000
--- a/process/src/main/java/org/orbisgis/process/api/inoutput/IInOutPut.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api.inoutput;
-
-import org.orbisgis.process.api.IProcess;
-
-import java.util.Optional;
-
-/**
- * This interface defines the methods dedicated the wrapping of input/output.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface IInOutPut {
-
- /**
- * Return the input/output name.
- *
- * @return The input/output name.
- */
- Optional getName();
-
- /**
- * Sets the name of the input/output.
- *
- * @param name Name of the input/output.
- */
- void setName(String name);
-
- /**
- * Sets the name of the input/output.
- *
- * @param name Name of the input/output.
- * @return Itself.
- */
- IInOutPut name(String name);
-
- /**
- * Return the {@link IProcess} of the input/output.
- *
- * @return The {@link IProcess} of the input/output.
- */
- Optional getProcess();
-
- /**
- * Sets the {@link IProcess} of the input/output.
- *
- * @param process The {@link IProcess} of the input/output.
- */
- void setProcess(IProcess process);
-
- /**
- * Sets the {@link IProcess} of the input/output.
- *
- * @param process The {@link IProcess} of the input/output.
- * @return Itself.
- */
- IInOutPut process(IProcess process);
-
- /**
- * Return the type of the input/output.
- *
- * @return The type of the input/output.
- */
- Optional> getType();
-
- /**
- * Sets the type of the input/output.
- *
- * @param type The type of the input/output.
- */
- void setType(Class> type);
-
- /**
- * Sets the type of the input/output.
- *
- * @param type The type of the input/output.
- * @return Itself.
- */
- IInOutPut type(Class> type);
-
- /**
- * Return the title or the input/output.
- *
- * @return The title of the input/output.
- */
- Optional getTitle();
-
- /**
- * Sets the title of the input/output.
- *
- * @param title The title of the input/output.
- */
- void setTitle(String title);
-
- /**
- * Sets the title of the input/output.
- *
- * @param title The title of the input/output.
- * @return Itself.
- */
- IInOutPut title(String title);
-
- /**
- * Return the description of the input/output.
- *
- * @return The description of the input/output.
- */
- Optional getDescription();
-
- /**
- * Sets the description of the input/output.
- *
- * @param description The description of the input/output.
- */
- void setDescription(String description);
-
- /**
- * Sets the description of the input/output.
- *
- * @param description The description of the input/output.
- * @return Itself.
- */
- IInOutPut description(String description);
-
- /**
- * Return the keywords of the input/output.
- *
- * @return The keywords of the input/output.
- */
- Optional getKeywords();
-
- /**
- * Sets the keywords of the input/output.
- *
- * @param keywords The keywords of the input/output.
- */
- void setKeywords(String[] keywords);
-
- /**
- * Sets the keywords of the input/output.
- *
- * @param keywords The keywords of the input/output.
- * @return Itself.
- */
- IInOutPut keywords(String[] keywords);
-
- /**
- * Returns a copy the the current object.
- *
- * @return A copy of the current object.
- */
- IInOutPut copy();
-}
diff --git a/process/src/main/java/org/orbisgis/process/api/inoutput/IInput.java b/process/src/main/java/org/orbisgis/process/api/inoutput/IInput.java
deleted file mode 100644
index 37b889b0..00000000
--- a/process/src/main/java/org/orbisgis/process/api/inoutput/IInput.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Bundle Process is part of the OrbisGIS platform
- *
- * OrbisGIS is a java GIS application dedicated to research in GIScience.
- * OrbisGIS is developed by the GIS group of the DECIDE team of the
- * Lab-STICC CNRS laboratory, see .
- *
- * The GIS group of the DECIDE team is located at :
- *
- * Laboratoire Lab-STICC – CNRS UMR 6285
- * Equipe DECIDE
- * UNIVERSITÉ DE BRETAGNE-SUD
- * Institut Universitaire de Technologie de Vannes
- * 8, Rue Montaigne - BP 561 56017 Vannes Cedex
- *
- * Process is distributed under LGPL 3 license.
- *
- * Copyright (C) 2018 CNRS (Lab-STICC UMR CNRS 6285)
- *
- *
- * Process 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.
- *
- * Process 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
- * Process. If not, see .
- *
- * For more information, please consult:
- * or contact directly:
- * info_at_ orbisgis.org
- */
-package org.orbisgis.process.api.inoutput;
-
-
-import java.util.Optional;
-
-/**
- * This interface defines the methods dedicated the wrapping of input.
- *
- * @author Erwan Bocher (CNRS)
- * @author Sylvain PALOMINOS (UBS Lab-STICC 2019-2020)
- */
-public interface IInput extends IInOutPut {
-
- /**
- * Make the {@link IInput} optional.
- *
- * @param dfltValue Default value to use if no value is provided.
- * @return The {@link IInput} to continue its configuration.
- */
- IInOutPut optional(Object dfltValue);
-
- /**
- * Return true if the input is optional, false otherwise.
- *
- * @return True if the input is optional, false otherwise.
- */
- boolean isOptional();
-
- /**
- * Make the {@link IInput} mandatory.
- *
- * @return The {@link IInput} to continue its configuration.
- */
- IInOutPut mandatory();
-
- /**
- * Return true if the input is mandatory, false otherwise.
- *
- * @return True if the input is mandatory, false otherwise.
- */
- boolean isMandatory();
-
- /**
- * Return the default value of the input. If mandatory, return null.
- *
- * @return The default value of the input.
- */
- Optional