/** * Fetch data * * @param start * the start offset. * @param end * the end offset. * @return the data. */ public String get(final int start, final int end) { return get().substring(start, end); }
public void updateCaches() { if (_underlying != null) { _underlying.updateCaches(); } get(); if (_startDirty) { int length = 0; AbstractDataSegment seg = _first; while (seg != null) { seg._cachedStart = length; length += seg.length(); seg = seg._next; } _startDirty = false; System.out.println("startDirty false"); } }
protected void applyChanges(JCas aSourceView, JCas aTargetView) { AlignedString as = AlignmentFactory.createAlignmentsFor(aSourceView); // Set the text of the new Sofa aTargetView.setDocumentText(as.get()); // Set document language aTargetView.setDocumentLanguage(aSourceView.getDocumentLanguage()); // Optionally we may want to remember the AlignedString for the backmapper. AlignmentStorage.getInstance().put(aSourceView.getCasImpl().getBaseCAS(), aSourceView.getViewName(), aTargetView.getViewName(), as); } }
aOutput.setDocumentText(alignedString.get());