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 java.util.ArrayList;
20 import java.util.Collections;
21 import java.util.List;
22
23 import javax.xml.namespace.QName;
24
25 import org.opensaml.common.impl.AbstractSAMLObject;
26 import org.opensaml.common.xml.SAMLConstants;
27 import org.opensaml.saml1.core.Assertion;
28 import org.opensaml.saml1.core.AssertionIDReference;
29 import org.opensaml.saml1.core.Evidence;
30 import org.opensaml.saml1.core.Evidentiary;
31 import org.opensaml.xml.XMLObject;
32 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
33
34
35
36
37 public class EvidenceImpl extends AbstractSAMLObject implements Evidence {
38
39
40 private final IndexedXMLObjectChildrenList<Evidentiary> evidence;
41
42
43
44
45
46
47
48
49 protected EvidenceImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
50 super(namespaceURI, elementLocalName, namespacePrefix);
51 evidence = new IndexedXMLObjectChildrenList<Evidentiary>(this);
52 }
53
54
55 public List<AssertionIDReference> getAssertionIDReferences() {
56 QName qname = new QName(SAMLConstants.SAML1_NS, AssertionIDReference.DEFAULT_ELEMENT_LOCAL_NAME);
57 return (List<AssertionIDReference>) evidence.subList(qname);
58 }
59
60
61 public List<Assertion> getAssertions() {
62 QName qname = new QName(SAMLConstants.SAML1_NS, Assertion.DEFAULT_ELEMENT_LOCAL_NAME);
63 return (List<Assertion>) evidence.subList(qname);
64 }
65
66
67 public List<Evidentiary> getEvidence() {
68 return evidence;
69 }
70
71
72 public List<XMLObject> getOrderedChildren() {
73 if (evidence.size() == 0) {
74 return null;
75 }
76
77 ArrayList<XMLObject> list = new ArrayList<XMLObject>();
78 list.addAll(evidence);
79
80 return Collections.unmodifiableList(list);
81 }
82 }