private String extractLanguage(String columnHeading) throws ParseException {
    int start = columnHeading.indexOf('(');
    int end = columnHeading.indexOf(')');

    if (start == -1 || end == -1 || start >= end) {
      throwWrongHeaderException();
    }
    return columnHeading.substring(start + 1, end);
  }
private String extractLanguage ( String columnHeading ) throws ParseException { int start = columnHeading . indexOf ( '(' ) ; int end = columnHeading . indexOf ( ')' ) ; if ( start == - 1 || end == - 1 || start >= end ) { throwWrongHeaderException ( ) ; } return columnHeading . substring ( start + 1 , end ) ; }
Extracts the language of the "master language value" and "value"
column heading in the first line of the trema CSV file.
@param columnHeading the column heading. The expected format is:
<code>master (&lt;lang&gt;)</code> or <code>value (&lt;lang&gt;)</code>.
@return the extracted language
@throws ParseException if any parse errors occur