コード例 #1
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
コード例 #2
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
コード例 #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
コード例 #4
0
 def setObjLicense(self, obj):
     """ Set a license using the object """
     license = ILicense(obj)
     self.setLicense(obj, license)
コード例 #5
0
 def setRightsHolder(self, obj, holder):
     """ Set the Dublin Core Extension RightsHolder field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.holder = holder
コード例 #6
0
 def setRightsLicense(self, obj, newLicense):
     """ Set the Dublin Core Extension field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.license = newLicense
コード例 #7
0
def getCopyrightHolder(object):
    lic = ILicense(object)
    return lic.holder
コード例 #8
0
def getCopyrightLicense(object):
    lic = ILicense(object)
    return lic.license