All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.db.Filter

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

public class Filter
extends Object
A Filter stores the upper and lower limits for each Category.


Constructor Index

 o Filter(Reader, String)
Constructs a Filter from a Reader
 o Filter(Reader, String, boolean)
Constructs a Filter from a Reader
 o Filter(String, String)
Creates a new Filter
 o Filter(String, String, boolean, boolean, boolean)
Creates a new Filter

Method Index

 o addRange(ValueRange)
Add a range of values to this Filter.
 o createValueCheckers()
Creates ValueChecker objects for this Filter.
 o createValueCheckers(SQLProfile)
Creates ValueChecker objects for this Filter.
 o createValueCheckers(String, String)
Creates ValueChecker objects for this Filter.
 o getBlockRulz(String)
Returns a string containing the portion of this Filter that consists of Block rules.
 o getPassRulz(String)
Returns a string containing the portion of this Filter that consists of Pass rules.
 o getRangeList()
Returns the list of ranges that have been added to the Filter.
 o getRatingsystem()
Returns the name of the rating system for this Filter.
 o getService()
Returns the name of the service for this Filter.
 o getValueCheckers()
Returns an array of ValueCheckers for this Filter, previously created by a call to createValueCheckers.
 o lookupRange(String)
Returns the ValueRange with the name name
 o nextRange()
Returns the next ValueRange for this Filter.
 o reset()
Reset the internal pointer so that the next call of nextRange() will return the first ValueRange.
 o toRulzString(String)
Returns a String representation of the Filter in PICSRulz format.
 o toString()
Returns a String representation of the Filter.

Constructors

 o Filter
 public Filter(String ratingsystem,
               String sname)
Creates a new Filter

Parameters:
ratingsystem - A String with the name of the ratings system for this Filter
sname - A String with the name of the actual service (.rat) file.
 o Filter
 public Filter(String ratingsystem,
               String sname,
               boolean abmode,
               boolean incmode,
               boolean ipwgmode)
Creates a new Filter

Parameters:
ratingsystem - A String with the name of the ratings system for this Filter
sname - A String with the name of the actual service (.rat) file.
abmode - A boolean indicating if the default action for this filter is to accept or block.
incmode - A boolean indicating if the endpoints of ranges are to be included or not.
ipwgmode - A boolean indicating if this filter is in demomode.
 o Filter
 public Filter(Reader ins,
               String sname) throws PICSException, IOException
Constructs a Filter from a Reader

Parameters:
ins - The Reader.
sname - A String with the name of the actual service (.rat) file.
Throws: PICSException
If there is an error parsing the input file.
Throws: IOException
If there is an error reading the input file.
 o Filter
 public Filter(Reader ins,
               String sname,
               boolean rulzmode) throws PICSException, IOException
Constructs a Filter from a Reader

Parameters:
ins - The Reader.
sname - A String with the name of the actual service (.rat) file.
rulzmode - A boolean indicating whether this filter is being used to open a full PICSRulz profile, or just a Filter clause. It is true when called for a Filter clause, false when called for an entire Profile.
Throws: PICSException
If there is an error parsing the input file.
Throws: IOException
If there is an error reading the input file.

Methods

 o addRange
 public void addRange(ValueRange r)
Add a range of values to this Filter.

Parameters:
r - The ValueRange object representing the range of values.
 o toString
 public String toString()
Returns a String representation of the Filter.

Returns:
A String with a human readable representation of the Filter.
Overrides:
toString in class Object
 o toRulzString
 public String toRulzString(String sourcename)
Returns a String representation of the Filter in PICSRulz format.

Parameters:
sourcename - A String containing the name of the label service.
Returns:
A String containing a valid PICSRulz filter expression.
 o getPassRulz
 public String getPassRulz(String sourcename)
Returns a string containing the portion of this Filter that consists of Pass rules.

Parameters:
sourcename - A String containing the name of the label service.
Returns:
A String, containing the pass rules, in PICSRulz format.
 o getBlockRulz
 public String getBlockRulz(String sourcename)
Returns a string containing the portion of this Filter that consists of Block rules.

Parameters:
sourcename - A String containing the name of the label service.
Returns:
A String, containing the block rules, in PICSRulz format.
 o getRangeList
 public Vector getRangeList()
Returns the list of ranges that have been added to the Filter.

Returns:
A Vector, containing the ranges.
 o getRatingsystem
 public String getRatingsystem()
Returns the name of the rating system for this Filter.

Returns:
A String, containing the name of the rating system.
 o reset
 public void reset()
Reset the internal pointer so that the next call of nextRange() will return the first ValueRange.

 o nextRange
 public ValueRange nextRange()
Returns the next ValueRange for this Filter.

Returns:
A ValueRange.
 o lookupRange
 public ValueRange lookupRange(String name)
Returns the ValueRange with the name name

Parameters:
name - The name of the ValueRange to be looked up.
Returns:
A ValueRange or null if none of the ValueRanges in this Filter had the name name.
 o getService
 public String getService()
Returns the name of the service for this Filter.

Returns:
A String, containing the name of the rating service.
 o createValueCheckers
 public void createValueCheckers(SQLProfile p)
Creates ValueChecker objects for this Filter.

Parameters:
p - The profile that this Filter belongs to.
 o createValueCheckers
 public void createValueCheckers(String OrigFaillist,
                                 String OrigPasslist)
Creates ValueChecker objects for this Filter.

Parameters:
OrigFaillist - A list of URLs that are to be failed by this filter.
OrigPasslist - A list of URLs that are to be passed by this filter.
 o createValueCheckers
 public void createValueCheckers()
Creates ValueChecker objects for this Filter.

 o getValueCheckers
 public ValueChecker[] getValueCheckers() throws PICSException
Returns an array of ValueCheckers for this Filter, previously created by a call to createValueCheckers.

Returns:
An array of ValueCheckers.
Throws: PICSException
If there are no ValueCheckers in this Filter.

All Packages  Class Hierarchy  This Package  Previous  Next  Index