def getHolderFromObject(self, obj): """ Get the copyright holder for an object. """ if ILicensable.providedBy(obj): lic = ILicense(obj) return lic.holder else: return None
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
def getLicenseFromObject(self, obj): """ Get the copyright license for an object. """ if ILicensable.providedBy(obj): lic = ILicense(obj) return lic.license else: return None
def setObjLicense(self, obj): """ Set a license using the object """ license = ILicense(obj) self.setLicense(obj, 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
def getCopyrightHolder(object): lic = ILicense(object) return lic.holder
def getCopyrightLicense(object): lic = ILicense(object) return lic.license