code: public boolean isChildNodePrimaryTypeAllowed(final InternalQName childName, final InternalQName childNodeType,
        final InternalQName parentNodeType, final InternalQName[] parentMixinNames) throws RepositoryException
     {
        final Set<InternalQName> testSuperTypesNames = this.nodeTypeRepository.getSupertypes(childNodeType);
        NodeDefinitionData[] allChildNodeDefinitions = getAllChildNodeDefinitions(parentNodeType);
        
        for (final NodeDefinitionData cnd : allChildNodeDefinitions)
        {
           for (final InternalQName reqNodeType : cnd.getRequiredPrimaryTypes())
           {
              InternalQName reqName = cnd.getName();
  
              if (isChildAllowed(childName, childNodeType, cnd, reqName, reqNodeType))
              {
                 return true;
              }
  
              for (final InternalQName superName : testSuperTypesNames)
              {
                 if (isChildAllowed(childName, superName, cnd, reqName, reqNodeType))
                 {
                    return true;
                 }
              }
           }
        }
  
        allChildNodeDefinitions = getAllChildNodeDefinitions(parentMixinNames);
        for (final NodeDefinitionData cnd : allChildNodeDefinitions)
        {
           for (final InternalQName reqNodeType : cnd.getRequiredPrimaryTypes())
           {
              InternalQName reqName = cnd.getName();
  
              if (isChildAllowed(childName, childNodeType, cnd, reqName, reqNodeType))
              {
                 return true;
              }
  
              for (final InternalQName superName : testSuperTypesNames)
              {
                 if (isChildAllowed(childName, superName, cnd, reqName, reqNodeType))
                 {
                    return true;
                 }
              }
           }
        }
  
        return false;
     }
docs: {@inheritDoc}