All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class w3c.pics.parser.Label
java.lang.Object
   |
   +----w3c.pics.parser.Label
  -  public class Label
  -  extends Object
  -  implements Serializable, Cloneable, DSigLabelInterface
A class that represents a single PICS label.
   
  -   dsigparser dsigparser
-  
   
  -   Label() Label()
-   Creates a new, empty Label.
   
  -   addMExtension(String, String) addMExtension(String, String)
-   Adds a mandatory extension to this Label.
  
-   addOExtension(String, String) addOExtension(String, String)
-   Adds an optional extension to this Label.
  
-   getCategory(String) getCategory(String)
-   Returns the ratings for a particular category in this Label.
  
-   getFor() getFor()
-   Return the URL specified in the 'for' option of this label
 or null if none is present.
  
-   getMExtension(String) getMExtension(String)
-   Returns the requested one of the Label's mandatory extensions.
  
-   getOExtension(String) getOExtension(String)
-   Returns the requested one of the Label's optional extensions.
  
-   getOption(String) getOption(String)
-   Returns the requested one of the Label's options.
  
-   getRatings() getRatings()
-   Returns all of the ratings in a Label.
  
-   getResInfo() getResInfo()
-   Get the DSig Resource Information (resinfo).
  
-   getService() getService()
-   Returns the Service URL associated with this Label.
  
-   getSigBlock() getSigBlock()
-   Get the DSig Signature Block (sigblock)
  
-   initDSig() initDSig()
-   Parse the two DSig extension fields (resinfo and sigblock) out
 of the Labelobject.
-   setOption(String, String) setOption(String, String)
-   Changes the value of one of the Label's options.
  
-   setRating(String, Vector) setRating(String, Vector)
-   Changes the rating(s) for a particular category.
  
-   setResInfo(ResInfoExtension) setResInfo(ResInfoExtension)
-   Set the DSig Resource Information (resinfo).
  
-   setService(String) setService(String)
-   Changes the Service URL associated with this Label.
  
-   setSigBlock(SigBlockExtension) setSigBlock(SigBlockExtension)
-   Set the DSig Signature Block (sigblock)
  
-   sign(SignatureSuite, PrivateKey) sign(SignatureSuite, PrivateKey)
-   Sign the label using the appropriate private key class 
 recognized by the signature suite.
  
-   toDSigString() toDSigString()
-   Returns a String containing the canonical PICS 1.1 representation of 
 this Label, suitable for signing.
  
-   toExcludedDSigString(Hashtable) toExcludedDSigString(Hashtable)
-   Returns the canonicallized form of the DSig label with fields
 selectively included or excluded according the sigdata.
  
-   toString() toString()
-   Returns a String containing the PICS 1.1 representation of this Label.
  
-   updateDSig() updateDSig()
-   The change made in ResInfo and SigBlock extension is not automatic;
 calling this method updates the original PICS1.1 Label and reflect
 the changes in resinfo and sigblock.
  
-   verify() verify()
-   Verify the label using the user's default policy.
  
-   verifyAll() verifyAll()
-   Verify the complete Signature Label.
   
 dsigparser
dsigparser
 public DSigParser dsigparser
   
 Label
Label
 public Label()
  -  Creates a new, empty Label.
 
   
 getOption
getOption
 public String getOption(String optionName)
  -  Returns the requested one of the Label's options.
   
- 
    -  Parameters:
    
-  optionName - The option to return.
    
-  Returns:
    
-  A String, the value of the option optionName
  
 
 setOption
setOption
 public void setOption(String optionName,
                       String value)
  -  Changes the value of one of the Label's options.
   
- 
    -  Parameters:
    
-  optionName - The option to change.
    -  value - The new value.
  
 
 addMExtension
addMExtension
 public void addMExtension(String exName,
                           String data)
  -  Adds a mandatory extension to this Label.
   
- 
    -  Parameters:
    
-  exName - The name of the extension.
    -  data - The extension data.
  
 
 addOExtension
addOExtension
 public void addOExtension(String exName,
                           String data)
  -  Adds an optional extension to this Label.
   
- 
    -  Parameters:
    
-  exName - The name of the extension.
    -  data - The extension data.
  
 
 getMExtension
getMExtension
 public String getMExtension(String exName)
  -  Returns the requested one of the Label's mandatory extensions.
   
- 
    -  Parameters:
    
-  exName - The extension to return.
    
-  Returns:
    
-  A String, the data of the mandatory extension exName
  
 
 getOExtension
getOExtension
 public String getOExtension(String exName)
  -  Returns the requested one of the Label's optional extensions.
   
- 
    -  Parameters:
    
-  exName - The extension to return.
    
-  Returns:
    
-  A String, the data of the optional extension exName
  
 
 getService
getService
 public String getService()
  -  Returns the Service URL associated with this Label.
   
- 
    -  Returns:
    
-  A String containing the Service URL.
  
 
 setService
setService
 public void setService(String serURL)
  -  Changes the Service URL associated with this Label.
   
- 
    -  Parameters:
    
-  serURL - The new Service URL.
  
 
 getRatings
getRatings
 public Hashtable getRatings()
  -  Returns all of the ratings in a Label.
   
- 
    -  Returns:
    
-  A Hashtable mapping keys to Vectors of Rating objects.
  
 
 setRating
setRating
 public void setRating(String name,
                       Vector rating)
  -  Changes the rating(s) for a particular category.
   
- 
    -  Parameters:
    
-  name - The name of the Category to change.
    -  rating - A Vector containing one or more Rating objects.
  
 
 getCategory
getCategory
 public Vector getCategory(String categoryName)
  -  Returns the ratings for a particular category in this Label.
   
- 
    -  Parameters:
    
-  categoryName - The category whose ratings are to be returned.
    
-  Returns:
    
-  A Vector, containing the Rating objects for the category
 categoryName.
  
 
 toString
toString
 public String toString()
  -  Returns a String containing the PICS 1.1 representation of this Label.
   
- 
    -  Returns:
    
-  A String with a valid PICS 1.1 label representation of this
 Label object.
    
-  Overrides:
    
-  toString in class Object
  
 
 toDSigString
toDSigString
 public String toDSigString()
  -  Returns a String containing the canonical PICS 1.1 representation of 
 this Label, suitable for signing.
   
- 
    -  Returns:
    
-  A String with a valid canonicalized PICS 1.1 label
 representation of this Label object.
  
 
 initDSig
initDSig
 public void initDSig() throws ParseError, DSigException
  -  Parse the two DSig extension fields (resinfo and sigblock) out
 of the Labelobject.  It is necessary to call this
 method after theLabelobject is created by the
 PICS parser and before any signing or verification takes place.
   
- 
    -  Throws: ParseError
    
-  if the DSig extensions cannot be parsed correctly.
    
-  Throws: DSigException
    
-  if the DSig extensions cannot be parsed
 correctly.
  
 
 updateDSig
updateDSig
 public void updateDSig()
  -  The change made in ResInfo and SigBlock extension is not automatic;
 calling this method updates the original PICS1.1 Label and reflect
 the changes in resinfo and sigblock.
 
 getResInfo
getResInfo
 public ResInfoExtension getResInfo()
  -  Get the DSig Resource Information (resinfo).
 
 setResInfo
setResInfo
 public void setResInfo(ResInfoExtension resinfo)
  -  Set the DSig Resource Information (resinfo).
 
 getSigBlock
getSigBlock
 public SigBlockExtension getSigBlock()
  -  Get the DSig Signature Block (sigblock)
 
 setSigBlock
setSigBlock
 public void setSigBlock(SigBlockExtension sigblock)
  -  Set the DSig Signature Block (sigblock)
 
 sign
sign
 public void sign(SignatureSuite sigsuite,
                  PrivateKey privkey)
  -  Sign the label using the appropriate private key class 
 recognized by the signature suite. Signing automatically
 sets the ByName property to "[anonymous]", that should be
 set appropriately after signing. If this signature suite
 object already contains a signature, it will be replaced by
 the new one.
 
 verifyAll
verifyAll
 public Trivalue verifyAll()
  -  Verify the complete Signature Label. This will verify all
 message digests present in the resinfo and all signatures
 present in the sigblock. Therefore, this is a computationally
 rather expensive operation that is often not required. Still,
 this function is provided to allow verification with just one
 function call. For other methods to verify the label see
 the documentation.
 
 verify
verify
 public Trivalue verify()
  -  Verify the label using the user's default policy. Currently this
 is defined to be the same as verifyAll(), but this will change.
 
 getFor
getFor
 public String getFor()
  -  Return the URL specified in the 'for' option of this label
 or null if none is present.
 
 toExcludedDSigString
toExcludedDSigString
 public String toExcludedDSigString(Hashtable sigdata) throws DSigException
  -  Returns the canonicallized form of the DSig label with fields
 selectively included or excluded according the sigdata.  Please refer
 to the DSig Label specification for more detail.
   
- 
    -  Throws: DSigException
    
-  if the format of the sigdata is incorrect.
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index