| 87 | } |
| 88 | |
| 89 | bool SemanticValidator::validate(const String& filename, StringList& errors, StringList& warnings) |
| 90 | { |
| 91 | //TODO Check if all required CVs are loaded => exception if not |
| 92 | |
| 93 | //try to open file |
| 94 | if (!File::exists(filename)) |
| 95 | { |
| 96 | throw Exception::FileNotFound(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, filename); |
| 97 | } |
| 98 | |
| 99 | //initialize |
| 100 | errors_.clear(); |
| 101 | warnings_.clear(); |
| 102 | |
| 103 | //parse |
| 104 | file_ = filename; |
| 105 | parse_(filename, this); |
| 106 | |
| 107 | //set output |
| 108 | errors = errors_; |
| 109 | warnings = warnings_; |
| 110 | |
| 111 | return errors_.empty(); |
| 112 | } |
| 113 | |
| 114 | void SemanticValidator::startElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname, const Attributes& attributes) |
| 115 | { |
no test coverage detected