@import org.silkframework.runtime.plugin.PluginDescription
@import org.silkframework.workspace.Project
@import org.silkframework.runtime.activity.UserContext
@import org.silkframework.runtime.plugin.PluginContext
@(name: String,
opType: String,
pluginGroup: org.silkframework.runtime.plugin.PluginFactory[_],
project: Project)(implicit userContext: UserContext)
@for(plugin <- pluginGroup.availablePlugins) {
@plugin.label
@plugin.label
@plugin.label
@operatorExpanded(plugin)
@plugin.description
}
@* Need to generate different IDs as for the main operators. Since the IDs are used for generating labels after dragging the operator in, we just add a _ *@
@operatorExpanded(plugin: PluginDescription[_]) = {
@opType match {
case "transform" => { @transformationBox(plugin.id + "_", plugin, parameterValues(plugin), 0, 0, false, project) }
case "compare" => { @comparisonBox(plugin.id + "_", 1, 0.0, plugin, parameterValues(plugin), 0, 0, false, project) }
case "aggregate" => { @aggregationBox(plugin.id + "_", 1, plugin, parameterValues(plugin), 0, 0, false, project) }
}
}
@parameterValues(plugin: PluginDescription[_]) = @{
implicit val prefixes = project.config.prefixes
for(p <- plugin.parameters) yield p.stringDefaultValue(PluginContext.empty).getOrElse("")
}