1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.wssecurity.impl;
18
19
20 import org.opensaml.ws.wssecurity.KeyIdentifier;
21 import org.opensaml.xml.XMLObject;
22 import org.opensaml.xml.io.MarshallingException;
23 import org.opensaml.xml.util.DatatypeHelper;
24 import org.w3c.dom.Element;
25
26
27
28
29
30 public class KeyIdentifierMarshaller extends EncodedStringMarshaller {
31
32
33 protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
34 KeyIdentifier keyIdentifier = (KeyIdentifier) xmlObject;
35 if (!DatatypeHelper.isEmpty(keyIdentifier.getValueType())) {
36 domElement.setAttributeNS(null, KeyIdentifier.ENCODING_TYPE_ATTRIB_NAME, keyIdentifier.getValueType());
37 }
38 super.marshallAttributes(xmlObject, domElement);
39 }
40
41 }