public final class DOMXMLObject extends DOMStructure implements XMLObject
Constructor and Description |
---|
DOMXMLObject(Element objElem,
XMLCryptoContext context,
Provider provider)
Creates an
XMLObject from an element. |
DOMXMLObject(List<? extends XMLStructure> content,
String id,
String mimeType,
String encoding)
Creates an
XMLObject from the specified parameters. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List |
getContent()
Returns an
unmodifiable
list of XMLStructure s contained in this XMLObject ,
which represent elements from any namespace. |
String |
getEncoding()
Returns the encoding URI of this
XMLObject . |
String |
getId()
Returns the Id of this
XMLObject . |
String |
getMimeType()
Returns the mime type of this
XMLObject . |
int |
hashCode() |
void |
marshal(Node parent,
String dsPrefix,
DOMCryptoContext context) |
isFeatureSupported
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFeatureSupported
public DOMXMLObject(List<? extends XMLStructure> content, String id, String mimeType, String encoding)
XMLObject
from the specified parameters.content
- a list of XMLStructure
s. 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
)ClassCastException
- if content
contains any
entries that are not of type XMLStructure
public DOMXMLObject(Element objElem, XMLCryptoContext context, Provider provider) throws MarshalException
XMLObject
from an element.objElem
- an Object elementMarshalException
- if there is an error when unmarshallingpublic List getContent()
XMLObject
unmodifiable
list
of XMLStructure
s contained in this XMLObject
,
which represent elements from any namespace.
If there is a public subclass representing the type of
XMLStructure
, it is returned as an instance of that class
(ex: a SignatureProperties
element would be returned
as an instance of SignatureProperties
).
getContent
in interface XMLObject
XMLStructure
s (may be empty
but never null
)public String getId()
XMLObject
XMLObject
.public String getMimeType()
XMLObject
XMLObject
. The
mime type is an optional attribute which describes the data within this
XMLObject
(independent of its encoding).getMimeType
in interface XMLObject
null
if not specified)public String getEncoding()
XMLObject
XMLObject
. The encoding
URI identifies the method by which the object is encoded.getEncoding
in interface XMLObject
null
if not specified)public void marshal(Node parent, String dsPrefix, DOMCryptoContext context) throws MarshalException
marshal
in class DOMStructure
MarshalException
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.