Esempio n. 1
0
 def getHolderFromObject(self, obj):
     """ Get the copyright holder for an object. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         return lic.holder
     else:
         return None
Esempio n. 2
0
 def getLicenseAndHolderFromObject(self, obj):
     """ Get the copyright holder and license from an object. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         return lic.holder, lic.license
     else:
         return None
Esempio n. 3
0
 def getLicenseFromObject(self, obj):
     """ Get the copyright license for an object. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         return lic.license
     else:
         return None
Esempio n. 4
0
 def setObjLicense(self, obj):
     """ Set a license using the object """
     license = ILicense(obj)
     self.setLicense(obj, license)
Esempio n. 5
0
 def setRightsHolder(self, obj, holder):
     """ Set the Dublin Core Extension RightsHolder field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.holder = holder
Esempio n. 6
0
 def setRightsLicense(self, obj, newLicense):
     """ Set the Dublin Core Extension field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.license = newLicense
Esempio n. 7
0
def getCopyrightHolder(object):
    lic = ILicense(object)
    return lic.holder
Esempio n. 8
0
def getCopyrightLicense(object):
    lic = ILicense(object)
    return lic.license
 def setRightsHolder(self, obj, holder):
     """ Set the Dublin Core Extension RightsHolder field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.holder = holder
 def setRightsLicense(self, obj, newLicense):
     """ Set the Dublin Core Extension field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.license = newLicense