@SuppressWarnings("UnusedDeclaration") public static final int convertNameToID(final String name){
  int id=-1;
  if ((name.contains("Indexed"))) {
    id=Indexed;
  }
 else   if ((name.contains("Separation"))) {
    id=Separation;
  }
 else   if (name.contains("DeviceN")) {
    id=DeviceN;
  }
 else   if (name.contains("DeviceCMYK") || name.contains("CMYK")) {
    id=DeviceCMYK;
  }
 else   if (name.contains("CalGray")) {
    id=CalGray;
  }
 else   if (name.contains("CalRGB")) {
    id=CalRGB;
  }
 else   if (name.contains("Lab")) {
    id=Lab;
  }
 else   if (name.contains("ICCBased")) {
    id=ICC;
  }
 else   if (name.contains("Pattern")) {
    id=Pattern;
  }
 else   if (name.contains("DeviceRGB") || name.contains("RGB")) {
    id=DeviceRGB;
  }
 else   if (name.contains("DeviceGray") || name.indexOf('G') != -1) {
    id=DeviceGray;
  }
  return id;
}

@ SuppressWarnings ( "UnusedDeclaration" ) public static final int convertNameToID ( final String name ) { int id = - 1 ; if ( ( name . contains ( "Indexed" ) ) ) { id = Indexed ; } else if ( ( name . contains ( "Separation" ) ) ) { id = Separation ; } else if ( name . contains ( "DeviceN" ) ) { id = DeviceN ; } else if ( name . contains ( "DeviceCMYK" ) || name . contains ( "CMYK" ) ) { id = DeviceCMYK ; } else if ( name . contains ( "CalGray" ) ) { id = CalGray ; } else if ( name . contains ( "CalRGB" ) ) { id = CalRGB ; } else if ( name . contains ( "Lab" ) ) { id = Lab ; } else if ( name . contains ( "ICCBased" ) ) { id = ICC ; } else if ( name . contains ( "Pattern" ) ) { id = Pattern ; } else if ( name . contains ( "DeviceRGB" ) || name . contains ( "RGB" ) ) { id = DeviceRGB ; } else if ( name . contains ( "DeviceGray" ) || name . indexOf ( 'G' ) != - 1 ) { id = DeviceGray ; } return id ; }
method to convert a name to an id values
