| 41 | } |
| 42 | |
| 43 | bool AnnotationService::saveRepositoryToFile(const std::string& source) { |
| 44 | if (source.rfind(std::string(".xml")) != source.npos) { |
| 45 | _repo = std::make_shared<XmlRepository>(_list); |
| 46 | _repo->setSource(source); |
| 47 | } |
| 48 | else if (source.rfind(std::string(".ndpa")) != source.npos) { |
| 49 | _repo = std::make_shared<NDPARepository>(_list); |
| 50 | _repo->setSource(source); |
| 51 | } |
| 52 | return _repo->save(); |
| 53 | } |
| 54 | |
| 55 | bool AnnotationService::load() { |
| 56 | if (_repo) { |
no test coverage detected