FileDocCategorySizeDatePackage
SignatureProperties.javaAPI DocJava SE 6 API4547Tue Jun 10 00:23:04 BST 2008com.sun.org.apache.xml.internal.security.signature

SignatureProperties

public class SignatureProperties extends SignatureElementProxy
Handles <ds:SignatureProperties> elements This Element holds {@link SignatureProperty} that contian additional information items concerning the generation of the signature. for example, data-time stamp, serial number of cryptographic hardware.
author
Christian Geuer-Pollmann

Fields Summary
static Logger
log
{@link java.util.logging} logging facility
Constructors Summary
public SignatureProperties(Document doc)
Constructor SignatureProperties

param
doc


           
      

      super(doc);

      XMLUtils.addReturnToElement(this._constructionElement);
   
public SignatureProperties(Element element, String BaseURI)
Constructs {@link SignatureProperties} from {@link Element}

param
element SignatureProperties elementt
param
BaseURI the URI of the resource where the XML instance was stored
throws
XMLSecurityException

      super(element, BaseURI);
   
Methods Summary
public voidaddSignatureProperty(com.sun.org.apache.xml.internal.security.signature.SignatureProperty sp)
Method addSignatureProperty

param
sp

      this._constructionElement.appendChild(sp.getElement());
      XMLUtils.addReturnToElement(this._constructionElement);
   
public java.lang.StringgetBaseLocalName()

inheritDoc

      return Constants._TAG_SIGNATUREPROPERTIES;
   
public java.lang.StringgetId()
Returns the Id attribute

return
the Id attribute

      return this._constructionElement.getAttributeNS(null, Constants._ATT_ID);
   
public intgetLength()
Return the nonnegative number of added SignatureProperty elements.

return
the number of SignatureProperty elements

      
         Element[] propertyElems =
            XMLUtils.selectDsNodes(this._constructionElement,
                                     Constants._TAG_SIGNATUREPROPERTY
                                    );

         return propertyElems.length;
   
public com.sun.org.apache.xml.internal.security.signature.SignaturePropertyitem(int i)
Return the ith SignatureProperty. Valid i values are 0 to {link@ getSize}-1.

param
i Index of the requested {@link SignatureProperty}
return
the ith SignatureProperty
throws
XMLSignatureException

   	  try {
         Element propertyElem =
            XMLUtils.selectDsNode(this._constructionElement, 
                                 Constants._TAG_SIGNATUREPROPERTY, 
                                 i );

         if (propertyElem == null) {
            return null;
         } 
         return new SignatureProperty(propertyElem, this._baseURI);               
      } catch (XMLSecurityException ex) {
         throw new XMLSignatureException("empty", ex);
      }
   
public voidsetId(java.lang.String Id)
Sets the Id attribute

param
Id the Id attribute


      if ((this._state == MODE_SIGN) && (Id != null)) {
         this._constructionElement.setAttributeNS(null, Constants._ATT_ID, Id);
         IdResolver.registerElementById(this._constructionElement, Id);
      }