#!/usr/bin/env python

from coral import kernel as coral

project = coral.loadModel("PMM10.xmi")
assert project

Note = project.elements.select(lambda x: x.name == "Note")[0]
assert Note

code = Note.operations[0].code

print "LINE 0:",  code[0], "."
print "LINE 1:", code[1], "."
print "LINE 2:", code[2], "."

assert code[0] == "def toString(self):"
assert code[1] == "\t#return self.name"
assert code[2] == "\tprint \"<br>\", self.name"

