1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package edu.internet2.middleware.shibboleth.common.xmlobject.impl;
19
20 import java.util.List;
21 import java.util.regex.Pattern;
22
23 import org.opensaml.xml.XMLObject;
24 import org.opensaml.xml.schema.XSBooleanValue;
25 import org.opensaml.xml.validation.AbstractValidatingXMLObject;
26
27 import edu.internet2.middleware.shibboleth.common.xmlobject.ShibbolethMetadataScope;
28
29
30
31
32 public class ShibbolethMetadataScopeImpl extends AbstractValidatingXMLObject implements ShibbolethMetadataScope {
33
34
35 private XSBooleanValue regexp;
36
37
38 private String scopeValue;
39
40
41 private Pattern matchPattern;
42
43
44
45
46
47
48
49
50 protected ShibbolethMetadataScopeImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
51 super(namespaceURI, elementLocalName, namespacePrefix);
52 regexp = null;
53 }
54
55
56 public Boolean getRegexp() {
57 if (regexp == null) {
58 return Boolean.FALSE;
59 }
60 return regexp.getValue();
61 }
62
63
64 public void setRegexp(Boolean newRegexp) {
65 if (newRegexp != null) {
66 regexp = prepareForAssignment(regexp, new XSBooleanValue(newRegexp, false));
67 } else {
68 regexp = prepareForAssignment(regexp, null);
69 }
70 }
71
72
73 public XSBooleanValue getRegexpXSBoolean() {
74 return regexp;
75 }
76
77
78 public void setRegexp(XSBooleanValue newRegexp) {
79 regexp = prepareForAssignment(regexp, newRegexp);
80 }
81
82
83 public String getValue() {
84 return scopeValue;
85 }
86
87
88 public void setValue(String newScopeValue) {
89 scopeValue = prepareForAssignment(scopeValue, newScopeValue);
90 matchPattern = Pattern.compile(scopeValue);
91 }
92
93
94 public Pattern getMatchPattern() {
95 return matchPattern;
96 }
97
98
99 public List<XMLObject> getOrderedChildren() {
100 return null;
101 }
102 }