1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xml.signature.impl;
18
19 import org.opensaml.xml.XMLObject;
20 import org.opensaml.xml.io.UnmarshallingException;
21 import org.opensaml.xml.signature.KeyInfoType;
22 import org.w3c.dom.Attr;
23
24
25
26
27 public class KeyInfoTypeUnmarshaller extends AbstractXMLSignatureUnmarshaller {
28
29
30 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
31 KeyInfoType keyInfo = (KeyInfoType) xmlObject;
32
33 if (attribute.getLocalName().equals(KeyInfoType.ID_ATTRIB_NAME)) {
34 keyInfo.setID(attribute.getValue());
35 attribute.getOwnerElement().setIdAttributeNode(attribute, true);
36 } else {
37 super.processAttribute(xmlObject, attribute);
38 }
39 }
40
41
42 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
43 throws UnmarshallingException {
44 KeyInfoType keyInfo = (KeyInfoType) parentXMLObject;
45
46
47
48
49 keyInfo.getXMLObjects().add(childXMLObject);
50 }
51
52 }