Source code for ontocode.template

# Copyright, 2018-2019, Deutsches Zentrum für Luft- und Raumfahrt e.V.
# Licensed under LGPLv3+, see LICENSE for details.
"""
Instances of :class:`ontocode.template.Template`\\´s subclasses represent
templates that are instantiated by the arguments provided by
:ref:`template inputs<template-inputs>`.
"""
import abc

__all__ = ['Template']


[docs]class Template(metaclass=abc.ABCMeta): """Abstract base class for templates."""
[docs] @abc.abstractmethod def render(self, *args, **kwargs): """Render the template. :param \\*args: ``*args`` as passed to an :class:`~ontocode.instantiation.Instantiation`\\´s :func:`~ontocode.instantiation.Instantiation.execute` method :param \\*\\*kwargs: combination of ``**kwargs`` as passed to an :class:`~ontocode.instantiation.Instantiation`\\´s :func:`~ontocode.instantiation.Instantiation.execute` method and the arguments generated by the :ref:`template inputs<template-inputs>` of that :class:`~ontocode.instantiation.Instantiation`. For more information consulte the section on :ref:`instantiations`. """