45 class ControlledVocabulary;
140 void startElement(
const XMLCh *
const ,
const XMLCh *
const ,
const XMLCh *
const qname,
const xercesc::Attributes & attributes)
override;
143 void endElement(
const XMLCh *
const ,
const XMLCh *
const ,
const XMLCh *
const qname)
override;
146 void characters(
const XMLCh *
const chars,
const XMLSize_t )
override;
Representation of controlled vocabulary mapping rules (for PSI formats)
Definition: CVMappings.h:57
Representation of a controlled vocabulary.
Definition: ControlledVocabulary.h:55
Semantically validates XML files using CVMappings and a ControlledVocabulary.
Definition: SemanticValidator.h:58
bool check_term_value_types_
Definition: SemanticValidator.h:193
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:80
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:165
String name_att_
Definition: SemanticValidator.h:189
String value
Definition: SemanticValidator.h:76
String unit_name_att_
Definition: SemanticValidator.h:192
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:191
String unit_accession
Definition: SemanticValidator.h:78
bool has_unit_name
Definition: SemanticValidator.h:81
StringList warnings_
Validation warnings.
Definition: SemanticValidator.h:171
void setUnitAccessionAttribute(const String &accession)
Sets the name of the unit accession attribute (default: 'unitAccession')
String cv_tag_
Definition: SemanticValidator.h:187
StringList errors_
Validation errors.
Definition: SemanticValidator.h:168
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:174
String name
Definition: SemanticValidator.h:75
bool has_value
Definition: SemanticValidator.h:77
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:74
SemanticValidator()
Not implemented.
SemanticValidator & operator=(const SemanticValidator &rhs)
Not implemented.
bool check_units_
Definition: SemanticValidator.h:194
Map< String, Map< String, Map< String, UInt > > > fulfilled_
Definition: SemanticValidator.h:182
void characters(const XMLCh *const chars, const XMLSize_t) override
bool has_unit_accession
Definition: SemanticValidator.h:79
Map< String, std::vector< CVMappingRule > > rules_
Rules (location => rule)
Definition: SemanticValidator.h:177
void endElement(const XMLCh *const, const XMLCh *const, const XMLCh *const qname) override
String value_att_
Definition: SemanticValidator.h:190
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:162
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:188
Representation of a parsed CV term.
Definition: SemanticValidator.h:73
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:49
Base class for XML handlers.
Definition: XMLHandler.h:327
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:52
A more convenient string class.
Definition: String.h:61
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47