:py:mod:`validator.modules.utils_validations` ============================================= .. py:module:: validator.modules.utils_validations .. autoapi-nested-parse:: OntoUML Input Validation and Assumption Normalization Module. This module contains utility functions for validating input parameters and assumptions used in OntoUML validation processes. These utility functions are designed to ensure the correctness of input data and assumptions, contributing to the reliability of the OntoUML validation process. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: validator.modules.utils_validations.validate_input_extension validator.modules.utils_validations.validate_assumption .. py:function:: validate_input_extension(input_extension) Validate the input file format provided by a user for ensuring RDFLib-compatible graph. This function validates the file extension of the input OntoUML model to ensure it is compatible with supported formats. It checks against a predefined list of RDFLib's allowed graph and JSON formats and raises an error if the provided input extension is invalid. :param input_extension: Path to the input file to be validated. :type input_extension: str .. py:function:: validate_assumption(world_assumption) Validate and normalize a world-assumption parameter. This function takes a `world_assumption` parameter, converts it to lowercase, and removes leading and trailing whitespace. It then checks if the normalized assumption is either "owa" (Open World Assumption) or "cwa" (Closed World Assumption). If it is, the value is returned. If not, an error is raised by a specific function. :param world_assumption: The world assumption to be validated and normalized. :type world_assumption: str :return: The validated and normalized world assumption ("owa" or "cwa"). :rtype: str