public class EncryptionPropertyImpl extends XencDOMStructure implements EncryptionProperty
EncryptionProperty element that
supports the DOM XML representation and processing mechanism.DOMStructure.NodeWrapper| Modifier and Type | Field and Description |
|---|---|
protected Map |
attributes_
A map of attributes from the XML-Namespace.
|
protected List |
content_
The content.
|
protected String |
id_
The
Id-attribute value. |
protected String |
target_
The
Target-attribute value. |
implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALED| Constructor and Description |
|---|
EncryptionPropertyImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
EncryptionPropertyImpl with the
specified context and node to unmarshal from. |
EncryptionPropertyImpl(List content,
String target,
String id,
Map attributes)
Creates a new instance of this
EncryptionPropertyImpl with the
specified list of XMLStructures, Id-attribute value,
Target-attribute value and map of attributes. |
| Modifier and Type | Method and Description |
|---|---|
Map |
getAttributes()
Returns an unmodifiable map of attributes from the XML namespace, where the
keys are the name of the attributes (ex:
space,
lang, base). |
protected List |
getChildStructures()
Returns the list of child structures of this
DOMStructure. |
List |
getContent()
Returns an unmodifiable list of
XMLStructures. |
String |
getId()
Returns the optional ID
|
String |
getLocalName()
Returns the local name of the represented XML element.
|
String |
getTarget()
Returns the target URI of the
EncryptedType structure that
this property describes. |
protected void |
marshalAttributes(DOMCryptoContext context,
Element parent)
Marshals the XML representation of all
Attributes
represented by this DOMStrucuture. |
protected Attr |
marshalIDAttribute(DOMCryptoContext context,
Element parent)
Marshals the XML representation of an optional
Id-attribute
represented by this DOMStructure. |
protected void |
putChildStructure(DOMStructure childStructure)
Put an unmarshalled child structure.
|
protected void |
unmarshalAttributes(NamedNodeMap attributes,
DOMCryptoContext context)
Unmarshal the given
attributes. |
protected void |
unmarshalStructures(NodeList nodes,
DOMCryptoContext context)
Unmarshals
DOMStructures from the given nodes. |
getNamespace, initaddBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshal, marshalElement, newIDforLookUp, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, toString, unmarshal, unmarshalElement, unmarshalIDAttribute, wrapNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFeatureSupportedprotected List content_
null)protected String id_
Id-attribute value.protected String target_
Target-attribute value.protected Map attributes_
null)public EncryptionPropertyImpl(DOMCryptoContext context, Node node) throws MarshalException
EncryptionPropertyImpl with the
specified context and node to unmarshal from.context - the contextnode - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingpublic EncryptionPropertyImpl(List content, String target, String id, Map attributes)
EncryptionPropertyImpl with the
specified list of XMLStructures, Id-attribute value,
Target-attribute value and map of attributes.content - a list of XMLStructurestarget - the Target-attribute value (may be null)id - the Id-attribute value (may be null)attributes - a map of attributes from the XML namespace (may be null
or empty)NullPointerException - if content is nullIllegalArgumentException - if content is empty or one of the attributes is not
from the XML namespaceClassCastException - if content contains any entries that are not of type
XMLStructurepublic String getLocalName()
DOMStructuregetLocalName in class DOMStructureDOMStructure.getLocalName()public Map getAttributes()
javax.xml.crypto.enc.EncryptionPropertyspace,
lang, base).getAttributes in interface EncryptionPropertynull).EncryptionProperty.getAttributes()public List getContent()
javax.xml.crypto.enc.EncryptionPropertyXMLStructures.getContent in interface EncryptionPropertyXMLStructures (never
null or empty)EncryptionProperty.getContent()public String getTarget()
javax.xml.crypto.enc.EncryptionPropertyEncryptedType structure that
this property describes.getTarget in interface EncryptionPropertynull if not specifiedEncryptionProperty.getTarget()public String getId()
javax.xml.crypto.enc.EncryptionPropertygetId in interface EncryptionPropertynull if not specified.EncryptionProperty.getId()protected void marshalAttributes(DOMCryptoContext context, Element parent) throws MarshalException
DOMStructureAttributes
represented by this DOMStrucuture.
This method is called by DOMStructure.marshal(DOMCryptoContext, Node, Node).
If no namespace prefix is set in the context for the namespace
of the Element represented by this DOMStructure an
namespace declaration is marshaled and returned. Otherwise, an empty list
is returned.
A subclass has to overwrite this method in order to marshal any additional attributes.
marshalAttributes in class DOMStructurecontext - the marshal contextparent - the element is the parent of the attribute node created however, an
the attribute node is not a child of it's parent element. see XPath.MarshalException - if an exception occurs during marshalingDOMStructure.marshalAttributes(DOMCryptoContext,
Element)protected Attr marshalIDAttribute(DOMCryptoContext context, Element parent)
DOMStructureId-attribute
represented by this DOMStructure.
This method is called by DOMStructure.marshal(DOMCryptoContext, Node, Node).
A subclass has to overwrite this method in order to marshal an
Id-attribute.
marshalIDAttribute in class DOMStructurecontext - the marshal contextparent - the element is the parent of the attribute node created however, an
the attribute node is not a child of it's parent element. see XPath.Id-attribute if any, otherwise
nullDOMStructure.marshalIDAttribute(DOMCryptoContext,
Element)protected void unmarshalAttributes(NamedNodeMap attributes, DOMCryptoContext context) throws MarshalException
DOMStructureattributes.
This method is called by DOMStructure.unmarshal(DOMCryptoContext).
A subclass has to overwrite this method to perform any special unmarshaling required.
unmarshalAttributes in class DOMStructureattributes - the Attributes to unmarshalcontext - the marshal contextMarshalException - if an exception occurs during unmarshalingDOMStructure.unmarshalAttributes(org.w3c.dom.NamedNodeMap,
DOMCryptoContext)protected List getChildStructures()
DOMStructureDOMStructure.
This method is called by DOMStructure.marshal(DOMCryptoContext, Node, Node).
A subclass has to overwrite this method to return a list of
DOMStrucutres represented by this subclass.
getChildStructures in class DOMStructureDOMStructures (may be empty, but never
null)DOMStructure.getChildStructures()protected void putChildStructure(DOMStructure childStructure) throws MarshalException
DOMStructure
This method is called by
DOMStructure.unmarshalStructures(NodeList, DOMCryptoContext) for every
unmarshalled child structure.
A subclass has to overwrite this method to store the given child structure in its the corresponding field.
putChildStructure in class DOMStructurechildStructure - the unmarshalled child structureMarshalExceptionDOMStructure.putChildStructure(iaik.xml.crypto.dom.DOMStructure)protected void unmarshalStructures(NodeList nodes, DOMCryptoContext context) throws MarshalException
DOMStructureDOMStructures from the given nodes.
This method is called by DOMStructure.unmarshal(DOMCryptoContext).
This method calls DOMStructure.getInstance(Node, DOMCryptoContext) for every
Element in the list of nodes. If
DOMStructure.getInstance(Node, DOMCryptoContext) returns a
DOMStructure DOMStructure.putChildStructure(DOMStructure) is
called with the returned DOMStructure as parameter.
unmarshalStructures in class DOMStructurenodes - the nodes to unmarshal fromcontext - the marshal contextMarshalException - if an exception occurs during marshalingDOMStructure.unmarshalStructures(org.w3c.dom.NodeList,
DOMCryptoContext)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC