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