Skip to content

[Workbench] Configuration Files for Dynamic Class Template Selection

Tom Wong edited this page Feb 28, 2017 · 6 revisions

To support the dynamic class template selection in the Workbench, two XML Configuration files were created.

  1. BaseTemplateConfig.xml

BaseTemplateConfig.xml stores the information of the base template, which is the container for all the parameter classes. A sample BaseTemplateConfig.xml is shown below.


<?xml version="1.0" encoding="UTF-8"?> <BaseTemplateConfig templatePath="BaseTemplates/BaseTemplateDefault.xml" allParamsClassesConfigFilePath="ParamsClassTemplateConfig/AllParamsClasses.xml"> <ParamsClassesType name = "NeuronsParamsClasses" nodePath="/BGSimParams/ModelParams/NeuronsParams"/> <ParamsClassesType name = "SynapsesParamsClasses" nodePath="/BGSimParams/ModelParams/SynapsesParams"/> <ParamsClassesType name = "ConnectionsParamsClasses" nodePath="/BGSimParams/ModelParams/ConnectionsParams"/> <ParamsClassesType name = "LayoutParamsClasses" nodePath="/BGSimParams/ModelParams/LayoutParams"/> </BaseTemplateConfig>


"BaseTemplateConfig" node is the root node. The "templatePath" attribute defines the relative path to the base template. The "allParamsClassesConfigFilePath" attribute stores the relative path to the parameter classes configuration file which contains all parameter class types, names and template file paths.

The subnode "ParamsClassesType" defines what parameter class types are in the base template. The "name" attribute is the name of the class type, which is also in the parameter classes configuration file. The "nodePath" attribute defines the node location in the base template file to place the param class template. The node location is defined by XPath(https://www.w3schools.com/xml/xml_xpath.asp).

  1. AllParamsClasses.xml

!!continue!!!

  1. templateDirectory: the directory to store all of the param class template files for a params class type
  2. ParamsClass:name: the name of the param class
  3. ParamsClass:templateFileName: name of the file in the templateDirecotory to store the param class template.

Clone this wiki locally