Search in sources :

Example 1 with FeatureSupport

use of de.tudarmstadt.ukp.clarin.webanno.api.annotation.feature.FeatureSupport in project webanno by webanno.

the class AnnotationSchemaServiceImpl method generateFeatures.

private void generateFeatures(TypeSystemDescription aTSD, TypeDescription aTD, AnnotationLayer aLayer) {
    List<AnnotationFeature> features = listAnnotationFeature(aLayer);
    for (AnnotationFeature feature : features) {
        FeatureSupport fs = featureSupportRegistry.getFeatureSupport(feature);
        fs.generateFeature(aTSD, aTD, feature);
    }
}
Also used : FeatureSupport(de.tudarmstadt.ukp.clarin.webanno.api.annotation.feature.FeatureSupport) AnnotationFeature(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature)

Example 2 with FeatureSupport

use of de.tudarmstadt.ukp.clarin.webanno.api.annotation.feature.FeatureSupport in project webanno by webanno.

the class ProjectLayersPanel method saveFeature.

private void saveFeature(AnnotationFeature aFeature) {
    FeatureSupport fs = featureSupportRegistry.getFeatureSupport(featureDetailForm.featureType.getModelObject().getFeatureSupportId());
    // Let the feature support finalize the configuration of the feature
    fs.configureFeature(aFeature);
    // Force the tagset to null if the features do not support tagsets
    if (!fs.isTagsetSupported(aFeature)) {
        aFeature.setTagset(null);
    }
    annotationService.createFeature(aFeature);
    featureDetailForm.setVisible(false);
}
Also used : FeatureSupport(de.tudarmstadt.ukp.clarin.webanno.api.annotation.feature.FeatureSupport)

Aggregations

FeatureSupport (de.tudarmstadt.ukp.clarin.webanno.api.annotation.feature.FeatureSupport)2 AnnotationFeature (de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature)1