1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use super::file::Project;

impl Project {
    fn new(i: Project) -> Self {
        Self { ..i }
    }

    fn validate(&self) -> bool {
        let Project {
            project_id,
            associated_projects,
            dataset_prepare,
            filplus_guideline,
            dataset_life_span,
            geographis,
            retrival_frequency,
            previous_stoarge,
            public_dataset,
            providers,
            data_sample_link,
            stored_data_desc,
            distribution,
            history,
        } = self;
        project_id.len() > 0
            && associated_projects.len() > 0
            && dataset_prepare.len() > 0
            && filplus_guideline.len() > 0
            && dataset_life_span.len() > 0
            && geographis.len() > 0
            && retrival_frequency.len() > 0
            && previous_stoarge.len() > 0
            && public_dataset.len() > 0
            && providers.len() > 0
            && data_sample_link.len() > 0
            && stored_data_desc.len() > 0
            && distribution.len() > 0
            && history.len() > 0
    }
}