Class DOMXMLObject
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.BaseStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMXMLObject
-
- All Implemented Interfaces:
XMLObject
,XMLStructure
public final class DOMXMLObject extends BaseStructure implements XMLObject
DOM-based implementation of XMLObject.- Author:
- Sean Mullan
-
-
Constructor Summary
Constructors Constructor Description DOMXMLObject(List<? extends XMLStructure> content, String id, String mimeType, String encoding)
Creates anXMLObject
from the specified parameters.DOMXMLObject(Element objElem, XMLCryptoContext context, Provider provider)
Creates anXMLObject
from an element.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<XMLStructure>
getContent()
String
getEncoding()
String
getId()
String
getMimeType()
static List<XMLStructure>
getXmlObjectContent(XMLObject xo)
int
hashCode()
static void
marshal(XmlWriter xwriter, XMLObject xmlObj, String dsPrefix, XMLCryptoContext context)
-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
-
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 anXMLObject
from the specified parameters.- Parameters:
content
- a list ofXMLStructure
s. The list is defensively copied to protect against subsequent modification. May benull
or empty.id
- the Id (may benull
)mimeType
- the mime type (may benull
)encoding
- the encoding (may benull
)- Throws:
ClassCastException
- ifcontent
contains any entries that are not of typeXMLStructure
-
DOMXMLObject
public DOMXMLObject(Element objElem, XMLCryptoContext context, Provider provider) throws MarshalException
Creates anXMLObject
from 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:
getContent
in interfaceXMLObject
-
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interfaceXMLObject
-
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interfaceXMLObject
-
marshal
public static void marshal(XmlWriter xwriter, XMLObject xmlObj, String dsPrefix, XMLCryptoContext context) throws MarshalException
- Throws:
MarshalException
-
getXmlObjectContent
public static List<XMLStructure> getXmlObjectContent(XMLObject xo)
-
-