xades4j.production
Class EnvelopedXmlObject

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

public final class EnvelopedXmlObject
extends DataObjectDesc

Represents content (tipically 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:
DataObjectDesc, DataObjectReference

Constructor Summary
EnvelopedXmlObject(Node content)
          Creates a new instance with the given context.
EnvelopedXmlObject(Node content, String mimeType, String encoding)
          Creates a new instance with the given content, mime type and encoding.
 
Method Summary
 String getEncoding()
          Gets the encoding of the content.
 String getMimeType()
          Gets the mime type of the content.
 
Methods inherited from class xades4j.properties.DataObjectDesc
getSignedDataObjProps, getTransforms, getUnsignedDataObjProps, hasProperties, withCommitmentType, withDataObjectFormat, withDataObjectTimeStamp, withDataObjectTimeStamp, withOtherDataObjectProperty, withOtherDataObjectProperty, withTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2012. All Rights Reserved.