public static String toMatchValue(Object value){
  if (value == null) {
    return null;
  }
 else   if (value instanceof String) {
    return (String)value;
  }
 else   if (value instanceof Boolean) {
    return toMatchValue((boolean)value);
  }
 else   if (value instanceof URI) {
    return toMatchValue((URI)value);
  }
 else   if (value instanceof Enum) {
    return toMatchValue((Enum<?>)value);
  }
 else {
    return value.toString();
  }
}

public static String toMatchValue ( Object value ) { if ( value == null ) { return null ; } else if ( value instanceof String ) { return ( String ) value ; } else if ( value instanceof Boolean ) { return toMatchValue ( ( boolean ) value ) ; } else if ( value instanceof URI ) { return toMatchValue ( ( URI ) value ) ; } else if ( value instanceof Enum ) { return toMatchValue ( ( Enum < ? > ) value ) ; } else { return value . toString ( ) ; } }
convert the given value to a normalized string representation that is used for both generating indexed values and query criteria used to match against those indexes .
