Newer
Older
# TEMPOGWT
Portail de données phénologiques TEMPO
## Goals
- Centralized access portal to phenological data held in various remote databases.
- Filtering among the data.
- User account handling many identity providers, providing history by user.
- Remote database private/public status handling and access request.
## Development
**1. Database**
Database access identifiers are written to the XML file `tempogwt/src/main/config/<MAVEN_PROFILE>/persistence.xml`.
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
To create the application database :
- create a user for the application:
```
$ sudo su postgres
$ psql
postgres=# CREATE USER tempo WITH PASSWORD 'tempo';
```
- create the application database :
```
postgres=# CREATE DATABASE tempo WITH OWNER = tempo ENCODING = 'UTF8' LC_COLLATE = 'fr_FR.UTF-8' LC_CTYPE = 'fr_FR.UTF-8';
```
- quit psql with `\q`
- give login rights to user `tempo` :
```
$ sudo vi /etc/postgresql/<postgresql version>/main/pg_hba.conf
$ sudo /etc/init.d/postgresql reload
```
- create the schema by executing the SQL script `Create_Tempo_DB.sql` in the `sql/` folder, using the `tempo` user, in the following order:
0. `$ psql -U tempo -h localhost` (login as command-line user *tempo*)
1. `Create_Tempo_DB.sql` for application schema
**2. Adding the project to an IDE**
Currently, Eclipse (refers to *Eclipse IDE for JavaEE Developers*) is the mainly (only) IDE used to develop tempogwt.
* Import the project.
* Define the Maven profile to be executed by clicking on the `tempogwt` project menu: `Maven > Select Maven Profiles... (Ctrl+Alt+P)`.
This choice of profile will allow to use one of the configurations defined in `tempogwt/src/main/config/`. To create a new one, add it in `pom.xml` and copy and paste an existing development profile, then modify it with the new values.
Necessary or useful extensions
- Eclipse Checkstyle plug-in
- GWT Plugin or a GWT SDK
- Lombok (installed from https://projectlombok.org/)
- Eclipse m2e
- Subversive SVN Connectors
- Subversive SVN Integration for the M2E Project
**3. Code quality**
Code is written in English: class names, methods, properties, JavaDoc documentation. Ancillary documentation is written in French, located in `/src/site/markdown/` as far as possible in text files (MarkDown, PlantUML for example). Documentation is generated by Maven with the `mvn site` command.
All classes, class methods and class properties must be documented as soon as they are designed, and updated each time they are modified.
## Usage
**1. Installation on a server**
* create an empty PostgreSQL database with the `persistence.xml` identifiers
* execute the `Create_Tempo_DB.sql` script
* register the application on any identity provider, and enter the specific information in a row of the database's oidcidp table
* add datasources to the `datasource` table
**2. OpenID Connect**
TEMPO interacts with any identity provider that respects the specifications of OpenID Connect to return a given name, family name, an uid and optionally an email address.
To register a new OpenID Connect Identity Provider (OIDCIDP), tempogwt must be registered on the website of the IDP. Then, add in oidcidp table the following :
a name and a logo to display, an ID that will define the order in which the IDPs are displayed,
an url, an [issuer url](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/oidc) (without the /.well-known/openid-configuration following),
a client ID and client secret as filled when registered.
**3. Adding a new datasource**
From SIDO :
* In the SIDO database
- Add IDs to the OauthClient table.
- The same IDs are declared in config.properties.
* In the TEMPO database, add a datasource with the sidohandler.class and enter random CSVs as columns descriptions (will be updated on the first sync, if the datasource possess data).
From elsewhere :
* Create or adapt a specific datasource client and a data handler
* In the TEMPO database, add a datasource with the newly added handler's class and enter CSVs as columns descriptions as previoulsy.
**4. Further documentation**
[Manual (in French)](src/site/markdown/index.md)
## Authors
See [`AUTHORS.md`](AUTHORS.md) file.
## Intellectual property
The app source code is under the GPL 3.0 licence, as described in [`LICENSE`](LICENSE) file.
All trademarks and logos on the site are the property of the site editor or its partners, except in specific cases. You may not reuse them without prior written authorization, except to refer to this site or its partners.
## Project status
Deployed at [https://data.pheno.fr/](https://data.pheno.fr/).