public SuggestionGroup(AnnotationSuggestion... aItems) { suggestions = new ArrayList<>(asList(aItems)); sorted = suggestions.size() < 2; if (!suggestions.isEmpty()) { offset = suggestions.get(0).getOffset(); feature = get(0).getFeature(); layerId = get(0).getLayerId(); documentName = get(0).getDocumentName(); } }
public GroupKey(AnnotationSuggestion aSuggestion) { super(); begin = aSuggestion.getBegin(); end = aSuggestion.getEnd(); feature = aSuggestion.getFeature(); layerId = aSuggestion.getLayerId(); }
"All suggestions in a group must come from the same document: expected [%s] but got [%s]", representative.getDocumentName(), aSuggestion.getDocumentName()); Validate.isTrue(representative.getLayerId() == aSuggestion.getLayerId(), "All suggestions in a group must be on the same layer: expected [%d] but got [%d]", representative.getLayerId(), aSuggestion.getLayerId()); Validate.isTrue(representative.getFeature().equals(aSuggestion.getFeature()), "All suggestions in a group must be for the same feature: expected [%s] but got [%s]", offset = aSuggestion.getOffset(); feature = aSuggestion.getFeature(); layerId = aSuggestion.getLayerId(); documentName = aSuggestion.getDocumentName();
private List<AnnotationSuggestion> getMatchingSuggestion(List<SuggestionGroup> aSuggestions, AnnotationSuggestion aSuggestion) { return getMatchingSuggestion(aSuggestions, aSuggestion.getDocumentName(), aSuggestion.getLayerId(), aSuggestion.getFeature(), aSuggestion.getBegin(), aSuggestion.getEnd(), aSuggestion.getLabel()); }
private List<AnnotationSuggestion> getMatchingSuggestion(List<SuggestionGroup> aSuggestions, AnnotationSuggestion aSuggestion) { return getMatchingSuggestion(aSuggestions, aSuggestion.getDocumentName(), aSuggestion.getLayerId(), aSuggestion.getFeature(), aSuggestion.getBegin(), aSuggestion.getEnd(), aSuggestion.getLabel()); }
if ( acceptedSuggestion.getOffset().equals(suggestion.getOffset()) && vid.getLayerId() == suggestion.getLayerId() && acceptedSuggestion.getFeature().equals(suggestion.getFeature()) ) {
if ( acceptedSuggestion.getOffset().equals(suggestion.getOffset()) && vid.getLayerId() == suggestion.getLayerId() && acceptedSuggestion.getFeature().equals(suggestion.getFeature()) ) {
AnnotationLayer layer = annotationService.getLayer(suggestion.getLayerId()); AnnotationFeature feature = annotationService.getFeature(suggestion.getFeature(), layer); recommendationService.upsertFeature(annotationService, sourceDoc, username, jCas, layer,
AnnotationLayer layer = annotationService.getLayer(suggestion.getLayerId()); AnnotationFeature feature = annotationService.getFeature(suggestion.getFeature(), layer); int address = recommendationService.upsertFeature(annotationService, aState.getDocument(),
AnnotationLayer layer = annotationService.getLayer(suggestion.getLayerId()); AnnotationFeature feature = annotationService.getFeature(suggestion.getFeature(), layer); recommendationService.upsertFeature(annotationService, sourceDoc, username, jCas, layer,