1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xml.schema.impl;
18
19 import java.util.Collections;
20 import java.util.List;
21
22 import javax.xml.namespace.QName;
23
24 import org.opensaml.xml.XMLObject;
25 import org.opensaml.xml.schema.XSAny;
26 import org.opensaml.xml.util.AttributeMap;
27 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
28 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
29
30
31
32
33 public class XSAnyImpl extends AbstractValidatingXMLObject implements XSAny {
34
35
36 private IndexedXMLObjectChildrenList<XMLObject> unknownXMLObjects;
37
38
39 private AttributeMap unknownAttributes;
40
41
42 private String textContent;
43
44
45
46
47
48
49
50
51 protected XSAnyImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
52 super(namespaceURI, elementLocalName, namespacePrefix);
53
54 unknownXMLObjects = new IndexedXMLObjectChildrenList<XMLObject>(this);
55 unknownAttributes = new AttributeMap(this);
56 }
57
58
59 public String getTextContent() {
60 return textContent;
61 }
62
63
64 public void setTextContent(String newContent) {
65 textContent = prepareForAssignment(textContent, newContent);
66 }
67
68
69 public List<XMLObject> getUnknownXMLObjects() {
70 return unknownXMLObjects;
71 }
72
73
74 public List<XMLObject> getUnknownXMLObjects(QName typeOrName) {
75 return (List<XMLObject>) unknownXMLObjects.subList(typeOrName);
76 }
77
78
79 public List<XMLObject> getOrderedChildren() {
80 return Collections.unmodifiableList(unknownXMLObjects);
81 }
82
83
84 public AttributeMap getUnknownAttributes() {
85 return unknownAttributes;
86 }
87 }