import { CWLVersion } from "../../mappings/v1.0/CWLVersion"; import { NamespaceBag } from "../elements/namespace-bag"; import { CommandLinePart } from "../helpers/CommandLinePart"; import { EventHub } from "../helpers/EventHub"; import { ValidationBase } from "../helpers/validation/ValidationBase"; import { Serializable } from "../interfaces/Serializable"; import { CommandArgumentModel } from "./CommandArgumentModel"; import { CommandInputParameterModel } from "./CommandInputParameterModel"; import { CommandOutputParameterModel } from "./CommandOutputParameterModel"; import { CreateFileRequirementModel } from "./CreateFileRequirementModel"; import { DockerRequirementModel } from "./DockerRequirementModel"; import { ExpressionModel } from "./ExpressionModel"; import { ProcessRequirement } from "./ProcessRequirement"; import { ProcessRequirementModel } from "./ProcessRequirementModel"; import { RequirementBaseModel } from "./RequirementBaseModel"; import { ResourceRequirementModel } from "./ResourceRequirementModel"; import { EnvironmentDefModel, EnvVarRequirementModel } from "./EnvVarRequirementModel"; import { EnvironmentDef } from "../../mappings/v1.0"; export declare abstract class CommandLineToolModel extends ValidationBase implements Serializable { id: string; cwlVersion: string | CWLVersion; "class": string; sbgId: string; label?: string; description?: string; namespaces: NamespaceBag; baseCommand: Array; inputs: CommandInputParameterModel[]; outputs: CommandOutputParameterModel[]; arguments: CommandArgumentModel[]; docker: DockerRequirementModel; requirements: Array; hints: Array; stdin: ExpressionModel; stdout: ExpressionModel; stderr: ExpressionModel; successCodes: number[]; temporaryFailCodes: number[]; permanentFailCodes: number[]; fileRequirement: CreateFileRequirementModel; resources: ResourceRequirementModel; envVars: EnvVarRequirementModel; /** Set of all expressions the tool contains */ private expressions; /** Array of all validation processes that are currently occurring */ private validationPromises; /** Dummy job.inputs value to be used in command line generation */ protected jobInputs: any; /** Dummy job.runtime value to be used in command line generation */ protected runtime: any; /** Flag to indicate that the tool has finished deserializing */ protected constructed: boolean; /** Flag to indicate that tool has stdErr field */ hasStdErr: boolean; /** Custom properties that weren't serialized */ customProps: any; /** EventHub that is passed to all children of the tool, * used for upward communication in the tool tree */ eventHub: EventHub; /** Function which is called when the command line is changed */ protected commandLineWatcher: Function; constructor(loc: string); setJobInputs(inputs: any): void; abstract setRuntime(runtime: any): void; abstract getContext(input?: any): any; abstract resetJobDefaults(): void; on(event: string, handler: any): { dispose: Function; }; off(event: string, handler: any): void; protected initializeJobWatchers(): void; protected initializeExprWatchers(): void; protected validateExpression(expression: ExpressionModel): Promise; protected validateAllExpressions(): void; protected findFieldRoot(port: any, base: any): any; protected findFieldParent(loc: string): CommandOutputParameterModel | CommandOutputParameterModel; changeIOId(port: CommandInputParameterModel | CommandOutputParameterModel, id: string): void; addHint(hint?: ProcessRequirement | any): RequirementBaseModel; updateStream(stream: ExpressionModel, type: "stderr" | "stdin" | "stdout"): void; _addOutput(outputConstructor: any, output?: { id: any; }): any; addOutput(output?: any): CommandOutputParameterModel; removeOutput(output: CommandOutputParameterModel): void; protected _addInput(inputConstructor: any, input?: { id: any; }): any; addInput(input?: any): CommandInputParameterModel; removeInput(input: CommandInputParameterModel): void; addArgument(arg?: any): CommandArgumentModel; removeArgument(arg: CommandArgumentModel): void; addBaseCommand(cmd?: any): ExpressionModel | void; setRequirement(req: ProcessRequirement, hint?: boolean): void; updateCommandLine(): void; onCommandLineResult(fn: Function): void; generateCommandLine(): Promise; generateCommandLineParts(): Promise; addEnvVariable(envDef: EnvironmentDefModel): void; abstract createEnvVariable(env: EnvironmentDef, valueType?: "expression" | "string"): EnvironmentDefModel; abstract serialize(): any; abstract deserialize(attr: any): void; validate(): Promise; }