Exemplo n.º 1
0
	def getFiles(self, person_id):
		file_2_itemid = None
                data = StringIO.StringIO()
                queryengine.base_query("%s/data" %(person_id), data, config=self.config)
		data.seek(0)
		dom = xml.dom.minidom.parseString(data.read())
		file_2_itemid = {}
		for x in dom.firstChild.childNodes:
			if x.nodeType == x.ELEMENT_NODE and x.nodeName == "file":
				file_2_itemid[x.getAttribute('name')] = x.getAttribute('itemid')
		return file_2_itemid
Exemplo n.º 2
0
 def getFiles(self, person_id):
     file_2_itemid = None
     data = StringIO.StringIO()
     queryengine.base_query("%s/data" % (person_id),
                            data,
                            config=self.config)
     data.seek(0)
     dom = xml.dom.minidom.parseString(data.read())
     file_2_itemid = {}
     for x in dom.firstChild.childNodes:
         if x.nodeType == x.ELEMENT_NODE and x.nodeName == "file":
             file_2_itemid[x.getAttribute('name')] = x.getAttribute(
                 'itemid')
     return file_2_itemid
Exemplo n.º 3
0
def handler(req):
    req.content_type = "text/xml"
    try:
        url = urllib.unquote_plus(req.path_info).split('/', 2)[2]
    except:
        url = '/'
    request_data = util.FieldStorage(req, keep_blank_values=True)
    auth_add = request_data.getfirst("auth")
    if auth_add == "":
        auth_add = True
    else:
        auth_add = False
    op = request_data.getfirst("op")
    if op == "" or op == None:
        op = 'readdir'
    queryengine.base_query(url, op, auth_add, req)
    return apache.OK
Exemplo n.º 4
0
def handler(req):
	req.content_type = "text/xml"
	try:
		url = urllib.unquote_plus(req.path_info).split('/', 2)[2]
	except:
		url = '/'
	request_data = util.FieldStorage(req, keep_blank_values=True)
	auth_add = request_data.getfirst("auth")
	if auth_add == "":
		auth_add = True
	else:
		auth_add = False
	op = request_data.getfirst("op")
	if op == "" or op == None:
		op = 'readdir'
	queryengine.base_query(url, op, auth_add, req)
	return apache.OK