All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.parser.Profile

java.lang.Object
   |
   +----w3c.pics.parser.Profile

public class Profile
extends Object
implements Serializable, Cloneable
A class that represents a PICSRules 1.1 Profile.


Constructor Index

 o Profile()
Creates a new, empty Profile.

Method Index

 o checkAll(Vector)
checkAll returns a Vector of EvalResults, one for each of the URLs.
 o clone()
The Clone method for Profiles.
 o evalURL(String)
Evaluates whether a single url is allowed or not; first fetches any labels from label bureaus that the profile specifies to fetch.
 o getAuthor()
Returns the author of this Profile.
 o getCreationTool()
Returns the value of the CreationTool attribute of this Profile.
 o getDescription()
Returns the description of this Profile.
 o getFullServiceName(String)
Searches for the service name, given the Shortname of the service, as it appears in a Policy clause, for example.
 o getLabels(String)
For each service, get embedded labels and label bureau labels.
 o getLastModified()
Returns the last modified date of this Profile.
 o getOptExt()
Returns a Vector containing String representations of all the optional extensions defined in this Profile.
 o getPolicies()
Returns a Vector containing all of the information contained in the Policy clauses.
 o getReqExt()
Returns a Vector containing String representations of all the required extensions defined in this Profile.
 o getRuleName()
Returns the name of this Profile.
 o getServiceInfo(String)
Returns a single ServiceInfo clause from this Profile.
 o getServiceNames()
Returns an Enumeration containing all of the names of the ServiceInfo clauses.
 o getSourceURL()
Returns the SourceURL of this Profile.
 o getVersion()
Returns the version of PICSRules that this profile was created for.
 o isValid(String, Label)
Evaluates a label against this Profile.
 o isValid(String, Label, boolean)
Evaluates a label against this Profile.
 o isValid(String, Vector)
Evaluates a group of labels against this Profile.
 o isValid(String, Vector, boolean)
Evaluates a group of labels against this Profile.
 o isValidWithReason(String, Vector, boolean)
Evaluates a group of labels against this Profile.
 o printResults(Vector, Vector)
Matches URLs and results up one by one and nicely prints the results to System.out.
 o toString()
Returns the PICSRules 1.1 representation of this Profile.

Constructors

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

Methods

 o getVersion
 public String getVersion()
Returns the version of PICSRules that this profile was created for.

Returns:
A String containing the version information.
 o getRuleName
 public String getRuleName()
Returns the name of this Profile.

Returns:
A String containing the name of this Profile.
 o getDescription
 public String getDescription()
Returns the description of this Profile.

Returns:
A String containing the description of this Profile.
 o getSourceURL
 public String getSourceURL()
Returns the SourceURL of this Profile.

Returns:
A String containing the SourceURL of this Profile.
 o getCreationTool
 public String getCreationTool()
Returns the value of the CreationTool attribute of this Profile.

Returns:
A String containing the value of the CreationTool attribute.
 o getAuthor
 public String getAuthor()
Returns the author of this Profile.

Returns:
A String containing the author of the Profile.
 o getLastModified
 public String getLastModified()
Returns the last modified date of this Profile.

Returns:
A String containing the last modified date of this Profile.
 o getServiceInfo
 public Hashtable getServiceInfo(String serviceName)
Returns a single ServiceInfo clause from this Profile.

Parameters:
serviceName - The name of the ServiceInfo clause to return.
Returns:
A Hashtable containing the information for the ServiceInfo clause with name serviceName
 o getFullServiceName
 public String getFullServiceName(String shortName)
Searches for the service name, given the Shortname of the service, as it appears in a Policy clause, for example.

Parameters:
shortName - The shortname to lookup.
 o getServiceNames
 public Enumeration getServiceNames()
Returns an Enumeration containing all of the names of the ServiceInfo clauses.

Returns:
An Enumeration.
 o getPolicies
 public Vector getPolicies()
Returns a Vector containing all of the information contained in the Policy clauses.

Returns:
A Vector
 o getOptExt
 public Vector getOptExt()
Returns a Vector containing String representations of all the optional extensions defined in this Profile.

Returns:
A Vector.
 o getReqExt
 public Vector getReqExt()
Returns a Vector containing String representations of all the required extensions defined in this Profile.

Returns:
A Vector.
 o printResults
 public void printResults(Vector URLs,
                          Vector results)
Matches URLs and results up one by one and nicely prints the results to System.out.

Parameters:
URLs - The URLs to be printed.
results - A Vector containing the results for each URL.
 o checkAll
 public Vector checkAll(Vector URLs)
checkAll returns a Vector of EvalResults, one for each of the URLs.

Parameters:
URLs - A Vector containing the URLs to evaluate.
Returns:
A Vector of EvalResults.
 o evalURL
 public EvalResult evalURL(String url)
Evaluates whether a single url is allowed or not; first fetches any labels from label bureaus that the profile specifies to fetch.

Parameters:
url - The URL to evaluate.
Returns:
An EvalResult.
 o getLabels
 public void getLabels(String url)
For each service, get embedded labels and label bureau labels.

Parameters:
url - The URL to be evaluated.
 o isValid
 public boolean isValid(String URL,
                        Label label)
Evaluates a label against this Profile.

Parameters:
URL - The URL that the label rates.
label - The label to evaluate against.
Returns:
A boolean, indicating if the label was passed or blocked by this profile.
 o isValid
 public boolean isValid(String URL,
                        Vector labellist)
Evaluates a group of labels against this Profile.

Parameters:
URL - The URL that the labels rate.
labellist - A Vector containing the labels to evaluate against.
Returns:
A boolean, indicating if this group of labels was passed or blocked by this profile.
 o isValid
 public boolean isValid(String URL,
                        Label label,
                        boolean debugmode)
Evaluates a label against this Profile.

Parameters:
URL - The URL that the label rates.
label - The label to evaluate against.
debugmode - A boolean indicating if debugging output should be printed or not.
Returns:
A boolean, indicating if the label was passed or blocked by this profile.
 o isValid
 public boolean isValid(String URL,
                        Vector labellist,
                        boolean debugmode)
Evaluates a group of labels against this Profile.

Parameters:
URL - The URL that the labels rate.
labellist - A Vector containing the labels to evaluate against.
debugmode - A boolean indicating if debugging output should be printed or not.
Returns:
A boolean, indicating if this group of labels was passed or blocked by this profile.
 o isValidWithReason
 public EvalResult isValidWithReason(String URL,
                                     Vector labellist,
                                     boolean debugmode)
Evaluates a group of labels against this Profile.

Parameters:
URL - The URL that the labels rate.
labellist - A Vector containing the labels to evaluate against.
debugmode - A boolean indicating if debugging output should be printed or not.
Returns:
A Vector containing a Boolean and a String. The Boolean indicates whether or not this group of labels was passed or blocked by this profile. The String contains the reason why, taken from the Explanation sub-clause of the Policy clause that caused the passing/blocking.
 o toString
 public String toString()
Returns the PICSRules 1.1 representation of this Profile.

Returns:
A String containing the PICSRules 1.1 representation of this Profile.
Overrides:
toString in class Object
 o clone
 public Object clone() throws CloneNotSupportedException
The Clone method for Profiles.

Returns:
A duplicate of this Profile, as an Object.
Throws: CloneNotSupportedException
If the cloning fails.
Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index