| 37 | } |
| 38 | |
| 39 | bool TraMLFile::isSemanticallyValid(const String & filename, StringList & errors, StringList & warnings) |
| 40 | { |
| 41 | //load mapping |
| 42 | CVMappings mapping; |
| 43 | CVMappingFile().load(File::find("/MAPPING/TraML-mapping.xml"), mapping); |
| 44 | |
| 45 | //load cvs |
| 46 | ControlledVocabulary cv; |
| 47 | cv.loadFromOBO("MS", File::find("/CV/psi-ms.obo")); |
| 48 | cv.loadFromOBO("UO", File::find("/CV/unit.obo")); |
| 49 | |
| 50 | //validate |
| 51 | Internal::TraMLValidator v(mapping, cv); |
| 52 | bool result = v.validate(filename, errors, warnings); |
| 53 | |
| 54 | return result; |
| 55 | } |
| 56 | |
| 57 | } // namespace OpenMS |
| 58 |
nothing calls this directly
no test coverage detected