package org.ihtsdo.buildcloud.service.build.transform;

/**
 * Replace a field value when another field contains null or empty value.
 *
 */
public class ReplaceInferredRelationshipModuleIdTransformation implements LineTransformation {
	private int checkColumn;
	private int column;
	private String value;

	public ReplaceInferredRelationshipModuleIdTransformation(int checkColumn, int column, String value) {
		this.checkColumn = checkColumn;
		this.column = column;
		this.value = value;
	}

	@Override
	public void transformLine(String[] columnValues) throws TransformationException {
		if (columnValues != null && columnValues.length > column && columnValues.length > checkColumn) {
			if (columnValues[checkColumn] == null || columnValues[checkColumn].isEmpty()) {
				columnValues[column] = value;
			} 
		}
	}

	@Override
	public int getColumnIndex() {
		return column;
	}

}

@@ -229,16 +229,60 @@
 ation %7B%0A
+%09private static final String NULL = %22null%22;%0A
 %09private
@@ -803,16 +803,58 @@
 sEmpty()
+ %7C%7C NULL.equals(columnValues%5BcheckColumn%5D)
 ) %7B%0A%09%09%09%09

Fix extension classification issue