コード例 #1
0
 def getKeywords(self):
     ids = self.context.getKeywords()
     terms = getTerms('keywords', ids)
     return sorted([
         term['name'].get(self.current_language, None) for term in terms
         if term is not None
     ])
コード例 #2
0
ファイル: project.py プロジェクト: toutpt/cirb.relex
 def getThemes(self):
     ids = self.context.getThemes()
     terms = getTerms('theme', ids)
     return sorted([
         term['name'].get(self.current_language, None)
         for term in terms if term is not None
     ])
コード例 #3
0
 def getCountries(self):
     ids = self.context.getCountries()
     terms = getTerms('country', ids)
     return sorted([
         term['name'].get(self.current_language, None) for term in terms
         if term is not None
     ])
コード例 #4
0
 def getBrusselsPartners(self):
     ids = self.context.getBrusselspartners()
     terms = getTerms('brusselspartners', ids)
     return sorted([
         u'{0} {1}'.format(term['lastname'], term['firstname'])
         for term in terms if term is not None
     ])
コード例 #5
0
ファイル: project.py プロジェクト: makinacorpus/cirb.relex
 def getBrusselsPartners(self):
     ids = self.context.getBrusselspartners()
     terms = getTerms('brusselspartners', ids)
     return sorted([
         u'{0} {1}'.format(term['lastname'], term['firstname'])
         for term in terms if term is not None
     ])
コード例 #6
0
ファイル: relex_web.py プロジェクト: makinacorpus/cirb.relex
 def getKeywords(self, project):
     project = self.getFullProject(project)
     ids = project.getKeywords()
     terms = getTerms('keywords', ids)
     return [
         term['id']
         for term in terms if term is not None
     ]
コード例 #7
0
ファイル: relex_web.py プロジェクト: makinacorpus/cirb.relex
 def getRegions(self, project):
     project = self.getFullProject(project)
     ids = project.getRegions()
     terms = getTerms('region', ids)
     return [
         term['id']
         for term in terms if term is not None
     ]
コード例 #8
0
ファイル: relex_web.py プロジェクト: makinacorpus/cirb.relex
 def getCities(self, project):
     project = self.getFullProject(project)
     ids = project.getCities()
     terms = getTerms('city', ids)
     return [
         term['id']
         for term in terms if term is not None
     ]
コード例 #9
0
ファイル: relex_web.py プロジェクト: makinacorpus/cirb.relex
 def getContacts(self, project):
     project = self.getFullProject(project)
     ids = project.getContacts()
     terms = getTerms('contact', ids)
     return [
         u'{0} {1}'.format(term['lastname'], term['firstname'])
         for term in terms if term is not None
     ]
コード例 #10
0
 def getContacts(self, project):
     project = self.getFullProject(project)
     ids = project.getContacts()
     terms = getTerms('contact', ids)
     return [
         u'{0} {1}'.format(term['lastname'], term['firstname'])
         for term in terms if term is not None
     ]
コード例 #11
0
ファイル: relex_web.py プロジェクト: toutpt/cirb.relex
 def getKeywords(self, project):
     project = self.getFullProject(project)
     ids = project.getKeywords()
     terms = getTerms('keywords', ids)
     return [
         (
             term['id'], term['name']['en'],
             term['name']['fr'], term['name']['nl']
         )
         for term in terms if term is not None
     ]
コード例 #12
0
ファイル: relex_web.py プロジェクト: makinacorpus/cirb.relex
 def getPartners(self, project):
     project = self.getFullProject(project)
     ids = project.getBrusselspartners()
     contacts = getTerms('brusselspartners', ids)
     organisations = []
     for contact in contacts:
         orga = self.getContactOrganisation(contact)
         if orga and orga not in organisations:
             organisations.append(orga)
     #remove duplicates
     organisations = list(set(organisations))
     return organisations
コード例 #13
0
 def getPartners(self, project):
     project = self.getFullProject(project)
     ids = project.getBrusselspartners()
     contacts = getTerms('brusselspartners', ids)
     organisations = []
     for contact in contacts:
         orga = self.getContactOrganisation(contact)
         if orga and orga not in organisations:
             organisations.append(orga)
     #remove duplicates
     organisations = list(set(organisations))
     return organisations
コード例 #14
0
ファイル: project.py プロジェクト: toutpt/cirb.relex
 def getBrusselsPartners(self):
     ids = self.context.getBrusselspartners()
     terms = getTerms('brusselspartners', ids)
     terms = [term for term in terms if term is not None]
     for term in terms:
         for id in ('organisation', 'cell'):
             term[id] = getTerm(id, term[id])
         if term['organisation'] is not None:
             term['organisation'] = term['organisation']['name']\
                 .get(self.current_language, '')
         if term['cell'] is not None:
             term['cell'] = term['cell']['description']\
                 .get(self.current_language, '')
     return terms
コード例 #15
0
 def getContacts(self):
     ids = self.context.getContacts()
     terms = getTerms('contact', ids)
     terms = [term for term in terms if term is not None]
     for term in terms:
         for id in ('organisation', 'cell', 'function'):
             term[id] = getTerm(id, term[id])
         if term['organisation'] is not None:
             term['organisation'] = term['organisation']['name']\
                 .get(self.current_language, '')
         if term['cell'] is not None:
             term['cell'] = term['cell']['description']\
                 .get(self.current_language, '')
         if term['function'] is not None:
             term['function'] = term['function']['code']\
                 .get(self.current_language, '')
     return terms
コード例 #16
0
ファイル: project.py プロジェクト: toutpt/cirb.relex
 def getContacts(self):
     ids = self.context.getContacts()
     terms = getTerms('contact', ids)
     terms = [term for term in terms if term is not None]
     for term in terms:
         for id in ('organisation', 'cell', 'function'):
             term[id] = getTerm(id, term[id])
         if term['organisation'] is not None:
             term['organisation'] = term['organisation']['name']\
                 .get(self.current_language, '')
         if term['cell'] is not None:
             term['cell'] = term['cell']['description']\
                 .get(self.current_language, '')
         if term['function'] is not None:
             term['function'] = term['function']['code']\
                 .get(self.current_language, '')
     return terms
コード例 #17
0
 def getKeywords(self, project):
     project = self.getFullProject(project)
     ids = project.getKeywords()
     terms = getTerms('keywords', ids)
     return [term['id'] for term in terms if term is not None]
コード例 #18
0
 def getRegions(self, project):
     project = self.getFullProject(project)
     ids = project.getRegions()
     terms = getTerms('region', ids)
     return [term['id'] for term in terms if term is not None]
コード例 #19
0
 def getCities(self, project):
     project = self.getFullProject(project)
     ids = project.getCities()
     terms = getTerms('city', ids)
     return [term['id'] for term in terms if term is not None]