예제 #1
0
 def get_children(self,path):
 	results = ""
 	outputList = ListOfProcs.getDependency(path,1)
 	while outputList != None: 
 		for obj in outputList:
 			for obj
 	return results
예제 #2
0
def getDependencyTemp(fileId):
  output_path = ""
  output_name = ""
  dependency_objects = []
  output_json = ""
  for document in collection.find({'key':int(fileId)}):
    return_string =  GetProcedure.show_tomdoc(document['path'])
    output_path = document['path']
    output_name = document['name']
 
  dependency_objects = ListOfProcs.getDependency(output_path,1)
 
  output_json = "{ \"name\":\""+output_name+"\",\"children\":[ "
  
  for obj in dependency_objects:
    if len(dependency_objects) > 0 :
      for obj_inner in obj:
        output_json = output_json + "{ \"name\" : \""+obj_inner+"\"},"
    else :  
      output_json = output_json + "}"

  output_json = output_json.replace('SENTINEL.','')
  output_json = output_json.rstrip(',') + "] }"
  return str(output_json)