}
} catch (FileSystemException fse) {
String error = "internal error: invalid resource: "
+ customNodeTypesResource.getPath();
log.debug(error);
throw new RepositoryException(error, fse);
}
entCache = new EffectiveNodeTypeCache();
registeredNTDefs = new HashMap();
propDefs = new HashMap();
nodeDefs = new HashMap();
// setup definition of root node
rootNodeDef = createRootNodeDef();
nodeDefs.put(rootNodeDef.getId(), rootNodeDef);
// load and register pre-defined (i.e. built-in) node types
builtInNTDefs = new NodeTypeDefStore();
try {
// load built-in node type definitions
loadBuiltInNodeTypeDefs(builtInNTDefs);
// register built-in node types
internalRegister(builtInNTDefs.all(), true);
} catch (InvalidNodeTypeDefException intde) {
String error =
"internal error: invalid built-in node type definition stored in "
+ BUILTIN_NODETYPES_RESOURCE_PATH;
log.debug(error);
throw new RepositoryException(error, intde);
}
// load and register custom node types
customNTDefs = new NodeTypeDefStore();
// load custom node type definitions
loadCustomNodeTypeDefs(customNTDefs);
// validate & register custom node types
try {
internalRegister(customNTDefs.all());
} catch (InvalidNodeTypeDefException intde) {
String error =
"internal error: invalid custom node type definition stored in "
+ customNodeTypesResource.getPath();
log.debug(error);
throw new RepositoryException(error, intde);
}
}