How to use the cwlts/models/generic/CommandLineToolFactory.CommandLineToolFactory.from function in cwlts

To help you get started, we’ve selected a few cwlts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rabix / composer / src / app / tool-editor / tool-editor.component.ts View on Github external
protected recreateModel(json: Object): void {

        this.dataModel = CommandLineToolFactory.from(json as any, "document");
        if (!this.dataModel.namespaces.has("sbg")) {
            this.dataModel.namespaces.set("sbg", "https://www.sevenbridges.com/");
        }

        this.dataModel.onCommandLineResult(cmdResult => {
            this.commandLineParts.next(cmdResult);
        });


        this.dataModel.updateCommandLine();
        this.dataModel.setValidationCallback(this.afterModelValidation.bind(this));
        this.dataModel.validate().then(this.afterModelValidation.bind(this));
    }