@Override public void annotationBoundary(AnnotationBoundaryMap map) { noninsertionOp.annotationBoundary(map); }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { targetDocument.annotationBoundary(map); }
target.annotationBoundary(new AnnotationBoundaryMap() {
@Override public void annotationBoundary(AnnotationBoundaryMap map) { targetDocument.annotationBoundary(map); }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { preservationOp.annotationBoundary(map); }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { cache.flush(); target.annotationBoundary(map); }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { preservationOp.annotationBoundary(map); }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { targetDocument.annotationBoundary(map); }
target.annotationBoundary(new AnnotationBoundaryMap() {
normalizer.annotationBoundary(new AnnotationBoundaryMapImpl( endKeys.toArray(new String[0]), changeKeys.toArray(new String[0]),
normalizer.annotationBoundary(new AnnotationBoundaryMapImpl( endKeys.toArray(new String[0]), changeKeys.toArray(new String[0]),
private void delete(int size) { List<String> keys = new ArrayList<String>(); List<String> oldValues = new ArrayList<String>(); List<String> newValues = new ArrayList<String>(); for (Map.Entry<String, ValueUpdate> entry : propagatingAnnotations.entrySet()) { String key = entry.getKey(); ValueUpdate update = entry.getValue(); ValueUpdate activeUpdate = activeAnnotations.get(key); if (update != null) { keys.add(key); oldValues.add(activeUpdate != null ? activeUpdate.newValue : update.oldValue); newValues.add(update.newValue); } else if (activeUpdate != null) { keys.add(key); oldValues.add(activeUpdate.newValue); newValues.add(activeUpdate.oldValue); } } annotationResidue.annotationBoundary(new AnnotationBoundaryMapImpl( new String[0], keys.toArray(new String[0]), oldValues.toArray(new String[0]), newValues.toArray(new String[0]))); annotationResidue.retain(size); annotationResidue.annotationBoundary(new AnnotationBoundaryMapImpl( keys.toArray(new String[0]), new String[0], new String[0], new String[0])); }
private void delete(int size) { List<String> keys = new ArrayList<String>(); List<String> oldValues = new ArrayList<String>(); List<String> newValues = new ArrayList<String>(); for (Map.Entry<String, ValueUpdate> entry : propagatingAnnotations.entrySet()) { String key = entry.getKey(); ValueUpdate update = entry.getValue(); ValueUpdate activeUpdate = activeAnnotations.get(key); if (update != null) { keys.add(key); oldValues.add(activeUpdate != null ? activeUpdate.newValue : update.oldValue); newValues.add(update.newValue); } else if (activeUpdate != null) { keys.add(key); oldValues.add(activeUpdate.newValue); newValues.add(activeUpdate.oldValue); } } annotationResidue.annotationBoundary(new AnnotationBoundaryMapImpl( new String[0], keys.toArray(new String[0]), oldValues.toArray(new String[0]), newValues.toArray(new String[0]))); annotationResidue.retain(size); annotationResidue.annotationBoundary(new AnnotationBoundaryMapImpl( keys.toArray(new String[0]), new String[0], new String[0], new String[0])); }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { preservationOperation.annotationBoundary(map); for (int i = 0; i < map.endSize(); ++i) { String key = map.getEndKey(i); if (!propagatingAnnotations.containsKey(key)) { propagatingAnnotations.put(key, activeAnnotations.get(key)); } activeAnnotations.remove(key); } for (int i = 0; i < map.changeSize(); ++i) { String key = map.getChangeKey(i); if (!propagatingAnnotations.containsKey(key)) { propagatingAnnotations.put(key, activeAnnotations.get(key)); } activeAnnotations.put(key, new ValueUpdate(map.getOldValue(i), map.getNewValue(i))); } }
@Override public void annotationBoundary(AnnotationBoundaryMap map) { preservationOperation.annotationBoundary(map); for (int i = 0; i < map.endSize(); ++i) { String key = map.getEndKey(i); if (!propagatingAnnotations.containsKey(key)) { propagatingAnnotations.put(key, activeAnnotations.get(key)); } activeAnnotations.remove(key); } for (int i = 0; i < map.changeSize(); ++i) { String key = map.getChangeKey(i); if (!propagatingAnnotations.containsKey(key)) { propagatingAnnotations.put(key, activeAnnotations.get(key)); } activeAnnotations.put(key, new ValueUpdate(map.getOldValue(i), map.getNewValue(i))); } }
public final SimplifyingDocOpBuilder setAnnotation(int itemCount, String key, String oldValue, String newValue) { Preconditions.checkArgument(itemCount >= 0, "Negative item count"); if (itemCount > 0) { buffer.annotationBoundary(AnnotationBoundaryMapImpl.builder() .updateValues(key, oldValue, newValue) .build()); buffer.retain(itemCount); buffer.annotationBoundary(AnnotationBoundaryMapImpl.builder() .initializationEnd(key) .build()); } return this; }