|
@ -141,11 +141,24 @@ def parseCsvSpec(msg, lines, type): |
|
|
if (not B.DATA_NODE_STEPS in data): |
|
|
if (not B.DATA_NODE_STEPS in data): |
|
|
data[B.DATA_NODE_STEPS] = [] |
|
|
data[B.DATA_NODE_STEPS] = [] |
|
|
step = {} |
|
|
step = {} |
|
|
step[B.DATA_NODE_COMP] = fields[1] |
|
|
step[B.DATA_NODE_COMP] = fields[D.STEP_COMP_I] |
|
|
step[B.ATTR_DATA_REF] = fields[2] |
|
|
step[B.ATTR_EXEC_REF] = fields[D.STEP_EXECNR_I] |
|
|
|
|
|
step[B.ATTR_DATA_REF] = fields[D.STEP_REFNR_I] |
|
|
step[B.ATTR_STEP_ARGS] = {} |
|
|
step[B.ATTR_STEP_ARGS] = {} |
|
|
a = fields[3].split(",") |
|
|
if D.STEP_ARGS_I == D.STEP_LIST_I: |
|
|
|
|
|
args = "" |
|
|
|
|
|
for i in range(D.STEP_ARGS_I, len(fields)): |
|
|
|
|
|
if len(fields[i]) < 1: |
|
|
|
|
|
continue |
|
|
|
|
|
if fields[i][0:1] == "#": |
|
|
|
|
|
continue |
|
|
|
|
|
args += "," + fields[i] |
|
|
|
|
|
args = args[1:] |
|
|
|
|
|
else: |
|
|
|
|
|
args = fields[D.STEP_ARGS_I] |
|
|
|
|
|
a = args.split(",") |
|
|
for arg in a: |
|
|
for arg in a: |
|
|
|
|
|
print("arg "+arg) |
|
|
b = arg.split(":") |
|
|
b = arg.split(":") |
|
|
if len(b) < 2: |
|
|
if len(b) < 2: |
|
|
raise Exception(D.EXCP_MALFORMAT + "" + l) |
|
|
raise Exception(D.EXCP_MALFORMAT + "" + l) |
|
@ -163,6 +176,8 @@ def parseCsvSpec(msg, lines, type): |
|
|
# create deep structure a_0 ... a_n |
|
|
# create deep structure a_0 ... a_n |
|
|
print("tdata 136 CSV_HEADER_START "+str(len(a))) |
|
|
print("tdata 136 CSV_HEADER_START "+str(len(a))) |
|
|
h = a |
|
|
h = a |
|
|
|
|
|
header = [] |
|
|
|
|
|
if B.DATA_NODE_TABLES not in data: |
|
|
data[B.DATA_NODE_TABLES] = {} |
|
|
data[B.DATA_NODE_TABLES] = {} |
|
|
h[0] = B.DATA_NODE_TABLES |
|
|
h[0] = B.DATA_NODE_TABLES |
|
|
comps = {} |
|
|
comps = {} |
|
@ -195,20 +210,22 @@ def parseCsvSpec(msg, lines, type): |
|
|
# fill data |
|
|
# fill data |
|
|
tableDict = getTabContent(msg, data, h) |
|
|
tableDict = getTabContent(msg, data, h) |
|
|
row = {} |
|
|
row = {} |
|
|
|
|
|
print(fields) |
|
|
i = 1 |
|
|
i = 1 |
|
|
# case-differentiation DATA or TREE |
|
|
# case-differentiation DATA or TREE |
|
|
for f in header: |
|
|
for f in header: |
|
|
|
|
|
print(str(i)+" "+str(len(fields))+" "+str(len(header))) |
|
|
row[f] = fields[i] |
|
|
row[f] = fields[i] |
|
|
if type == D.CSV_SPECTYPE_TREE: |
|
|
if type == D.CSV_SPECTYPE_TREE: |
|
|
tableDict[B.DATA_NODE_DATA][f] = fields[i] |
|
|
tableDict[B.DATA_NODE_DATA][f] = fields[i] |
|
|
i += 1 |
|
|
i += 1 |
|
|
if type == D.CSV_SPECTYPE_DATA: |
|
|
if type == D.CSV_SPECTYPE_DATA: |
|
|
print("parseSpec "+ str(fields[0])) |
|
|
print("parseSpec "+ str(fields[0])) |
|
|
|
|
|
row[B.ATTR_DATA_COMP] = {} |
|
|
for c in fields[0].split(","): |
|
|
for c in fields[0].split(","): |
|
|
a = c.split(":") |
|
|
a = c.split(":") |
|
|
print("parseSpec " + str(a)) |
|
|
print("parseSpec " + str(a)) |
|
|
comps[a[0]] = a[1] |
|
|
comps[a[0]] = a[1] |
|
|
row[B.ATTR_DATA_COMP] = {} |
|
|
|
|
|
row[B.ATTR_DATA_COMP][a[0]] = a[1] |
|
|
row[B.ATTR_DATA_COMP][a[0]] = a[1] |
|
|
#row[B.ATTR_DATA_COMP] = fields[0].split(",") |
|
|
#row[B.ATTR_DATA_COMP] = fields[0].split(",") |
|
|
tableDict[B.ATTR_DATA_COMP] = comps |
|
|
tableDict[B.ATTR_DATA_COMP] = comps |
|
|