Mercurial > hg > AnnotationManagerN4J
changeset 103:f83eb8b335b1
fix problem with anonymous being different.
author | casties |
---|---|
date | Thu, 09 Feb 2017 21:17:04 +0100 |
parents | 9140017e8962 |
children | e953327d66bb |
files | src/main/java/de/mpiwg/itgroup/annotations/Actor.java src/main/java/de/mpiwg/itgroup/annotations/Person.java |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/Actor.java Thu Feb 09 20:46:15 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/annotations/Actor.java Thu Feb 09 21:17:04 2017 +0100 @@ -54,7 +54,7 @@ public boolean isEquivalentWith(Person person, AnnotationStore store) { if (person == null) return false; if (person.equals(this)) return true; - if (person.getIdString().equals(this.getIdString())) return true; + if (person.getIdString().equalsIgnoreCase(this.getIdString())) return true; if (isGroup() && store != null) { // check if person in group if (person.groups != null) { @@ -148,6 +148,10 @@ if (uri != null && uri.startsWith(prefix)) { id = uri.replace(prefix, ""); } + if (id == null && uri != null) { + // accept uri without prefix + id = uri; + } return id; }
--- a/src/main/java/de/mpiwg/itgroup/annotations/Person.java Thu Feb 09 20:46:15 2017 +0100 +++ b/src/main/java/de/mpiwg/itgroup/annotations/Person.java Thu Feb 09 21:17:04 2017 +0100 @@ -99,7 +99,7 @@ * @return */ public static Person getAnonymous() { - return new Person("anonymous", "Anonymous"); + return new Person("anonymous", null, "Anonymous"); } /* (non-Javadoc)