1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xacml.ctx.impl;
18
19 import org.opensaml.xacml.ctx.AttributeValueType;
20 import org.opensaml.xacml.ctx.MissingAttributeDetailType;
21 import org.opensaml.xml.XMLObject;
22 import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller;
23 import org.opensaml.xml.io.UnmarshallingException;
24 import org.w3c.dom.Attr;
25
26
27 public class MissingAttributeDetailTypeUnmarshaller extends AbstractXMLObjectUnmarshaller {
28
29
30 public MissingAttributeDetailTypeUnmarshaller() {
31 super();
32 }
33
34
35
36
37
38
39
40
41
42 protected MissingAttributeDetailTypeUnmarshaller(String targetNamespaceURI, String targetLocalName) {
43 super(targetNamespaceURI, targetLocalName);
44 }
45
46
47 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
48 MissingAttributeDetailType madt = (MissingAttributeDetailType) xmlObject;
49
50 if (attribute.getLocalName().equals(MissingAttributeDetailType.ATTRIBUTE_ID_ATTRIB_NAME)) {
51 madt.setAttributeId(attribute.getValue());
52 } else if (attribute.getLocalName().equals(MissingAttributeDetailType.DATA_TYPE_ATTRIB_NAME)) {
53 madt.setDataType(attribute.getValue());
54 } else if (attribute.getLocalName().equals(MissingAttributeDetailType.ISSUER_ATTRIB_NAME)) {
55 madt.setIssuer(attribute.getValue());
56 }
57 }
58
59
60 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
61 throws UnmarshallingException {
62 MissingAttributeDetailType madt = (MissingAttributeDetailType) parentXMLObject;
63 if (childXMLObject instanceof AttributeValueType) {
64 madt.getAttributeValues().add((AttributeValueType) childXMLObject);
65 }
66 }
67
68
69 protected void processElementContent(XMLObject xmlObject, String elementContent) {
70 }
71 }