All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.db.RulzGenerator

java.lang.Object
   |
   +----w3c.pics.db.RulzGenerator

public class RulzGenerator
extends Object
A class for generating random PICSRulz profiles.


Constructor Index

 o RulzGenerator(boolean, boolean)
Creates a new RulzGenerator.
 o RulzGenerator(boolean, boolean, int, String)
Creates a new RulzGenerator.
 o RulzGenerator(boolean, boolean, int, String, String, String)
Creates a new RulzGenerator.
 o RulzGenerator(boolean, int, String, Vector, boolean)
Creates a new RulzGenerator.

Method Index

 o getNull()
Returns a boolean indicating if the ratfile was successfully read or not.
 o main(String[])
A procedure that will generate PICSRulz.

Constructors

 o RulzGenerator
 public RulzGenerator(boolean save,
                      boolean aname)
Creates a new RulzGenerator.

Parameters:
save - A boolean, true if the rulz are to be saved to files, false if not.
aname - A boolean, true if the user should be prompted for a filename to save the .rlz file, false to use the default filename.
 o RulzGenerator
 public RulzGenerator(boolean save,
                      boolean aname,
                      int count,
                      String bname)
Creates a new RulzGenerator.

Parameters:
save - A boolean, true if the rulz are to be saved to files, false if not.
aname - A boolean, true if the user should be prompted for a filename to save each .rlz file, false to use the default filename(s).
count - The number of rulz to create.
bname - The basename to use for the .rlz files that are created.
 o RulzGenerator
 public RulzGenerator(boolean save,
                      boolean aname,
                      int count,
                      String bname,
                      String defaultrat,
                      String defaultratdir)
Creates a new RulzGenerator.

Parameters:
save - A boolean, true if the rulz are to be saved to files, false if not.
aname - A boolean, true if the user should be prompted for a filename to save each .rlz file, false to use the default filename(s).
count - The number of rulz to create.
bname - The basename to use for the .rlz files that are created.
defaultrat - The name of the ratfile to be used.
defaultratdir - The name of the directory containing the ratfile.
 o RulzGenerator
 public RulzGenerator(boolean save,
                      int count,
                      String bname,
                      Vector ratlist,
                      boolean allcats)
Creates a new RulzGenerator.

Parameters:
save - A boolean, true if the rulz are to be saved to files, false if not.
count - The number of rulz to create.
bname - The basename to use for the .rlz files that are created.
ratlist - A Vector containing a list of ratfiles that are to be used when creating profiles.
allcats - A boolean, true if the rulz are to use every category of each service that they use, false if the rulz can skip categories.

Methods

 o main
 public static void main(String args[])
A procedure that will generate PICSRulz. Takes the following command-line arguments:
  1. -savemode -- If present, this flag will cause the rulz to be written out to files.
  2. -count -- If present, the next argument will be read as an integer. This number will be used as the number of rulz to generate.
  3. -noask -- If present, this flag will use the default filename instead of prompting the user for a filename.
  4. -ratfile -- If present, the next argument will be read as the full pathname to the ratfile.
  5. -multirat -- If the -multirat flag is used, the next argument will be read as a comma-seperated list of full pathnames to ratfiles. Any number of ratfiles may be including in this list. When this flag is in use, the RulzGenerator will use all of the ratfiles to create each profile.
  6. -nouseall -- If the -nouseall flag is present, then the rulz generated can omit categories. If this flag is not present, then every rulz file will use every category from each service in its Filter clause. Only works in multirat mode.

 o getNull
 public boolean getNull()
Returns a boolean indicating if the ratfile was successfully read or not.

Returns:
A boolean.

All Packages  Class Hierarchy  This Package  Previous  Next  Index