// check special nodes
final NodeState state = data.getNodeState();
if (state.getNodeTypeName().equals(NameConstants.NT_VERSION)) {
return new VersionImpl(this, sessionContext, data);
} else if (state.getNodeTypeName().equals(NameConstants.NT_VERSIONHISTORY)) {
return new VersionHistoryImpl(this, sessionContext, data);
} else {
// create node object
return new NodeImpl(this, sessionContext, data);
}
}