Example that shows how to call an external program for validation.
46 """Usage: callExternalValidator filename externalValidator [ tempSBMLFile outputFile [ ADDITIONAL-ARGS] ] 47 calls an external validator 56 externalValidator = args[2]
58 tempSBMLFileName = filename +
"_temp.xml" 60 tempSBMLFileName = args[3]
62 outputFile = filename +
"_out.xml" 67 for i
in range (5, len(args)):
68 additionalArgs += [args[i]]
71 additionalArgs += [outputFile]
80 validator = SBMLExternalValidator()
82 validator.setProgram(externalValidator)
83 validator.setSBMLFileName(tempSBMLFileName)
84 validator.setOutputFileName(outputFile)
85 for item
in additionalArgs:
86 validator.addArgument(item)
99 document.setApplicableValidators(0)
102 document.addValidator(validator)
105 numErrors = document.checkConsistency()
108 document.printErrors()
114 if __name__ ==
'__main__':