1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.internet2.middleware.shibboleth.wayf.idpdisco;
18
19 import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller;
20 import org.opensaml.xml.XMLObject;
21 import org.opensaml.xml.io.UnmarshallingException;
22
23
24
25
26 public class DiscoHintsUnmarshaller extends AbstractSAMLObjectUnmarshaller {
27
28
29 protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
30 throws UnmarshallingException {
31 DiscoHints info = (DiscoHints) parentSAMLObject;
32
33 if (childSAMLObject instanceof IPHint) {
34 info.getIPHints().add((IPHint) childSAMLObject);
35 } else if (childSAMLObject instanceof DomainHint) {
36 info.getDomainHints().add((DomainHint) childSAMLObject);
37 } else if (childSAMLObject instanceof GeolocationHint) {
38 info.getGeolocationHints().add((GeolocationHint) childSAMLObject);
39 } else {
40 super.processChildElement(parentSAMLObject, childSAMLObject);
41 }
42 }
43
44 }