@Deprecated public Offset getOffset() { return new Offset(begin, end); }
/** * @deprecated Better use {@link #getBegin()} and {@link #getEnd()} */ @Deprecated public Offset getOffset() { return new Offset(begin, end); }
private void setHighlight(AnnotationSuggestion aSuggestion) { if (protectHighlight) { LOG.trace("Active learning sidebar not updating protected highlights"); protectHighlight = false; return; } LOG.trace("Active learning sidebar set highlight suggestion: {}", aSuggestion); highlightVID = aSuggestion.getVID(); highlightSpan = new Offset(aSuggestion.getBegin(), aSuggestion.getEnd()); highlightDocumentName = aSuggestion.getDocumentName(); }
private void setHighlight(AnnotationSuggestion aSuggestion) { if (protectHighlight) { LOG.trace("Active learning sidebar not updating protected highlights"); protectHighlight = false; return; } LOG.trace("Active learning sidebar set highlight suggestion: {}", aSuggestion); highlightVID = aSuggestion.getVID(); highlightSpan = new Offset(aSuggestion.getBegin(), aSuggestion.getEnd()); highlightDocumentName = aSuggestion.getDocumentName(); }
private void setHighlight(LearningRecord aRecord) { LOG.trace("Active learning sidebar set highlight history record: {}", aRecord); highlightVID = null; highlightSpan = new Offset(aRecord.getOffsetCharacterBegin(), aRecord.getOffsetCharacterEnd()); highlightDocumentName = aRecord.getSourceDocument().getName(); // This is a bit of hack. Consider the following case: // - use removes an ACCEPT history item // - user clicks then on another history item // - ... but during the subsequent rendering the "moveToNextSuggestion" method sets or // clears the highlight. protectHighlight = true; }
private void setHighlight(LearningRecord aRecord) { LOG.trace("Active learning sidebar set highlight history record: {}", aRecord); highlightVID = null; highlightSpan = new Offset(aRecord.getOffsetCharacterBegin(), aRecord.getOffsetCharacterEnd()); highlightDocumentName = aRecord.getSourceDocument().getName(); // This is a bit of hack. Consider the following case: // - use removes an ACCEPT history item // - user clicks then on another history item // - ... but during the subsequent rendering the "moveToNextSuggestion" method sets or // clears the highlight. protectHighlight = true; }
private void setHighlight(SourceDocument aDocument, AnnotationFS aAnnotation) { LOG.trace("Active learning sidebar set highlight annotation: {}", aAnnotation); highlightVID = new VID(WebAnnoCasUtil.getAddr(aAnnotation)); highlightSpan = new Offset(aAnnotation.getBegin(), aAnnotation.getEnd()); highlightDocumentName = aDocument.getName(); protectHighlight = false; }
private void setHighlight(SourceDocument aDocument, AnnotationFS aAnnotation) { LOG.trace("Active learning sidebar set highlight annotation: {}", aAnnotation); highlightVID = new VID(WebAnnoCasUtil.getAddr(aAnnotation)); highlightSpan = new Offset(aAnnotation.getBegin(), aAnnotation.getEnd()); highlightDocumentName = aDocument.getName(); protectHighlight = false; }
annotationsInWindow.stream() .filter(fs -> fs.getFeatureValueAsString(feat) != null) .forEach(fs -> annotations.put(new Offset(fs.getBegin(), fs.getEnd()), fs));