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

boolean org::apache::uima::analysis_engine::impl::ResultSpecification_impl::containsFeature ( String  aFullFeatureName,
String  language 
) [inline]
See also:
org.apache.uima.analysis_engine.ResultSpecification::containsFeature(java.lang.String,java.lang.String)

Implements org::apache::uima::analysis_engine::ResultSpecification.

Definition at line 690 of file ResultSpecification_impl.java.

References org::apache::uima::cas::TypeSystem::FEATURE_SEPARATOR, org::apache::uima::cas::TypeSystem::getFeatureByFullName(), org::apache::uima::analysis_engine::TypeOrFeature::isAllAnnotatorFeatures(), languageMatches(), mTypeSystem, and name2tof_langs.

                                                                           {
    language = Language.normalize(language);
    int typeEndPosition = aFullFeatureName.indexOf(TypeSystem.FEATURE_SEPARATOR);
    if (typeEndPosition == -1)
      return false; // check against someone passing a type name here

    compileIfNeeded();
    ToF_Languages tof_langs = name2tof_langs.get(aFullFeatureName);
    if (languageMatches(tof_langs, language)) {
      return true;
    }
    
    // special code for allAnnotatorFeatures: return true if type name is found and
    // has all annotator features set
    tof_langs = availName2tof_langs().get(aFullFeatureName.substring(0, typeEndPosition));
    if (null != tof_langs && tof_langs.tof.isAllAnnotatorFeatures() && languageMatches(tof_langs, language)) {
      if (null != mTypeSystem) {
        return null != mTypeSystem.getFeatureByFullName(aFullFeatureName);  // verify feature is there
      }
      return true;
    }
    return false;
  }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index