@Override public void createFlow(String entityName, String flowName,
FlowType flowType, CodeFormat codeFormat,
DataFormat dataFormat, boolean useEsModel, String mappingNameWithVersion) {
try {
Path flowDir = getFlowDir(entityName, flowName, flowType);
flowDir.toFile().mkdirs();
if (useEsModel) {
ContentPlugin cp = new ContentPlugin(hubConfig.newStagingClient());
String content = cp.getContents(entityName, codeFormat, flowType, mappingNameWithVersion);
writeBuffer(content, flowDir.resolve("content." + codeFormat));
} else {
writeFile("scaffolding/" + flowType + "/" + codeFormat + "/content." + codeFormat,
flowDir.resolve("content." + codeFormat));
}
if (flowType.equals(FlowType.HARMONIZE)) {
writeFile("scaffolding/" + flowType + "/" + codeFormat + "/collector." + codeFormat,
flowDir.resolve("collector." + codeFormat));
writeFile("scaffolding/" + flowType + "/" + codeFormat + "/writer." + codeFormat,
flowDir.resolve("writer." + codeFormat));
}
writeFile("scaffolding/" + flowType + "/" + codeFormat + "/headers." + codeFormat,
flowDir.resolve("headers." + codeFormat));
writeFile("scaffolding/" + flowType + "/" + codeFormat + "/triples." + codeFormat,
flowDir.resolve("triples." + codeFormat));