Esempio n. 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()
Esempio n. 2
0
File: get.py Progetto: ozej8y/redbox
 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 
Esempio n. 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
Esempio n. 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
Esempio n. 5
0
 def findPidForExtenstion(self,digitalObject,payloadExtension):
     for pid in digitalObject.getPayloadIdList():
         pidString = String(pid)
         if pidString.endsWith(payloadExtension):
             return pid
     return None
Esempio n. 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()