SchemaValidator¶
- class SchemaValidator(hed_schema, error_handler)[source]
Validator class to wrap some code. In general, just call check_compliance.
Methods
|
|
Returns issues from validating known attributes in all sections |
|
Return issues for any duplicate names in all sections. |
|
Returns issues for bad chars in terms or descriptions. |
|
Attributes
- SchemaValidator.check_attributes()[source]¶
Returns issues from validating known attributes in all sections
- SchemaValidator.check_duplicate_names()[source]¶
Return issues for any duplicate names in all sections.
- SchemaValidator.check_invalid_chars()[source]¶
Returns issues for bad chars in terms or descriptions.
- SchemaValidator.attribute_validators = {'allowedCharacter': [<function allowed_characters_check>], 'conversionFactor': [<function conversion_factor>], 'defaultUnits': [], 'deprecatedFrom': [<function tag_is_deprecated_check>], 'inLibrary': [<function in_library_check>], 'relatedTag': [], 'suggestedTag': [], 'takesValue': [<function tag_is_placeholder_check>], 'unitClass': [<function tag_is_placeholder_check>], 'valueClass': [<function tag_is_placeholder_check>]}¶
- SchemaValidator.attribute_validators_old = {'allowedCharacter': [<function allowed_characters_check>], 'conversionFactor': [<function conversion_factor>], 'defaultUnits': [<function unit_exists>], 'deprecatedFrom': [<function tag_is_deprecated_check>], 'inLibrary': [<function in_library_check>], 'relatedTag': [functools.partial(<function item_exists_check>, section_key=<HedSectionKey.Tags: 'tags'>)], 'suggestedTag': [functools.partial(<function item_exists_check>, section_key=<HedSectionKey.Tags: 'tags'>)], 'takesValue': [<function tag_is_placeholder_check>], 'unitClass': [<function tag_is_placeholder_check>, functools.partial(<function item_exists_check>, section_key=<HedSectionKey.UnitClasses: 'unitClasses'>)], 'valueClass': [<function tag_is_placeholder_check>, functools.partial(<function item_exists_check>, section_key=<HedSectionKey.ValueClasses: 'valueClasses'>)]}¶