mivot_validator package

Subpackages

Submodules

mivot_validator.annotated_votable_validator module

Created on 2022/07/01

@author: laurentmichel

class mivot_validator.annotated_votable_validator.AnnotatedVOTableValidator[source]

Bases: object

Validate tool for annotated VOTable Operate 2 separate validations - One for the VOTable - One for the MIVOT annotations

See the mivot_launcher to get how to use it

defaut_votable_schema = 'http://www.ivoa.net/xml/VOTable/v1.3'
validate(data_path)[source]

Validate the content of data_path. If data_path is a directory, all its direct content is evaluated and the method returns false at the first XML file not validating :param data_path: file or directory path to be evaluated :type data_path: string :return: true all files validate :rtype: boolean

validate_mivot(file_path)[source]

Validate MIVOT block in one XML file. :param file_path: file to be evaluated :type file_path: string :return: true all files validate :rtype: boolean

vodml_validator = <mivot_validator.xml_validator.XMLValidator object>
votable_validator = None

mivot_validator.dmtypes_and_role_checker module

Created on 2 Feb 2023

@author: laurentmichel

class mivot_validator.dmtypes_and_role_checker.DmTypesAndRolesChecker(session)[source]

Bases: object

This module checks that all dmroles and dmtypes used a referenced in the mapped models This is a prototype - Only meas/coord/ivoa are checked, the other models are ignored - The checking is based on the vodml-id whatever their context in the vodml files

all errors are reported in the self.message list. The validation is considered as successful if the message list is empty at the end of the process

validate(file_path)[source]

Validate that all dmroles and types found in the mapping block are part of the declared models. the method returns false if at least one error message has been collected :param file_path: file path to be evaluated :type file_path: string :return: true if the file is valid :rtype: boolean

mivot_validator.xml_validator module

Created on 2021/07/01

@author: laurentmichel

class mivot_validator.xml_validator.XMLValidator(xsd_path)[source]

Bases: object

Convenient wrapper for the xmlschema validator TODO: managing the verbosity

validate_file(xml_path: str, verbose=False) bool[source]

Validate one file

validate_string(xml_string: str, verbose=False) bool[source]

Validate one XML string

Module contents