Пример #1
0
 def get_keywords_index(self):
     if self.keywords:
         results = [normal_kw(i[1]) for i in self.keywords]
         results.sort()
         return results
     else:
         return []
Пример #2
0
def CmetaKeywordProvider(context):
    try:
        note = zope.component.queryAdapter(context, name='cmeta')
    except TypeError:
        return []
    if not (note and note.keywords):
        return []
    results = [normal_kw(i[1]) for i in note.keywords]
    results.sort()
    return results
Пример #3
0
def cmeta_citation_title_keyword(context):
    note = zope.component.queryAdapter(context, name='cmeta')
    if not (note and note.citation_title):
        return []
    return [normal_kw(i) for i in note.citation_title.split()]
Пример #4
0
def pmr2_citation_title(context):
    note = zope.component.queryAdapter(context, name='cmeta')
    if not (note and note.citation_title):
        return []
    return normal_kw(note.citation_title)
Пример #5
0
def pmr2_authors_family_name(context):
    note = zope.component.queryAdapter(context, name='cmeta')
    if not (note and note.citation_authors):
        return []
    return [normal_kw(i[0]) for i in note.citation_authors]
Пример #6
0
 def get_citation_title_index(self):
     if self.citation_title:
         return normal_kw(self.citation_title)
Пример #7
0
 def get_authors_family_index(self):
     if self.citation_authors:
         return [normal_kw(i[0]) 
                 for i in self.citation_authors]
     else:
         return []