Class DOMXMLObject

  • All Implemented Interfaces:
    javax.xml.crypto.dsig.XMLObject, javax.xml.crypto.XMLStructure

    public final class DOMXMLObject
    extends BaseStructure
    implements javax.xml.crypto.dsig.XMLObject
    DOM-based implementation of XMLObject.
    Author:
    Sean Mullan
    • Field Summary

      • Fields inherited from interface javax.xml.crypto.dsig.XMLObject

        TYPE
    • Constructor Summary

      Constructors 
      Constructor Description
      DOMXMLObject​(java.util.List<? extends javax.xml.crypto.XMLStructure> content, java.lang.String id, java.lang.String mimeType, java.lang.String encoding)
      Creates an XMLObject from the specified parameters.
      DOMXMLObject​(org.w3c.dom.Element objElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)
      Creates an XMLObject from an element.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.List<javax.xml.crypto.XMLStructure> getContent()  
      java.lang.String getEncoding()  
      java.lang.String getId()  
      java.lang.String getMimeType()  
      static java.util.List<javax.xml.crypto.XMLStructure> getXmlObjectContent​(javax.xml.crypto.dsig.XMLObject xo)  
      int hashCode()  
      static void marshal​(XmlWriter xwriter, javax.xml.crypto.dsig.XMLObject xmlObj, java.lang.String dsPrefix, javax.xml.crypto.XMLCryptoContext context)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported
    • Constructor Detail

      • DOMXMLObject

        public DOMXMLObject​(java.util.List<? extends javax.xml.crypto.XMLStructure> content,
                            java.lang.String id,
                            java.lang.String mimeType,
                            java.lang.String encoding)
        Creates an XMLObject from the specified parameters.
        Parameters:
        content - a list of XMLStructures. The list is defensively copied to protect against subsequent modification. May be null or empty.
        id - the Id (may be null)
        mimeType - the mime type (may be null)
        encoding - the encoding (may be null)
        Throws:
        java.lang.ClassCastException - if content contains any entries that are not of type XMLStructure
      • DOMXMLObject

        public DOMXMLObject​(org.w3c.dom.Element objElem,
                            javax.xml.crypto.XMLCryptoContext context,
                            java.security.Provider provider)
                     throws javax.xml.crypto.MarshalException
        Creates an XMLObject from an element.
        Parameters:
        objElem - an Object element
        Throws:
        javax.xml.crypto.MarshalException - if there is an error when unmarshalling
    • Method Detail

      • getContent

        public java.util.List<javax.xml.crypto.XMLStructure> getContent()
        Specified by:
        getContent in interface javax.xml.crypto.dsig.XMLObject
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface javax.xml.crypto.dsig.XMLObject
      • getMimeType

        public java.lang.String getMimeType()
        Specified by:
        getMimeType in interface javax.xml.crypto.dsig.XMLObject
      • getEncoding

        public java.lang.String getEncoding()
        Specified by:
        getEncoding in interface javax.xml.crypto.dsig.XMLObject
      • marshal

        public static void marshal​(XmlWriter xwriter,
                                   javax.xml.crypto.dsig.XMLObject xmlObj,
                                   java.lang.String dsPrefix,
                                   javax.xml.crypto.XMLCryptoContext context)
                            throws javax.xml.crypto.MarshalException
        Throws:
        javax.xml.crypto.MarshalException
      • getXmlObjectContent

        public static java.util.List<javax.xml.crypto.XMLStructure> getXmlObjectContent​(javax.xml.crypto.dsig.XMLObject xo)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object