*/
protected NodeImpl(ItemManager itemMgr, SessionImpl session, AbstractNodeData data) {
super(itemMgr, session, data);
this.data = data;
// paranoid sanity check
NodeTypeRegistry ntReg = session.getNodeTypeManager().getNodeTypeRegistry();
final NodeState state = data.getNodeState();
if (!ntReg.isRegistered(state.getNodeTypeName())) {
/**
* todo need proper way of handling inconsistent/corrupt node type references
* e.g. 'flag' nodes that refer to non-registered node types
*/
log.warn("Fallback to nt:unstructured due to unknown node type '"
+ state.getNodeTypeName() + "' of " + this);
data.getNodeState().setNodeTypeName(NameConstants.NT_UNSTRUCTURED);
}
List<Name> unknown = null;
for (Name mixinName : state.getMixinTypeNames()) {
if (!ntReg.isRegistered(mixinName)) {
if (unknown == null) {
unknown = new ArrayList<Name>();
}
unknown.add(mixinName);
log.warn("Ignoring unknown mixin type '" + mixinName +