* @throws RepositoryException if {@link javax.jcr.Session#getItem(String)} fails.
*/
private DavResource createResource(Node node, DavResourceLocator locator,
DavSession session) throws DavException {
JcrDavSession.checkImplementation(session);
JcrDavSession sessionImpl = (JcrDavSession)session;
DavResource resource;
if (versioningSupported(sessionImpl.getRepositorySession())) {
// create special resources for Version and VersionHistory
if (node instanceof Version) {
resource = new VersionResourceImpl(locator, this, sessionImpl, resourceConfig, node);
} else if (node instanceof VersionHistory) {
resource = new VersionHistoryResourceImpl(locator, this, sessionImpl, resourceConfig, node);