@Test public void testWalker() { AssociationWalker twalker = new AssociationWalker(at_descendant_of, rt_descendant, rt_ancestor); Set ancestors = twalker.walkTopics(bart); Assert.assertTrue("Expecting 2 members of association set. Got: " + String.valueOf(ancestors.size()), ancestors.size() == 2); }
public Set<TopicIF> walkTopics(TopicIF start) { WalkerState state = walk(start, false); return Collections.unmodifiableSet(state.closure); }
AssociationWalker { public Set<TopicIF> walkTopics(TopicIF start) { WalkerState state = walk(start, false); return Collections.unmodifiableSet(state.closure); } }
AssociationWalker { public Set<TopicIF> walkTopics(TopicIF start) { WalkerState state = walk(start, false); return Collections.unmodifiableSet(state.closure); } AssociationWalker(TopicIF associationType, TopicIF leftRoleSpec, TopicIF rightRoleSpec);  AssociationWalker(DeciderIF<AssociationIF> assocDecider, DeciderIF<AssociationRoleIF> fromRoleDecider, DeciderIF<AssociationRoleIF> toRoleDecider); }
AssociationWalker { public Set<TopicIF> walkTopics(TopicIF start) { WalkerState state = walk(start, false); return Collections.unmodifiableSet(state.closure); } AssociationWalker(TopicIF associationType, TopicIF leftRoleSpec, TopicIF rightRoleSpec);  AssociationWalker(DeciderIF<AssociationIF> assocDecider, DeciderIF<AssociationRoleIF> fromRoleDecider, DeciderIF<AssociationRoleIF> toRoleDecider); Set<TopicIF> walkTopics(TopicIF start); Collection<List<TMObjectIF>> walkPaths(TopicIF start); boolean isAssociated(TopicIF start, TopicIF associated); void addListener(AssociationWalkerListenerIF listener); void removeListener(AssociationWalkerListenerIF listener); }
AssociationWalker { public Set<TopicIF> walkTopics(TopicIF start) { WalkerState state = walk(start, false); return Collections.unmodifiableSet(state.closure); } AssociationWalker(TopicIF associationType, TopicIF leftRoleSpec, TopicIF rightRoleSpec);  AssociationWalker(DeciderIF<AssociationIF> assocDecider, DeciderIF<AssociationRoleIF> fromRoleDecider, DeciderIF<AssociationRoleIF> toRoleDecider); Set<TopicIF> walkTopics(TopicIF start); Collection<List<TMObjectIF>> walkPaths(TopicIF start); boolean isAssociated(TopicIF start, TopicIF associated); void addListener(AssociationWalkerListenerIF listener); void removeListener(AssociationWalkerListenerIF listener);  }