Class EnvelopedXmlObject

java.lang.Object
xades4j.properties.DataObjectDesc
xades4j.production.EnvelopedXmlObject

public final class EnvelopedXmlObject extends DataObjectDesc
Represents content (usually XML) that will be enveloped in the signature. Each instance of this class will result in a ds:Object in the final XAdES signature, which will contain the data. Also, this Object will be covered by a ds:Reference so that it is actually included in the signature.

If one wants to add content other than XML, a text node can be used.

Author:
Luís
See Also:
  • Constructor Details

    • EnvelopedXmlObject

      public EnvelopedXmlObject(Node content)
      Creates a new instance with the given context.
      Parameters:
      content - the XML content
      Throws:
      NullPointerException - if content is null
    • EnvelopedXmlObject

      public EnvelopedXmlObject(Node content, String mimeType, String encoding)
      Creates a new instance with the given content, mime type and encoding.
      Parameters:
      content - the XML content
      mimeType - the mime type of the content (may be null)
      encoding - the encoding of the content (may be null)
      Throws:
      NullPointerException - if content is null
  • Method Details

    • getEncoding

      public String getEncoding()
      Gets the encoding of the content.
      Returns:
      the enconding or null if not specified
    • getMimeType

      public String getMimeType()
      Gets the mime type of the content.
      Returns:
      the mime type or null if not specified