if (change instanceof AbstractNodeChange) {
AbstractNodeChange nodeChange = (AbstractNodeChange)change;
if (acceptableNodeType(nodeChange)) {
if (nodeChange instanceof AbstractPropertyChange) {
AbstractPropertyChange propChange = (AbstractPropertyChange)nodeChange;
Property property = propChange.getProperty();
if (indexedPropertyName.equals(property.getName())) {
if (nodeChange instanceof PropertyAdded) {
ops.add(propChange.getKey(), property);
} else if (nodeChange instanceof PropertyChanged) {
PropertyChanged changedProperty = (PropertyChanged)nodeChange;
ops.change(propChange.getKey(), property, changedProperty.getOldProperty());
} else if (nodeChange instanceof PropertyRemoved) {
ops.remove(propChange.getKey());
}
}
} else if (nodeChange instanceof NodeAdded) {
NodeAdded added = (NodeAdded)nodeChange;
Property addedProperty = added.getProperties().get(indexedPropertyName);
if (addedProperty != null) {
ops.add(nodeChange.getKey(), addedProperty);
}
} else if (nodeChange instanceof NodeRemoved) {
ops.remove(nodeChange.getKey());