Ejemplo n.º 1
0
    def _contributor_role_setter(self, role: str, name: str) -> None:
        '''
        set the name for a particular role, adding a new contributor
        in the process if none exists for that role.

        see composer.setter property for an example
        '''
        c = None

        result = self.getContributorsByRole(role)
        if result is not None:
            c = result[0]
        else:
            c = Contributor()
            c.role = role
            self.contributors.append(c)

        c.name = name
Ejemplo n.º 2
0
 def composer(self, value):
     c = Contributor()
     c.name = value
     c.role = 'composer'
     self.contributors.append(c)
Ejemplo n.º 3
0
 def composer(self, value):
     c = Contributor()
     c.name = value
     c.role = 'composer'
     self.contributors.append(c)