for( int i = 0; i < collections.length; i++ )
for( int i = 0; i < communities.length; i++ )
    public static void main( String [] argv )        throws Exception    {        Context c = new Context();        // turn off authorization        c.setIgnoreAuthorization(true);        //////////////////////        // carnage begins here        //////////////////////        Collection [] collections = Collection.findAll(c);                for( int i = 0; i < collections.length; i++ )        {            Collection t = collections[i];                        System.out.println("Collection " + t + " " + t.getMetadata( "name" ) );            // check for READ            if( checkForPolicy(c, t, Constants.READ ) )            {                System.out.println( "\tFound READ policies!" );            }            else            {                System.out.println( "\tNo READ policy found, adding anonymous.");                addAnonymousPolicy(c, t, Constants.READ );            }                       if( checkForPolicy(c, t, Constants.DEFAULT_ITEM_READ ) )            {                System.out.println( "\tFound DEFAULT_ITEM_READ policies!" );            }            else            {                System.out.println( "\tNo DEFAULT_ITEM_READ policy found, adding anonymous.");                addAnonymousPolicy(c, t, Constants.DEFAULT_ITEM_READ );            }            if( checkForPolicy(c, t, Constants.DEFAULT_BITSTREAM_READ ) )            {                System.out.println( "\tFound DEFAULT_BITSTREAM_READ policies!" );            }            else            {                System.out.println( "\tNo DEFAULT_BITSTREAM_READ policy found, adding anonymous.");                addAnonymousPolicy(c, t, Constants.DEFAULT_BITSTREAM_READ );            }        }        // now ensure communities have READ policies        Community [] communities = Community.findAll(c);        for( int i = 0; i < collections.length; i++ )        {            Community t = communities[i];                        System.out.println("Community " + t + " " + t.getMetadata( "name" ) );            // check for READ            if( checkForPolicy(c, t, Constants.READ ) )            {                System.out.println( "\tFound READ policies!" );            }            else            {                System.out.println( "\tNo READ policy found, adding anonymous.");                addAnonymousPolicy(c, t, Constants.READ );            }        }                       c.complete();    }