use of de.tudarmstadt.ukp.clarin.webanno.api.annotation.feature.editor.LinkFeatureEditor in project webanno by webanno.
the class SlotFeatureSupport method createEditor.
@Override
public FeatureEditor createEditor(String aId, MarkupContainer aOwner, AnnotationActionHandler aHandler, final IModel<AnnotatorState> aStateModel, final IModel<FeatureState> aFeatureStateModel) {
FeatureState featureState = aFeatureStateModel.getObject();
final FeatureEditor editor;
switch(featureState.feature.getMultiValueMode()) {
case ARRAY:
switch(featureState.feature.getLinkMode()) {
case WITH_ROLE:
editor = new LinkFeatureEditor(aId, aOwner, aHandler, aStateModel, aFeatureStateModel);
break;
default:
throw unsupportedFeatureTypeException(featureState);
}
break;
case NONE:
throw unsupportedLinkModeException(featureState);
default:
throw unsupportedMultiValueModeException(featureState);
}
return editor;
}
Aggregations