SemanticValidator

class pyopenms.SemanticValidator

Bases: object

Cython implementation of _SemanticValidator

Original C++ documentation is available here

__init__(self, mapping: CVMappings, cv: ControlledVocabulary) None

Methods

__init__(self, mapping, cv)

locateTerm(self, path, parsed_term)

Checks if a CVTerm is allowed in a given path

setAccessionAttribute(self, accession)

Sets the name of the attribute for accessions in the CV parameter tag name (default 'accession')

setCheckTermValueTypes(self, check)

Sets if CV term value types should be check (enabled by default)

setCheckUnits(self, check)

Sets if CV term units should be check (disabled by default)

setNameAttribute(self, name)

Sets the name of the attribute for accessions in the CV parameter tag name (default 'name')

setTag(self, tag)

Sets the CV parameter tag name (default 'cvParam')

setUnitAccessionAttribute(self, accession)

Sets the name of the unit accession attribute (default 'unitAccession')

setUnitNameAttribute(self, name)

Sets the name of the unit name attribute (default 'unitName')

setValueAttribute(self, value)

Sets the name of the attribute for accessions in the CV parameter tag name (default 'value')

validate(self, filename, errors, warnings)

locateTerm(self, path: Union[bytes, str, String], parsed_term: SemanticValidator_CVTerm) bool

Checks if a CVTerm is allowed in a given path

setAccessionAttribute(self, accession: Union[bytes, str, String]) None

Sets the name of the attribute for accessions in the CV parameter tag name (default ‘accession’)

setCheckTermValueTypes(self, check: bool) None

Sets if CV term value types should be check (enabled by default)

setCheckUnits(self, check: bool) None

Sets if CV term units should be check (disabled by default)

setNameAttribute(self, name: Union[bytes, str, String]) None

Sets the name of the attribute for accessions in the CV parameter tag name (default ‘name’)

setTag(self, tag: Union[bytes, str, String]) None

Sets the CV parameter tag name (default ‘cvParam’)

setUnitAccessionAttribute(self, accession: Union[bytes, str, String]) None

Sets the name of the unit accession attribute (default ‘unitAccession’)

setUnitNameAttribute(self, name: Union[bytes, str, String]) None

Sets the name of the unit name attribute (default ‘unitName’)

setValueAttribute(self, value: Union[bytes, str, String]) None

Sets the name of the attribute for accessions in the CV parameter tag name (default ‘value’)

validate(self, filename: Union[bytes, str, String], errors: List[bytes], warnings: List[bytes]) bool