Search in sources :

Example 1 with FeatureDescription

use of org.apache.uima.resource.metadata.FeatureDescription in project webanno by webanno.

the class TypeSystemAnalysis method analyzeFeatures.

private void analyzeFeatures(AnnotationLayer aLayer, TypeSystem aTS, TypeDescription aTD, Optional<? extends LayerDetails> aDetails) {
    Type type = aTS.getType(aTD.getName());
    for (FeatureDescription fd : aTD.getFeatures()) {
        Feature feat = type.getFeatureByBaseName(fd.getName());
        // We do not need to set up built-in features
        if (isBuiltInFeature(feat)) {
            continue;
        }
        if (aDetails.isPresent() && aDetails.get().isHiddenFeature(feat)) {
            continue;
        }
        AnnotationFeature f = analyzeFeature(aTS, fd, feat);
        features.put(aLayer.getName(), f);
    }
}
Also used : Type(org.apache.uima.cas.Type) FeatureDescription(org.apache.uima.resource.metadata.FeatureDescription) Feature(org.apache.uima.cas.Feature) AnnotationFeature(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature) AnnotationFeature(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature)

Aggregations

AnnotationFeature (de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature)1 Feature (org.apache.uima.cas.Feature)1 Type (org.apache.uima.cas.Type)1 FeatureDescription (org.apache.uima.resource.metadata.FeatureDescription)1