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