Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

String [] org::apache::uima::analysis_engine::impl::ResultSpecification_impl::normalizeLanguages ( String[]  languages ) [inline, private]

change null languages to the unspecified language change a set of languages that includes the unspecified language to just the unspecified language. This is OK when storing things into a result spec, since the unspecified language will match any query. This doesn't apply for querying because the queries only specify one language, not a set

Definition at line 325 of file ResultSpecification_impl.java.

References mDefaultLanguage.

Referenced by setResultTypesAndFeatures().

    if (null == languages) {
      return mDefaultLanguage;
    } else {
      for (String lang : languages) {
        if (lang.equals(Language.UNSPECIFIED_LANGUAGE)) {
          return mDefaultLanguage;
    // normalization is expensive - so do this once as part of parsing capabilities
//    int i = 0;
//    for (String language : languages) {
//      languages[i++] = normalizeLanguage(language);
//    }
    return languages;  

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index