Skip to content
Snippets Groups Projects
Commit 6462395a authored by François Agneray's avatar François Agneray
Browse files

Update data management documentation

parent 206c9e74
No related branches found
No related tags found
No related merge requests found
Pipeline #9048 passed
......@@ -2,9 +2,9 @@
## Introduction
ANIS provides datasets extracted from databases.
ANIS allows to associate files (fits, png, xml, ...) to the datasets.
We will see here how to associate data with datasets.
ANIS provides scientific projects and for each project datasets extracted from databases.
ANIS allows to associate files (fits, png, xml, ...) to the projects and datasets.
We will see here how to associate data with projects and datasets.
## Server data path
......@@ -37,16 +37,45 @@ curl http://localhost:8080/admin-file-explorer/DEFAULT
![admin_file_explorer_default_directory](img/admin_file_explorer_default_directory.png)
## Instance data path
You can associate a data directory for each of your scientific projects.
The directory path will start from the data root directory of anis-server.
To configure the data path of a project you have to fill in the property `data_path` in the metamodel.
Example:
```bash
curl -d '{"name":"default","label":"Default instance","description":"Instance for the test","scientific_manager":"M. Durand","instrument":"Multiple","wavelength_domain":"Visible imaging / Spectroscopy","display":10,"data_path":"\/DEFAULT","files_path":"\/INSTANCE_FILES","public":true,"portal_logo":"","design_color":"#7AC29A","design_background_color":"#ffffff","design_logo":"/logo.png","design_favicon":"/favicon.ico","samp_enabled":true,"back_to_portal":true,"search_by_criteria_allowed":true,"search_by_criteria_label":"Search","search_multiple_allowed":false,"search_multiple_label":"Search multiple","search_multiple_all_datasets_selected":false,"documentation_allowed":false,"documentation_label":"Documentation"}' --header 'Content-Type: application/json' -X POST http://localhost/instance
```
You can also configure a directory for storing files related to the project : `files_path`.
The directory path will start from the data path directory of the project.
Files related to the project such as the logo, images will be stored in this directory.
## Instance files explorer
A user can list files or folders contained in the instance files path directory.
Please note that if the instace is private you will need to send a token to perform this action.
If you want to explore the files for default project directory type:
```bash
curl http://localhost:8080/instance/default/file-explorer
```
![instance_file_explorer_default_directory](img/instance_file_explorer_default_directory.png)
## Dataset data path
You can associate a data directory for each of your datasets.
The directory path will start from the data root directory of anis-server.
The directory path will start from the scientific project root directory (instance data_path).
To configure the data_path of a dataset you have to fill in the property in the metamodel.
Example:
```bash
curl -d '{"name":"vipers_dr2_w1","table_ref":"aspic_vipers_dr2_w1","label":"VIPERS-W1 (DR2)","description":"VIPERS W1 dataset","display":30,"count":1000,"vo":false,"data_path":"ASPIC/VIPERS_DR2","config":{"selectable_row":false},"public":true,"project_name":"anis_project"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset
curl -d '{"name":"vipers_dr2_w1","table_ref":"aspic_vipers_dr2_w1","label":"VIPERS-W1 (DR2)","description":"VIPERS W1 dataset","display":10,"data_path":"\/ASPIC\/VIPERS_DR2","public":true,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"server_link_enabled":false,"datatable_enabled":true,"datatable_selectable_rows":false,"id_database":1}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset
```
Here you can see that the data directory for this dataset is set to `/ASPIC/VIPERS_DR2`
......@@ -56,17 +85,24 @@ Here you can see that the data directory for this dataset is set to `/ASPIC/VIPE
A user can list files or folders contained in the dataset directory.
Please note that if the dataset is private you will need to send a token to perform this action.
Example:
```bash
curl http://localhost:8080/dataset-file-explorer/vipers_dr2_w1/spec1D
curl http://localhost:8080/dataset/vipers_dr2_w1/file-explorer
```
![dataset_file_explorer_spec1d_directory](img/dataset_file_explorer_spec1d_directory.png)
![dataset_file_explorer](img/dataset_file_explorer.png)
## Dataset file download
If you want explore the spec1d directory you can execute :
A user can download a file from the data directory of the dataset.
Please note that if the dataset is private you will need to send a token to perform this action.
```bash
curl http://localhost:8080/dataset/vipers_dr2_w1/file-explorer/spec1D
```
![dataset_file_explorer_spec1d_directory](img/dataset_file_explorer_spec1d_directory.png)
If a user want to download the file `VIPERS_101121877_bis.fits` you can execute :
```bash
wget http://localhost:8080/download-file/vipers_dr2_w1/spec1D/VIPERS_101121877_bis.fits
curl http://localhost:8080/dataset/vipers_dr2_w1/file-explorer/spec1D/VIPERS_101121877_bis.fits
```
docs/img/dataset_file_explorer.png

13.7 KiB

docs/img/instance_file_explorer_default_directory.png

15.1 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment