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.
-
Filter(Reader, String)
- Constructs a Filter from a Reader
-
Filter(Reader, String, boolean)
- Constructs a Filter from a Reader
-
Filter(String, String)
- Creates a new Filter
-
Filter(String, String, boolean, boolean, boolean)
- Creates a new Filter
-
addRange(ValueRange)
- Add a range of values to this Filter.
-
createValueCheckers()
- Creates ValueChecker objects for this Filter.
-
createValueCheckers(SQLProfile)
- Creates ValueChecker objects for this Filter.
-
createValueCheckers(String, String)
- Creates ValueChecker objects for this Filter.
-
getBlockRulz(String)
- Returns a string containing the portion of this Filter that consists of
Block rules.
-
getPassRulz(String)
- Returns a string containing the portion of this Filter that consists of
Pass rules.
-
getRangeList()
- Returns the list of ranges that have been added to the Filter.
-
getRatingsystem()
- Returns the name of the rating system for this Filter.
-
getService()
- Returns the name of the service for this Filter.
-
getValueCheckers()
- Returns an array of ValueCheckers for this Filter, previously created by
a call to createValueCheckers.
-
lookupRange(String)
- Returns the ValueRange with the name name
-
nextRange()
- Returns the next ValueRange for this Filter.
-
reset()
- Reset the internal pointer so that the next call of nextRange() will
return the first ValueRange.
-
toRulzString(String)
- Returns a String representation of the Filter in PICSRulz format.
-
toString()
- Returns a String representation of the Filter.
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.
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.
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.
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.
addRange
public void addRange(ValueRange r)
- Add a range of values to this Filter.
- Parameters:
- r - The ValueRange object representing the range of values.
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
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.
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.
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.
getRangeList
public Vector getRangeList()
- Returns the list of ranges that have been added to the Filter.
- Returns:
- A Vector, containing the ranges.
getRatingsystem
public String getRatingsystem()
- Returns the name of the rating system for this Filter.
- Returns:
- A String, containing the name of the rating system.
reset
public void reset()
- Reset the internal pointer so that the next call of nextRange() will
return the first ValueRange.
nextRange
public ValueRange nextRange()
- Returns the next ValueRange for this Filter.
- Returns:
- A ValueRange.
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.
getService
public String getService()
- Returns the name of the service for this Filter.
- Returns:
- A String, containing the name of the rating service.
createValueCheckers
public void createValueCheckers(SQLProfile p)
- Creates ValueChecker objects for this Filter.
- Parameters:
- p - The profile that this Filter belongs to.
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.
createValueCheckers
public void createValueCheckers()
- Creates ValueChecker objects for this Filter.
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