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.


Constructor Index

 o Policy()
Creates a new, empty Policy.

Method Index

 o addExtClause(String)
Adds an extension clause to the Policy
 o getExplanation()
Returns the explanation sub-clause for this Policy.
 o getType()
Returns the type of this Policy.
 o isValid(String, Vector, Hashtable)
Evaluates a group of labels against this Policy.
 o setExplanation(String)
Changes the explanation for this Policy.
 o setType(String)
Returns the type of this node.
 o toString()
Returns the PICSRules 1.1 representation of this Policy clause.
 o writeSQLQuery(Profile, String, String, Vector, Vector, boolean)
Generates a SQL query for labels matching the conditions specified in the current Policy

Constructors

 o Policy
 public Policy()
Creates a new, empty Policy.

Methods

 o getType
 public String getType()
Returns the type of this Policy.

Returns:
A String containing the type of Policy.
 o getExplanation
 public String getExplanation()
Returns the explanation sub-clause for this Policy.

Returns:
A String containing an explanation of the Policy.
 o setType
 public void setType(String type)
Returns the type of this node.

Parameters:
type - A String describing the type of Policy this is.
 o setExplanation
 public void setExplanation(String explanation)
Changes the explanation for this Policy.

Parameters:
explanation - A String explaining the Policy.
 o 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
 o 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
 o 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.
 o 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