def on_ontology_parse(self, ctx):
        """Event handler for the ontology parse event.

        :param GeneratorContext ctx: Generation context information.

        """
        ctx.code.append(
            (
                _emit_module_init(ctx.ontology),
                pgu.get_ontology_directory(ctx),
                pgu.get_module_file_name('decoder')
            )
        )
        ctx.code.append(
            (
                _TEMPLATES[_TEMPLATE_DECODER_XML_UTILS],
                pgu.get_ontology_directory(ctx),
                pgu.get_module_file_name('decoder_xml_utils')
            )
        )
    def on_package_parse(self, ctx):
        """Event handler for the package parse event.

        :param GeneratorContext ctx: Generation context information.

        """
        ctx.code.append(
            (
                ctx.get_code("extended_schema_for_package.tornado", pgu),
                pgu.get_ontology_directory(ctx),
                pgu.get_package_module_file_name(ctx.pkg, 'extended_schema')
            )
        )
    def on_package_parse(self, ctx):
        """Event handler for the package parse event.

        :param GeneratorContext ctx: Generation context information.

        """
        ctx.code.append(
            (
                _emit_module_typeset_for_pkg(ctx.ontology, ctx.pkg),
                pgu.get_ontology_directory(ctx),
                pgu.get_package_module_file_name(ctx.pkg, 'typeset')
            )
        )