Changeset 15:58357a4b86de in AnnotationManagerN4J for src/main/java/de/mpiwg/itgroup/annotations/Actor.java
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/de/mpiwg/itgroup/annotations/Actor.java
r14 r15 4 4 package de.mpiwg.itgroup.annotations; 5 5 6 import de.mpiwg.itgroup.annotations.neo4j.AnnotationStore; 6 7 import de.mpiwg.itgroup.annotations.old.NS; 7 8 … … 22 23 23 24 /** 24 * Returns if this Actor is equivalent to an Actor with this id. If this is25 * Returns if this Actor is equivalent to Person person. If this is 25 26 * a Group returns true when the Person is in the Group. 26 27 * 27 * @param userId 28 * @param person 29 * @param store AnnotationStore to check group membership 28 30 * @return 29 31 */ 30 public boolean isEquivalentWith( String userId) {31 if ( userId== null) return false;32 if ( userId.equals(getIdString())) {32 public boolean isEquivalentWith(Person person, AnnotationStore store) { 33 if (person == null) return false; 34 if (person.equals(getIdString())) { 33 35 return true; 34 36 } 35 if (isGroup()) { 36 // TODO: check if person in group 37 if (isGroup() && store != null) { 38 // check if person in group 39 return store.isPersonInGroup(person, (Group) this); 37 40 } 38 41 return false;
Note: See TracChangeset
for help on using the changeset viewer.