code: public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException
     {
        EntityCollection ec = new EntityCollection();
        NodeTypeIterator allTypes = getAllNodeTypes();
        while (allTypes.hasNext())
        {
           NodeType type = allTypes.nextNodeType();
           if (!type.isMixin())
           {
              ec.add(type);
           }
        }
        return ec;
     }
docs: Returns an iterator over all available primary node types.
  
  @return An <code>NodeTypeIterator</code>.
  @throws RepositoryException if an error occurs.