19 class ControlledVocabulary;
53 bool has_unit_accession{};
114 void startElement(
const XMLCh *
const ,
const XMLCh *
const ,
const XMLCh *
const qname,
const xercesc::Attributes & attributes)
override;
117 void endElement(
const XMLCh *
const ,
const XMLCh *
const ,
const XMLCh *
const qname)
override;
120 void characters(
const XMLCh *
const chars,
const XMLSize_t )
override;
151 std::map<String, std::vector<CVMappingRule> >
rules_;
156 std::map<String, std::map<String, std::map<String, UInt> > >
fulfilled_;
Representation of controlled vocabulary mapping rules (for PSI formats)
Definition: CVMappings.h:31
Definition: ControlledVocabulary.h:29
Semantically validates XML files using CVMappings and a ControlledVocabulary.
Definition: SemanticValidator.h:32
bool check_term_value_types_
Definition: SemanticValidator.h:167
virtual void getCVTerm_(const xercesc::Attributes &attributes, CVTerm &parsed_term)
Parses the CV term accession (required), name (required) and value (optional) from the XML attributes...
String unit_name
Definition: SemanticValidator.h:54
SemanticValidator(const SemanticValidator &rhs)
Not implemented.
SemanticValidator(const CVMappings &mapping, const ControlledVocabulary &cv)
Constructor.
void setUnitNameAttribute(const String &name)
Sets the name of the unit name attribute (default: 'unitName')
virtual void handleTerm_(const String &path, const CVTerm &parsed_term)
Handling of the term.
const ControlledVocabulary & cv_
Reference to the CVs.
Definition: SemanticValidator.h:139
String name_att_
Definition: SemanticValidator.h:163
String value
Definition: SemanticValidator.h:50
String unit_name_att_
Definition: SemanticValidator.h:166
void setValueAttribute(const String &value)
Sets the name of the attribute for accessions in the CV parameter tag name (default: 'value')
void setCheckUnits(bool check)
Set if CV term units should be check (disabled by default)
bool locateTerm(const String &path, const CVTerm &parsed_term) const
Checks if a CVTerm is allowed in a given path.
String unit_accession_att_
Definition: SemanticValidator.h:165
String unit_accession
Definition: SemanticValidator.h:52
StringList warnings_
Validation warnings.
Definition: SemanticValidator.h:145
std::map< String, std::map< String, std::map< String, UInt > > > fulfilled_
Definition: SemanticValidator.h:156
void setUnitAccessionAttribute(const String &accession)
Sets the name of the unit accession attribute (default: 'unitAccession')
String cv_tag_
Definition: SemanticValidator.h:161
StringList errors_
Validation errors.
Definition: SemanticValidator.h:142
void setCheckTermValueTypes(bool check)
Set if CV term value types should be check (enabled by default)
void setTag(const String &tag)
Sets the CV parameter tag name (default: 'cvParam')
StringList open_tags_
List of open tags.
Definition: SemanticValidator.h:148
String name
Definition: SemanticValidator.h:49
void startElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname, const xercesc::Attributes &attributes) override
bool validate(const String &filename, StringList &errors, StringList &warnings)
Semantically validates an XML file.
String accession
Definition: SemanticValidator.h:48
SemanticValidator()
Not implemented.
SemanticValidator & operator=(const SemanticValidator &rhs)
Not implemented.
bool check_units_
Definition: SemanticValidator.h:168
void characters(const XMLCh *const chars, const XMLSize_t) override
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
std::map< String, std::vector< CVMappingRule > > rules_
Rules (location => rule)
Definition: SemanticValidator.h:151
String value_att_
Definition: SemanticValidator.h:164
void setAccessionAttribute(const String &accession)
Sets the name of the attribute for accessions in the CV parameter tag name (default: 'accession')
virtual String getPath_(UInt remove_from_end=0) const
Returns the current element path.
const CVMappings & mapping_
Reference to the mappings.
Definition: SemanticValidator.h:136
void setNameAttribute(const String &name)
Sets the name of the attribute for accessions in the CV parameter tag name (default: 'name')
~SemanticValidator() override
Destructor.
String accession_att_
Definition: SemanticValidator.h:162
Representation of a parsed CV term.
Definition: SemanticValidator.h:47
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:23
Base class for XML handlers.
Definition: XMLHandler.h:302
A more convenient string class.
Definition: String.h:34
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:44
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19