Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/Actor.java @ 103:f83eb8b335b1
fix problem with anonymous being different.
| author | casties |
|---|---|
| date | Thu, 09 Feb 2017 21:17:04 +0100 |
| parents | b406507a953d |
| children |
comparison
equal
deleted
inserted
replaced
| 102:9140017e8962 | 103:f83eb8b335b1 |
|---|---|
| 52 * @return | 52 * @return |
| 53 */ | 53 */ |
| 54 public boolean isEquivalentWith(Person person, AnnotationStore store) { | 54 public boolean isEquivalentWith(Person person, AnnotationStore store) { |
| 55 if (person == null) return false; | 55 if (person == null) return false; |
| 56 if (person.equals(this)) return true; | 56 if (person.equals(this)) return true; |
| 57 if (person.getIdString().equals(this.getIdString())) return true; | 57 if (person.getIdString().equalsIgnoreCase(this.getIdString())) return true; |
| 58 if (isGroup() && store != null) { | 58 if (isGroup() && store != null) { |
| 59 // check if person in group | 59 // check if person in group |
| 60 if (person.groups != null) { | 60 if (person.groups != null) { |
| 61 // check person's groups | 61 // check person's groups |
| 62 if (person.groups.contains(this.id)) { | 62 if (person.groups.contains(this.id)) { |
| 146 prefix = BaseRestlet.GROUPS_URI_PREFIX; | 146 prefix = BaseRestlet.GROUPS_URI_PREFIX; |
| 147 } | 147 } |
| 148 if (uri != null && uri.startsWith(prefix)) { | 148 if (uri != null && uri.startsWith(prefix)) { |
| 149 id = uri.replace(prefix, ""); | 149 id = uri.replace(prefix, ""); |
| 150 } | 150 } |
| 151 if (id == null && uri != null) { | |
| 152 // accept uri without prefix | |
| 153 id = uri; | |
| 154 } | |
| 151 return id; | 155 return id; |
| 152 } | 156 } |
| 153 | 157 |
| 154 /** | 158 /** |
| 155 * Returns an uri from a short id. | 159 * Returns an uri from a short id. |
