1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.xml.signature.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.xml.XMLObject;
26 import org.opensaml.xml.signature.Transform;
27 import org.opensaml.xml.signature.XPath;
28 import org.opensaml.xml.util.IndexedXMLObjectChildrenList;
29 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
30
31
32
33
34 public class TransformImpl extends AbstractValidatingXMLObject implements Transform {
35
36 private String algorithm;
37
38 private final IndexedXMLObjectChildrenList indexedChildren;
39
40
41
42
43
44
45
46
47 protected TransformImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
48 super(namespaceURI, elementLocalName, namespacePrefix);
49 indexedChildren = new IndexedXMLObjectChildrenList<XMLObject>(this);
50 }
51
52
53 public String getAlgorithm() {
54 return this.algorithm;
55 }
56
57
58 public void setAlgorithm(String newAlgorithm) {
59 this.algorithm = prepareForAssignment(this.algorithm, newAlgorithm);
60 }
61
62
63 public List<XMLObject> getAllChildren() {
64 return (List<XMLObject>) indexedChildren ;
65 }
66
67
68 public List<XMLObject> getXMLObjects(QName typeOrName) {
69 return (List<XMLObject>) indexedChildren.subList(typeOrName);
70 }
71
72
73 public List<XPath> getXPaths() {
74 return (List<XPath>) indexedChildren.subList(XPath.DEFAULT_ELEMENT_NAME);
75 }
76
77
78 public List<XMLObject> getOrderedChildren() {
79 ArrayList<XMLObject> children = new ArrayList<XMLObject>();
80
81 children.addAll((List<XMLObject>) indexedChildren);
82
83 if (children.size() == 0) {
84 return null;
85 }
86
87 return Collections.unmodifiableList(children);
88 }
89
90 }