Пример #1
0
 def _set_description(self, entity: wdi_core.WDItemEngine,
                      objct: LiteralElement) -> wdi_core.WDItemEngine:
     lang = get_lang_from_literal(objct)
     logging.debug("Setting description @%s of %s", lang, entity)
     entity.set_description(objct.content[:MAX_CHARACTERS_DESC], lang)
     return entity
Пример #2
0
 def _remove_description(self, entity: wdi_core.WDItemEngine,
                         objct: LiteralElement) -> wdi_core.WDItemEngine:
     lang = get_lang_from_literal(objct)
     logging.debug("Removing description @%s of %s", lang, entity)
     entity.set_description("", lang)
     return entity