Behavior Execution Contexts

A behavior execution context encapsulates a service execution environment. In such an environment DL-inherent operations and type-inherent behavior schemes are composed to generate a result. For a high-level description of behavior execution contexts, please consult the behavior section in the Overview.

Behavior execution contexts are defined in the digital library scope. Each context definition provides its identifier along with the Interpreter used in this context. Interpreters contain the actual implementation of executing behavior schemes in this context.

XML Definition

This section describes the definition of the "velocity" behavior execution context that uses the Velocity Interpreter module.

<behaviorExecutionContexts>
    <context id="velocity" interpreter="net.dops_framework.modules.VelocityInterpreter">
        <param name="input.encoding" value="UTF-8"/>
        <param name="output.encoding" value="UTF-8"/>
        <param name="file.resource.loader.path" value="path to the location containing your velocity templates"/>
        <param name="file.resource.loader.cache" value="false"/>
        <param name="velocimacro.library" value="macros.vm"/>
        <param name="velocimacro.library.autoreload" value="true"/>
    </context>
</behaviorExecutionContexts>

The Velocity Interpreter uses the Apache Velocity template engine to generate HTML representations of digital objects. A behavior execution context is used to supply the enclosed interpreter with appropriate configuration parameters. Those who are familiar with Velocity may have already noticed that, in the "velocity" context definition, all configuration parameters refer to Velocity supported configuration options.

BECs (last edited 2007-03-30 12:31:11 by Kostas Saidis)

© 2005 - 2008 Kostas Saidis