Пример #1
0
 def getReportEditLink(self, report):
     classname = String(report.getConfig().getString(
         None, "report", "className"))
     if classname.endsWith("RedboxReport"):
         return "reports?reportName=%s" % report.getReportName()
     else:
         return "statisticalReports?reportName=%s" % report.getReportName()
Пример #2
0
 def getTFPackagePid(self,oid):
     digitalObject = StorageUtils.getDigitalObject(self.storage,oid)
     for pid in digitalObject.getPayloadIdList():
         pidString = String(pid)
         if pidString.endsWith("tfpackage"):
             return pid
     return None 
Пример #3
0
def fixProcessPath(path, name):
    if (path != None) and (len(path) > 0):
        processPathStr = String(path)
        if processPathStr.endsWith(name):
            return path

        if processPathStr.indexOf('\\') != -1:
            if processPathStr.endsWith('\\'):
                return path + name
            else:
                return path + '\\' + name
        if processPathStr.indexOf('/') != -1:
            if processPathStr.endsWith('/'):
                return path + name
            else:
                return path + '/' + name

    return path
Пример #4
0
def fixProcessPath(path, name):
	if (path != None) and (len(path) > 0):
		processPathStr = String(path)
		if processPathStr.endsWith(name):
			return path
		
		if processPathStr.indexOf('\\') != -1:
			if processPathStr.endsWith('\\'):
				return path + name
			else:
				return path + '\\' + name
		if processPathStr.indexOf('/') != -1:
			if processPathStr.endsWith('/'):
				return path + name
			else:
				return path + '/' + name

	return path
Пример #5
0
 def findPidForExtenstion(self,digitalObject,payloadExtension):
     for pid in digitalObject.getPayloadIdList():
         pidString = String(pid)
         if pidString.endsWith(payloadExtension):
             return pid
     return None
Пример #6
0
 def getReportEditLink(self, report):
     classname = String(report.getConfig().getString(None, "report", "className"))
     if classname.endsWith("RedboxReport"):
         return "reports?reportName=%s" % report.getReportName()
     else:
         return  "statisticalReports?reportName=%s" % report.getReportName()