class BooleanConverter implements AtlasConverter<Boolean> {

    @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.STRING, concerns = {
            AtlasConversionConcern.CONVENTION })
    public String toString(Boolean value, String sourceFormat, String targetFormat) {
        if (value == null) {
            return null;
        }
        // TODO optimize/save defaults
        String format = targetFormat != null && !"".equals(targetFormat) ? targetFormat : STRING_VALUES;
        String[] values = format.split("\\|");
        String trueValue = "";
        String falseValue = "";
        if (values.length == 2) {
            trueValue = values[0];
            falseValue = values[1];
        } else if (values.length == 1) {
            trueValue = values[0];
        }
        return String.valueOf((value ? trueValue : falseValue));
    }

}