All Packages Class Hierarchy This Package Previous Next Index
Class w3c.pics.parser.Policy
java.lang.Object
|
+----w3c.pics.parser.Policy
- public class Policy
- extends Object
- implements Serializable
PICS Standard Library class for a rating policy in a profile.
-
Policy()
- Creates a new, empty Policy.
-
addExtClause(String)
- Adds an extension clause to the Policy
-
getExplanation()
- Returns the explanation sub-clause for this Policy.
-
getType()
- Returns the type of this Policy.
-
isValid(String, Vector, Hashtable)
- Evaluates a group of labels against this Policy.
-
setExplanation(String)
- Changes the explanation for this Policy.
-
setType(String)
- Returns the type of this node.
-
toString()
- Returns the PICSRules 1.1 representation of this Policy clause.
-
writeSQLQuery(Profile, String, String, Vector, Vector, boolean)
- Generates a SQL query for labels matching the conditions specified in
the current Policy
Policy
public Policy()
- Creates a new, empty Policy.
getType
public String getType()
- Returns the type of this Policy.
- Returns:
- A String containing the type of Policy.
getExplanation
public String getExplanation()
- Returns the explanation sub-clause for this Policy.
- Returns:
- A String containing an explanation of the Policy.
setType
public void setType(String type)
- Returns the type of this node.
- Parameters:
- type - A String describing the type of Policy this is.
setExplanation
public void setExplanation(String explanation)
- Changes the explanation for this Policy.
- Parameters:
- explanation - A String explaining the Policy.
toString
public String toString()
- Returns the PICSRules 1.1 representation of this Policy clause.
- Returns:
- A String containing the Policy in the PICSRules format.
- Overrides:
- toString in class Object
writeSQLQuery
public String writeSQLQuery(Profile prof,
String serviceURL,
String serviceTableName,
Vector categories,
Vector multiValueCategories,
boolean cont)
- Generates a SQL query for labels matching the conditions specified in
the current Policy
- Parameters:
- prof - The Profile that this Policy came from
- serviceURL - The service URL for the table we are applying the SQL
query to
- serviceTableName - The table database name
- categories - Single-value categories in this table
- multiValueCategories - Multi-value categories in the table
- Returns:
- A String containing the SQL statement
isValid
public boolean isValid(String URL,
Vector labellist,
Hashtable silist)
- Evaluates a group of labels against this Policy.
- Parameters:
- URL - A String containing the URL that the labels are rating.
- labellist - Array of Label objects to be evaluated against
- silist - Table of serviceinfo information that the parent Profile
object owns.
- Returns:
- A boolean indicating if the labels are valid.
addExtClause
public void addExtClause(String ext)
- Adds an extension clause to the Policy
- Parameters:
- ext - The extension clause to add
All Packages Class Hierarchy This Package Previous Next Index