def on_start(self, ctx):
        """Event handler for the parsing start event.

        :param ctx: Generation context information.
        :type ctx: pyesdoc_mp.generators.generator.GeneratorContext

        """
        self.output_dir = get_ontology_directory(ctx, 'validation')
    def on_ontology_parse(self, ctx):
        """Event handler for the ontology parse event.

        :param ctx: Generation context information.
        :type ctx: pyesdoc_mp.generators.generator.GeneratorContext

        """
        # Helper functions.
        def emit_imports():
            return self.emit_imports_for_root_package(ctx)

        code = self.emit_package_init_file(ctx, _TEMPLATE_PACKAGE, emit_imports)
        dir = get_ontology_directory(ctx, 'types')
        file = get_package_init_file_name()

        return (code, dir, file)
 def get_code(template, include_version):
     return (get_template(ctx, template), \
             get_ontology_directory(ctx, include_version=include_version), \
             get_package_init_file_name())