@import org.silkframework.dataset.DatasetSpec.GenericDatasetSpec @import org.silkframework.rule.TransformSpec @import org.silkframework.workspace.WorkspaceFactory @import org.silkframework.runtime.activity.UserContext @import org.silkframework.rule.TransformSpec.TargetVocabularyParameterType @import org.silkframework.config.Prefixes @(project: String, task: String, createDialog: Boolean)(implicit userContext: UserContext) @datasets = @{ WorkspaceFactory().workspace.project(project).tasks[GenericDatasetSpec].toSeq } @transformationTask = @{ WorkspaceFactory().workspace.project(project).tasks[TransformSpec].find(_.id == task) } @currentInput = @{ transformationTask.map(_.data.selection) } @currentOutput = @{ transformationTask.flatMap(_.data.output) } @prefixes = @{ WorkspaceFactory().workspace.project(project).config.prefixes } @restrictionTooltip = @{ """Additional restrictions on the enumerated entities. |If this is an RDF source, use SPARQL patterns that include the variable ?a to identify the enumerated entities, e.g., |?a foaf:knows """.stripMargin } @widgets.dialog(title = "Transformation Task", createDialog = createDialog) {
@if(task.isEmpty) {
} @if(currentInput.isDefined) { @widgets.datasetSelect(project, "source", Some(currentInput.get.inputId)) } else { @widgets.datasetSelect(project, "source", None) }
The type of entities to be retrieved from the source dataset.
@widgets.multilineParameter("source", currentInput.map(_.restriction.serialize).getOrElse(""), label = "Source Restriction", tooltip = restrictionTooltip) @if(currentOutput.isDefined) { @widgets.datasetSelect(project, "output", Some(currentOutput.get)) } else { @widgets.datasetSelect(project, "output", None) } @widgets.multilineParameter("target_vocabularies", transformationTask.map(t => TargetVocabularyParameterType.toString(t.targetVocabularies)).getOrElse(""), label = "Target Vocabularies", tooltip = "Comma-separated list of target vocabularies.")
}