src/pyams_thesaurus/thesaurus.py
changeset 55 0673948d936e
parent 32 d3f76ee1af66
child 56 866affb740b3
equal deleted inserted replaced
54:e840b30e8b15 55:0673948d936e
   289 class ThesaurusExtractsContainer(BTreeContainer):
   289 class ThesaurusExtractsContainer(BTreeContainer):
   290     """Thesaurus extracts container"""
   290     """Thesaurus extracts container"""
   291 
   291 
   292 
   292 
   293 @adapter_config(context=IThesaurus, provides=IThesaurusExtracts)
   293 @adapter_config(context=IThesaurus, provides=IThesaurusExtracts)
   294 def ThesaurusExtractsFactory(context):
   294 def thesaurus_extracts_factory(context):
   295     """Thesaurus extracts factory"""
   295     """Thesaurus extracts factory"""
   296     annotations = IAnnotations(context)
   296     annotations = IAnnotations(context)
   297     extracts = annotations.get(THESAURUS_EXTRACTS_KEY)
   297     extracts = annotations.get(THESAURUS_EXTRACTS_KEY)
   298     if extracts is None:
   298     if extracts is None:
   299         extracts = annotations[THESAURUS_EXTRACTS_KEY] = ThesaurusExtractsContainer()
   299         extracts = annotations[THESAURUS_EXTRACTS_KEY] = ThesaurusExtractsContainer()