1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.wspolicy.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.ws.wspolicy.All;
26 import org.opensaml.ws.wspolicy.ExactlyOne;
27 import org.opensaml.ws.wspolicy.OperatorContentType;
28 import org.opensaml.ws.wspolicy.Policy;
29 import org.opensaml.ws.wspolicy.PolicyReference;
30 import org.opensaml.xml.XMLObject;
31 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
32
33
34
35
36 public class OperatorContentTypeImpl extends AbstractWSPolicyObject implements OperatorContentType {
37
38
39 private IndexedXMLObjectChildrenList<XMLObject> xmlObjects;
40
41
42
43
44
45
46
47
48 public OperatorContentTypeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
49 super(namespaceURI, elementLocalName, namespacePrefix);
50 xmlObjects = new IndexedXMLObjectChildrenList<XMLObject>(this);
51 }
52
53
54 public List<All> getAlls() {
55 return (List<All>) xmlObjects.subList(All.ELEMENT_NAME);
56 }
57
58
59 public List<ExactlyOne> getExactlyOnes() {
60 return (List<ExactlyOne>) xmlObjects.subList(ExactlyOne.ELEMENT_NAME);
61 }
62
63
64 public List<Policy> getPolicies() {
65 return (List<Policy>) xmlObjects.subList(Policy.ELEMENT_NAME);
66 }
67
68
69 public List<PolicyReference> getPolicyReferences() {
70 return (List<PolicyReference>) xmlObjects.subList(PolicyReference.ELEMENT_NAME);
71 }
72
73
74 public List<XMLObject> getXMLObjects() {
75 return xmlObjects;
76 }
77
78
79 public List<XMLObject> getXMLObjects(QName typeOrName) {
80 return (List<XMLObject>) xmlObjects.subList(typeOrName);
81 }
82
83
84 public List<XMLObject> getOrderedChildren() {
85 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
86 children.addAll(xmlObjects);
87 return Collections.unmodifiableList(children);
88 }
89
90 }