/**
* @see NodeEntry#refresh(Event)
*/
public void refresh(Event childEvent) {
ItemId eventId = childEvent.getItemId();
Path eventPath = childEvent.getPath();
Name eventName = eventPath.getName();
HierarchyEntry child = lookupEntry(eventId, eventPath);
switch (childEvent.getType()) {
case Event.NODE_ADDED:
case Event.PROPERTY_ADDED:
if (child == null || child.getStatus() == Status.REMOVED) {
// no such child or a colliding new child existed but got
// removed already -> add the new entry.
if (childEvent.getType() == Event.NODE_ADDED) {
String uniqueChildID = (eventId.getPath() == null) ? eventId.getUniqueID() : null;
int index = eventPath.getNormalizedIndex();
internalAddNodeEntry(eventName, uniqueChildID, index);
} else {
internalAddPropertyEntry(eventName, true);
}