1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.soap.common;
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.xml.AttributeExtensibleXMLObject;
26 import org.opensaml.xml.ElementExtensibleXMLObject;
27 import org.opensaml.xml.XMLObject;
28 import org.opensaml.xml.util.AttributeMap;
29 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
30 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
31
32
33
34
35 public class AbstractExtensibleSOAPObject extends AbstractValidatingXMLObject implements SOAPObject,
36 AttributeExtensibleXMLObject, ElementExtensibleXMLObject {
37
38
39 private IndexedXMLObjectChildrenList<XMLObject> unknownXMLObjects;
40
41
42 private AttributeMap attributes;
43
44
45
46
47
48
49
50
51 protected AbstractExtensibleSOAPObject(String namespaceURI, String elementLocalName, String namespacePrefix) {
52 super(namespaceURI, elementLocalName, namespacePrefix);
53 attributes = new AttributeMap(this);
54 unknownXMLObjects = new IndexedXMLObjectChildrenList<XMLObject>(this);
55 }
56
57
58 public List<XMLObject> getOrderedChildren() {
59 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
60
61 children.addAll(unknownXMLObjects);
62
63 return Collections.unmodifiableList(children);
64 }
65
66
67 public List<XMLObject> getUnknownXMLObjects() {
68 return unknownXMLObjects;
69 }
70
71
72 public List<XMLObject> getUnknownXMLObjects(QName typeOrName) {
73 return (List<XMLObject>) unknownXMLObjects.subList(typeOrName);
74 }
75
76
77 public AttributeMap getUnknownAttributes() {
78 return attributes;
79 }
80 }