- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMXMLObject
-
- All Implemented Interfaces:
XMLObject,XMLStructure
public final class DOMXMLObject extends DOMStructure implements XMLObject
DOM-based implementation of XMLObject.
-
-
Constructor Summary
Constructors Constructor Description DOMXMLObject(List<? extends XMLStructure> content, String id, String mimeType, String encoding)Creates anXMLObjectfrom the specified parameters.DOMXMLObject(Element objElem, XMLCryptoContext context, Provider provider)Creates anXMLObjectfrom an element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<XMLStructure>getContent()StringgetEncoding()StringgetId()StringgetMimeType()inthashCode()voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
equalsContent, isFeatureSupported
-
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(List<? extends XMLStructure> content, String id, String mimeType, String encoding)
Creates anXMLObjectfrom the specified parameters.- Parameters:
content- a list ofXMLStructures. The list is defensively copied to protect against subsequent modification. May benullor empty.id- the Id (may benull)mimeType- the mime type (may benull)encoding- the encoding (may benull)- Throws:
ClassCastException- ifcontentcontains any entries that are not of typeXMLStructure
-
DOMXMLObject
public DOMXMLObject(Element objElem, XMLCryptoContext context, Provider provider) throws MarshalException
Creates anXMLObjectfrom an element.- Parameters:
objElem- an Object element- Throws:
MarshalException- if there is an error when unmarshalling
-
-
Method Detail
-
getContent
public List<XMLStructure> getContent()
- Specified by:
getContentin interfaceXMLObject
-
getMimeType
public String getMimeType()
- Specified by:
getMimeTypein interfaceXMLObject
-
getEncoding
public String getEncoding()
- Specified by:
getEncodingin interfaceXMLObject
-
marshal
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
-