code: public boolean canAddChildNode(String childNodeName, String nodeTypeName)
     {
        try
        {
           InternalQName cname = locationFactory.parseJCRName(childNodeName).getInternalName();
           InternalQName ntname = locationFactory.parseJCRName(nodeTypeName).getInternalName();
  
           NodeDefinitionData childNodeDef =
              nodeTypeDataManager.getChildNodeDefinition(cname, ntname, nodeTypeData.getName());
           return !(childNodeDef == null || childNodeDef.isProtected()) && isChildNodePrimaryTypeAllowed(cname, ntname);
        }
        catch (RepositoryException e)
        {
           if (LOG.isDebugEnabled())
              LOG.debug("canAddChildNode " + e, e);
           return false;
        }
     }
docs: {@inheritDoc}