validator.validations.rules_general

OntoUML Validation Utilities.

This module provides utility functions for validating input parameters and assumptions related to the OntoUML validation process. It includes functions for validating input file extensions to ensure compatibility with RDFLib’s supported formats and for normalizing and validating world assumptions.

Module Contents

Functions

execute_rule_switch(ontouml_model, rule_code)

Select a specific validation rule function based on the given 'rule_code' to be executed on the provided OntoUML model.

execute_all_validation_rules(ontouml_model)

Execute all validation rules and collect their results.

validator.validations.rules_general.execute_rule_switch(ontouml_model, rule_code)

Select a specific validation rule function based on the given ‘rule_code’ to be executed on the provided OntoUML model.

Parameters:
  • ontouml_model (Graph) – The OntoUML model in graph format (using the ontouml-vocabulary) to be validated by the rule.

  • rule_code (str) – Code of the specific rule to be executed.

Returns:

A tuple with two components: - A list of all warnings found during the specific rule’s validation process. - A list of all errors found during the specific rule’s validation process.

Return type:

tuple[list[ResultIssue], list[ResultIssue]]

validator.validations.rules_general.execute_all_validation_rules(ontouml_model)

Execute all validation rules and collect their results.

Parameters:

ontouml_model (Graph) – The OntoUML model in graph format (using the ontouml-vocabulary) to be validated.

Returns:

A tuple with two components: - A list of all warnings found during the validation process. - A list of all errors found during the validation process.

Return type:

tuple[list[str], list[str]]