I didn't understand the point of creating abstract base classes for
plugins. I am not strictly opposing it or anything, I just don't see
why it would make things simpler/more flexible. AFAICS, there is not
much an abstract base class can do but to pass the arguments of
assignScores to calculateScore/distributeScoreToOutlinks. I mean, here
is how I envision a ContentBasedScoringFilter class(or a
DistributingScoringFilter):

abstract class ContentBasedScoringFilter implements ScoringFilter {
  assignScores(args) { return calculateScore(args);  }
  protected abstract calculateScore(args);
}

Or do you have something else in mind?

Yes, something like that. But I also thought that if you don't want to repeat the logic of traversing through links (with all the logic which is now in ParseOutputFormat), that logic could be in an abstract class which would just traverse them and call an abstract function for each one.

Reply via email to