All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.db.Value

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

public class Value
extends Object
A Value encapsulates a single expression from a PICSRulz Filter clause.


Constructor Index

 o Value(String)
Creates a new Value
 o Value(String, String, String)
Creates a new Value.

Method Index

 o addFail(Vector)
Adds a list of URLs (as a Vector) to the FailURL list in this Value.
 o addPass(Vector)
Adds a list of URLs (as a Vector) to the PassURL list in this Value.
 o getCategory()
Returns the Category name from this Value in the form servicename .category-transmitname
 o getDoubleValue()
Returns the constant value contained in this Value.
 o getOp()
Returns the operator from this Value.
 o getShortname()
Returns the Category name from this Value in the form category-transmitname
 o getValue()
Returns the constant value contained in this Value.
 o isFail(String)
Takes a URL and determines if it is on the FailURL list containied within this Value.
 o isMulti()
Returns a boolean indicating if this Value is for a multivalue category or not.
 o isPass(String)
Takes a URL and determines if it is on the PassURL list contained within this Value.
 o isValid(double)
Returns a boolean indicated if the input value is valid or not.
 o toString()
Returns a human-readable representation of this Value.

Constructors

 o Value
 public Value(String categoryname,
              String operator,
              String value)
Creates a new Value.

Parameters:
categoryname - The Category for this Value.
operator - The operator for this Value.
value - The constant value for this Value.
 o Value
 public Value(String categoryname)
Creates a new Value

Parameters:
categoryname - The Category for this Value.

Methods

 o addFail
 public void addFail(Vector urllist)
Adds a list of URLs (as a Vector) to the FailURL list in this Value.

Parameters:
urllist - A Vector of URLs (Strings).
 o addPass
 public void addPass(Vector urllist)
Adds a list of URLs (as a Vector) to the PassURL list in this Value.

Parameters:
urllist - A Vector of URLs (Strings).
 o isMulti
 public boolean isMulti()
Returns a boolean indicating if this Value is for a multivalue category or not.

Returns:
A boolean, true if this Value is multivalue, false if not.
 o isPass
 public boolean isPass(String theurl)
Takes a URL and determines if it is on the PassURL list contained within this Value.

Parameters:
theurl - The URL to check, as a String.
Returns:
A boolean indicating if the URL was found or not.
 o isFail
 public boolean isFail(String theurl)
Takes a URL and determines if it is on the FailURL list containied within this Value.

Parameters:
theurl - The URL to check, as a String.
Returns:
A boolean indicating if the URL was found or not.
 o toString
 public String toString()
Returns a human-readable representation of this Value.

Returns:
A String containing a human-readable representation of this Value.
Overrides:
toString in class Object
 o getOp
 public String getOp()
Returns the operator from this Value.

Returns:
The operator, as a String.
 o getCategory
 public String getCategory()
Returns the Category name from this Value in the form servicename .category-transmitname

Returns:
A String containing the category name.
 o getShortname
 public String getShortname()
Returns the Category name from this Value in the form category-transmitname

Returns:
A String containing the category name.
 o getValue
 public String getValue()
Returns the constant value contained in this Value.

Returns:
A value as a String.
 o getDoubleValue
 public double getDoubleValue()
Returns the constant value contained in this Value.

Returns:
A value as a double.
 o isValid
 public boolean isValid(double input)
Returns a boolean indicated if the input value is valid or not.

Parameters:
input - The value to check.
Returns:
A boolean indicating if the input passed the rule within this Value.

All Packages  Class Hierarchy  This Package  Previous  Next  Index