Prints the notes strings for each element in a given model.
47 def printNotes(sb, id=""):
48 if not sb.isSetNotes():
55 print(
"----- " + sb.getElementName() +
" (" + pid
56 +
") notes -----" +
"\n")
57 print(sb.getNotesString() +
"\n")
62 """Usage: printNotes filename 72 errors = document.getNumErrors()
74 print(
"filename: " + filename +
"\n")
77 document.printErrors()
82 m = document.getModel()
85 for i
in range(0, m.getNumReactions()):
91 for j
in range(0, re.getNumReactants()):
92 rt = re.getReactant(j)
95 printNotes(rt, rt.getSpecies())
99 for j
in range(0, re.getNumProducts()):
100 rt = re.getProduct(j)
103 printNotes(rt, rt.getSpecies())
107 for j
in range(0, re.getNumModifiers()):
108 md = re.getModifier(j)
111 printNotes(md, md.getSpecies())
115 if re.isSetKineticLaw():
116 kl = re.getKineticLaw()
122 for j
in range(0, kl.getNumParameters()):
123 pa = kl.getParameter(j)
129 for i
in range(0, m.getNumSpecies()):
134 for i
in range(0, m.getNumCompartments()):
135 sp = m.getCompartment(i)
139 for i
in range (0, m.getNumFunctionDefinitions()):
140 sp = m.getFunctionDefinition(i)
144 for i
in range (0, m.getNumUnitDefinitions()):
145 sp = m.getUnitDefinition(i)
149 for i
in range(0, m.getNumParameters()):
150 sp = m.getParameter(i)
154 for i
in range(0, m.getNumRules()):
159 for i
in range(0, m.getNumInitialAssignments()):
160 sp = m.getInitialAssignment(i)
164 for i
in range(0,m.getNumEvents()):
169 if sp.isSetTrigger():
183 for j
in range(0,sp.getNumEventAssignments()):
184 ea = sp.getEventAssignment(j)
190 for i
in range(0,m.getNumSpeciesTypes()):
191 sp = m.getSpeciesType(i)
195 for i
in range(0,m.getNumConstraints()):
196 sp = m.getConstraint(i)
202 if __name__ ==
'__main__':