class AppleEntitySink(AEntitySink): def __init__(self, options): AEntitySink.__init__(self, "AppleEntitySink") self.stampedAPI = MongoStampedAPI() self.matcher = AppleEntityMatcher(self.stampedAPI, options) def _processItem(self, item): assert isinstance(item, Entity) #utils.log("merging item %s" % (item.title, )) self.matcher.addOne(item, override=True) def _processItems(self, items): for item in items: self._processItem(item)
def __init__(self, options): AEntitySink.__init__(self, "AppleEntitySink") self.stampedAPI = MongoStampedAPI() self.matcher = AppleEntityMatcher(self.stampedAPI, options)