fplus_lib/core/application/
project.rs

1use super::file::Project;
2
3impl Project {
4    fn new(i: Project) -> Self {
5        Self { ..i }
6    }
7
8    fn validate(&self) -> bool {
9        let Project {
10            project_id,
11            associated_projects,
12            dataset_prepare,
13            filplus_guideline,
14            dataset_life_span,
15            geographis,
16            retrival_frequency,
17            previous_stoarge,
18            public_dataset,
19            providers,
20            data_sample_link,
21            stored_data_desc,
22            distribution,
23            history,
24        } = self;
25        project_id.len() > 0
26            && associated_projects.len() > 0
27            && dataset_prepare.len() > 0
28            && filplus_guideline.len() > 0
29            && dataset_life_span.len() > 0
30            && geographis.len() > 0
31            && retrival_frequency.len() > 0
32            && previous_stoarge.len() > 0
33            && public_dataset.len() > 0
34            && providers.len() > 0
35            && data_sample_link.len() > 0
36            && stored_data_desc.len() > 0
37            && distribution.len() > 0
38            && history.len() > 0
39    }
40}