14 package cz.vutbr.fit.knot.annotations.comet;
24 private String
type = null;
26 private String
user = null;
28 private String
uri = null;
38 if (type != null && type.length() > 0) {
41 if (user != null && user.length() > 0) {
44 if (uri != null && uri.length() > 0) {
84 StringBuilder re =
new StringBuilder(wildStr.length());
85 int wL = wildStr.length();
87 for (
int i = 0; i < wL; i++) {
88 char c = wildStr.charAt(i);
93 case '(':
case ')':
case '[':
case ']':
case '{':
case '}':
94 case '^':
case '$':
case '.':
case '+':
case '|':
case '\\':
105 return(re.toString());
118 if (this.type != null)
121 if (this.user != null)
122 if (!this.user.equals(user))
124 if (this.uri != null)
125 if (!this.uri.equals(uri) && uri != null)
139 if (
this == obj)
return true;
142 if (su.
getType() != null && this.type != null)
143 if (!su.
getType().equals(this.type))
145 if (su.
getUser() != null && this.user != null)
146 if (!su.
getUser().equals(this.user))
148 if (su.
getUri() != null && this.uri != null)
149 if (!su.
getUri().equals(this.uri))
155 if ((su.
getUri() != null) && (this.
uri == null))
161 if ((su.
getUri() == null) && (this.
uri != null))
174 hash = 47 * hash + (this.type != null ? this.type.hashCode() : 0);
175 hash = 47 * hash + (this.user != null ? this.user.hashCode() : 0);
176 hash = 47 * hash + (this.uri != null ? this.uri.hashCode() : 0);
static String wildcardToRegex(String wildStr)
boolean matches(String type, String user, String uri)
SubscribedSource(String type, String user, String uri)
Subscribed source of annotations.
boolean equals(Object obj)