1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml1.core.impl;
18
19 import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller;
20 import org.opensaml.saml1.core.NameIdentifier;
21 import org.opensaml.saml1.core.Subject;
22 import org.opensaml.saml1.core.SubjectConfirmation;
23 import org.opensaml.xml.XMLObject;
24 import org.opensaml.xml.io.UnmarshallingException;
25
26
27
28
29 public class SubjectUnmarshaller extends AbstractSAMLObjectUnmarshaller {
30
31
32 protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
33 throws UnmarshallingException {
34
35 Subject subject = (Subject) parentSAMLObject;
36
37 if (childSAMLObject instanceof NameIdentifier) {
38 subject.setNameIdentifier((NameIdentifier) childSAMLObject);
39 } else if (childSAMLObject instanceof SubjectConfirmation) {
40 subject.setSubjectConfirmation((SubjectConfirmation) childSAMLObject);
41 } else {
42 super.processChildElement(parentSAMLObject, childSAMLObject);
43 }
44 }
45 }