@@ -10,16 +10,67 @@ GraphFile::GraphFile(std::filesystem::path &path, const std::string source_db_ur
1010 this ->group = filename_parts.at (1 );
1111 this ->size_group = filename_parts.at (2 );
1212 this ->ordinal = filename_parts.at (3 );
13+ set_pair_characteristics ();
1314
1415 this ->set_target_filename (boost::algorithm::join (filename_parts, FileIO::UNDERSCORE).append (FileIO::CSV_EXTENSION));
1516 this ->set_target_absolute (this ->build_target_absolute ());
1617}
1718
1819const std::string GraphFile::build_target_absolute () const
1920{
20- std::string target_uri = this ->get_target_db_uri ();
21- return target_uri
21+ std::string base_uri = this ->get_target_db_uri ();
22+
23+ std::string target_path = base_uri
2224 .append (this ->get_relative ())
25+ .append (FileIO::UNIX_SEPARATOR)
26+ .append (this ->get_size_group ())
27+ .append (FileIO::UNIX_SEPARATOR)
28+ .append (this ->get_pair_id ());
29+
30+ this ->get_writer ().create_directories (target_path);
31+
32+ return target_path
2333 .append (FileIO::UNIX_SEPARATOR)
2434 .append (this ->get_target_filename ());
2535}
36+
37+ // getters
38+
39+ const std::string GraphFile::get_congruence () const
40+ {
41+ return this ->congruence ;
42+ }
43+
44+ const std::string GraphFile::get_group () const
45+ {
46+ return this ->group ;
47+ }
48+
49+ const std::string GraphFile::get_size_group () const
50+ {
51+ return this ->size_group ;
52+ }
53+
54+ const std::string GraphFile::get_ordinal () const
55+ {
56+ return this ->ordinal ;
57+ }
58+
59+ const std::string GraphFile::get_pair_label () const
60+ {
61+ return this ->pair_label ;
62+ }
63+
64+ const std::string GraphFile::get_pair_id () const
65+ {
66+ return this ->pair_id ;
67+ }
68+
69+ // private methods
70+
71+ void GraphFile::set_pair_characteristics ()
72+ {
73+ assert (this ->ordinal .length () == 3 );
74+ this ->pair_label = this ->ordinal .substr (0 ,1 );
75+ this ->pair_id = this ->ordinal .substr (1 );
76+ }
0 commit comments