/** * Parses the given morphlineFile, then finds the morphline with the given morphlineId within, * then compiles the morphline and returns the corresponding morphline command. The returned * command will feed records into finalChild. */ public Command compile(File morphlineFile, String morphlineId, MorphlineContext morphlineContext, Command finalChild, Config... overrides) { Config config; try { config = parse(morphlineFile, overrides); } catch (IOException e) { throw new MorphlineCompilationException("Cannot parse morphline file: " + morphlineFile, null, e); } Config morphlineConfig = find(morphlineId, config, morphlineFile.getPath()); Command morphlineCommand = compile(morphlineConfig, morphlineContext, finalChild); return morphlineCommand; }
/** * Parses the given morphlineFile, then finds the morphline with the given morphlineId within, * then compiles the morphline and returns the corresponding morphline command. The returned * command will feed records into finalChild. */ public Command compile(File morphlineFile, String morphlineId, MorphlineContext morphlineContext, Command finalChild, Config... overrides) { Config config; try { config = parse(morphlineFile, overrides); } catch (IOException e) { throw new MorphlineCompilationException("Cannot parse morphline file: " + morphlineFile, null, e); } Config morphlineConfig = find(morphlineId, config, morphlineFile.getPath()); Command morphlineCommand = compile(morphlineConfig, morphlineContext, finalChild); return morphlineCommand; }