throw new ItemExistsException(relPath);
}
String ntName = primaryNodeTypeName;
if (ntName == null) {
DefinitionProvider dp = sessionDelegate.getDefinitionProvider();
try {
String childName = sessionDelegate.getOakName(PathUtils.getName(relPath));
NodeDefinition def = dp.getDefinition(new NodeImpl<NodeDelegate>(parent), childName);
ntName = def.getDefaultPrimaryTypeName();
} catch (RepositoryException e) {
throw new ConstraintViolationException(
"no matching child node definition found for " + relPath);
}