예제 #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
예제 #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
예제 #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
예제 #9
0
 def setRightsHolder(self, obj, holder):
     """ Set the Dublin Core Extension RightsHolder field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.holder = holder
예제 #10
0
 def setRightsLicense(self, obj, newLicense):
     """ Set the Dublin Core Extension field. """
     if ILicensable.providedBy(obj):
         lic = ILicense(obj)
         lic.license = newLicense