1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package edu.internet2.middleware.shibboleth.common.xmlobject.impl;
19
20 import org.opensaml.xml.XMLObject;
21 import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller;
22 import org.opensaml.xml.io.UnmarshallingException;
23 import org.opensaml.xml.util.DatatypeHelper;
24 import org.w3c.dom.Attr;
25
26 import edu.internet2.middleware.shibboleth.common.xmlobject.ShibbolethScopedValue;
27
28
29
30
31 public class ShibbolethScopedValueUnmarshaller extends AbstractXMLObjectUnmarshaller {
32
33
34 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
35 throws UnmarshallingException {
36
37 }
38
39
40 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
41 ShibbolethScopedValue sv = (ShibbolethScopedValue) xmlObject;
42
43 if (DatatypeHelper.isEmpty(sv.getScopeAttributeName())) {
44 sv.setScopeAttributeName(attribute.getName());
45 sv.setScope(attribute.getValue());
46 }
47
48 }
49
50
51 protected void processElementContent(XMLObject xmlObject, String elementContent) {
52 ShibbolethScopedValue sv = (ShibbolethScopedValue) xmlObject;
53
54 sv.setValue(elementContent);
55 }
56 }