text:
"""
__Transition2QInstOUT_MDL.py_____________________________________________________

Automatically generated AToM3 Model File (Do not modify directly)
Author: gehan
Modified: Wed Feb 11 15:12:22 2015
_________________________________________________________________________________
"""
from stickylink import *
from widthXfillXdecoration import *
from MatchModel import *
from ApplyModel import *
from Vertex import *
from Transition import *
from StateMachine import *
from OUT2 import *
from Name import *
from Inst import *
from Attribute import *
from Equation import *
from Concat import *
from Constant import *
from paired_with import *
from match_contains import *
from apply_contains import *
from directLink_T import *
from directLink_S import *
from hasAttribute_S import *
from hasAttribute_T import *
from leftExpr import *
from rightExpr import *
from hasArgs import *
from graph_StateMachine import *
from graph_Attribute import *
from graph_Vertex import *
from graph_Transition import *
from graph_paired_with import *
from graph_Equation import *
from graph_hasArgs import *
from graph_rightExpr import *
from graph_Concat import *
from graph_Inst import *
from graph_hasAttribute_T import *
from graph_directLink_T import *
from graph_directLink_S import *
from graph_OUT2 import *
from graph_ApplyModel import *
from graph_Name import *
from graph_MatchModel import *
from graph_apply_contains import *
from graph_hasAttribute_S import *
from graph_match_contains import *
from graph_leftExpr import *
from graph_Constant import *
from ATOM3Enum import *
from ATOM3String import *
from ATOM3BottomType import *
from ATOM3Constraint import *
from ATOM3Attribute import *
from ATOM3Float import *
from ATOM3List import *
from ATOM3Link import *
from ATOM3Connection import *
from ATOM3Boolean import *
from ATOM3Appearance import *
from ATOM3Text import *
from ATOM3Action import *
from ATOM3Integer import *
from ATOM3Port import *
from ATOM3MSEnum import *

def Transition2QInstOUT_MDL(self, rootNode, UMLRT2Kiltera_MMRootNode=None):

    # --- Generating attributes code for ASG UMLRT2Kiltera_MM ---
    if( UMLRT2Kiltera_MMRootNode ):
        # author
        UMLRT2Kiltera_MMRootNode.author.setValue('Annonymous')

        # description
        UMLRT2Kiltera_MMRootNode.description.setValue('\n')
        UMLRT2Kiltera_MMRootNode.description.setHeight(15)

        # name
        UMLRT2Kiltera_MMRootNode.name.setValue('Transition2QInstOUT')
    # --- ASG attributes over ---

    self.obj1052=MatchModel(self)
    self.obj1052.isGraphObjectVisual = True

    if(hasattr(self.obj1052, '_setHierarchicalLink')):
      self.obj1052._setHierarchicalLink(False)

    self.obj1052.graphClass_= graph_MatchModel
    if self.genGraphics:
       new_obj = graph_MatchModel(20.0,20.0,self.obj1052)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("MatchModel", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1052.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1052)
    self.globalAndLocalPostcondition(self.obj1052, rootNode)
    self.obj1052.postAction( rootNode.CREATE )

    self.obj1053=ApplyModel(self)
    self.obj1053.isGraphObjectVisual = True

    if(hasattr(self.obj1053, '_setHierarchicalLink')):
      self.obj1053._setHierarchicalLink(False)

    self.obj1053.graphClass_= graph_ApplyModel
    if self.genGraphics:
       new_obj = graph_ApplyModel(20.0,240.0,self.obj1053)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("ApplyModel", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1053.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1053)
    self.globalAndLocalPostcondition(self.obj1053, rootNode)
    self.obj1053.postAction( rootNode.CREATE )

    self.obj1054=Vertex(self)
    self.obj1054.isGraphObjectVisual = True

    if(hasattr(self.obj1054, '_setHierarchicalLink')):
      self.obj1054._setHierarchicalLink(False)

    # name
    self.obj1054.name.setValue('vertex1')

    # classtype
    self.obj1054.classtype.setValue('Vertex')

    # cardinality
    self.obj1054.cardinality.setValue('1')

    self.obj1054.graphClass_= graph_Vertex
    if self.genGraphics:
       new_obj = graph_Vertex(660.0,120.0,self.obj1054)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Vertex", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1054.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1054)
    self.globalAndLocalPostcondition(self.obj1054, rootNode)
    self.obj1054.postAction( rootNode.CREATE )

    self.obj1055=Transition(self)
    self.obj1055.isGraphObjectVisual = True

    if(hasattr(self.obj1055, '_setHierarchicalLink')):
      self.obj1055._setHierarchicalLink(False)

    # name
    self.obj1055.name.setValue('transition1')

    # classtype
    self.obj1055.classtype.setValue('Transition')

    # cardinality
    self.obj1055.cardinality.setValue('+')

    self.obj1055.graphClass_= graph_Transition
    if self.genGraphics:
       new_obj = graph_Transition(160.0,34.0,self.obj1055)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Transition", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [0.9699999999999989, 0.8599999999999994]
    else: new_obj = None
    self.obj1055.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1055)
    self.globalAndLocalPostcondition(self.obj1055, rootNode)
    self.obj1055.postAction( rootNode.CREATE )

    self.obj1056=StateMachine(self)
    self.obj1056.isGraphObjectVisual = True

    if(hasattr(self.obj1056, '_setHierarchicalLink')):
      self.obj1056._setHierarchicalLink(False)

    # name
    self.obj1056.name.setValue('statemachine1')

    # classtype
    self.obj1056.classtype.setValue('StateMachine')

    # cardinality
    self.obj1056.cardinality.setValue('1')

    self.obj1056.graphClass_= graph_StateMachine
    if self.genGraphics:
       new_obj = graph_StateMachine(660.0,25.0,self.obj1056)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("StateMachine", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1056.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1056)
    self.globalAndLocalPostcondition(self.obj1056, rootNode)
    self.obj1056.postAction( rootNode.CREATE )

    self.obj1057=OUT2(self)
    self.obj1057.isGraphObjectVisual = True

    if(hasattr(self.obj1057, '_setHierarchicalLink')):
      self.obj1057._setHierarchicalLink(False)

    # classtype
    self.obj1057.classtype.setValue('OUT2')

    # cardinality
    self.obj1057.cardinality.setValue('1')

    # name
    self.obj1057.name.setValue('out2_1')

    self.obj1057.graphClass_= graph_OUT2
    if self.genGraphics:
       new_obj = graph_OUT2(160.0,121.0,self.obj1057)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("OUT2", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1057.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1057)
    self.globalAndLocalPostcondition(self.obj1057, rootNode)
    self.obj1057.postAction( rootNode.CREATE )

    self.obj1058=Name(self)
    self.obj1058.isGraphObjectVisual = True

    if(hasattr(self.obj1058, '_setHierarchicalLink')):
      self.obj1058._setHierarchicalLink(False)

    # classtype
    self.obj1058.classtype.setValue('Name')

    # cardinality
    self.obj1058.cardinality.setValue('1')

    # name
    self.obj1058.name.setValue('name1')

    self.obj1058.graphClass_= graph_Name
    if self.genGraphics:
       new_obj = graph_Name(600.0,380.0,self.obj1058)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Name", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1058.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1058)
    self.globalAndLocalPostcondition(self.obj1058, rootNode)
    self.obj1058.postAction( rootNode.CREATE )

    self.obj1059=Inst(self)
    self.obj1059.isGraphObjectVisual = True

    if(hasattr(self.obj1059, '_setHierarchicalLink')):
      self.obj1059._setHierarchicalLink(False)

    # classtype
    self.obj1059.classtype.setValue('Inst')

    # cardinality
    self.obj1059.cardinality.setValue('1')

    # name
    self.obj1059.name.setValue('inst1')

    self.obj1059.graphClass_= graph_Inst
    if self.genGraphics:
       new_obj = graph_Inst(200.0,380.0,self.obj1059)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Inst", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1059.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1059)
    self.globalAndLocalPostcondition(self.obj1059, rootNode)
    self.obj1059.postAction( rootNode.CREATE )

    self.obj1060=Attribute(self)
    self.obj1060.isGraphObjectVisual = True

    if(hasattr(self.obj1060, '_setHierarchicalLink')):
      self.obj1060._setHierarchicalLink(False)

    # Type
    self.obj1060.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1060.Type.config = 0

    # name
    self.obj1060.name.setValue('name')

    self.obj1060.graphClass_= graph_Attribute
    if self.genGraphics:
       new_obj = graph_Attribute(420.0,127.0,self.obj1060)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Attribute", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1060.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1060)
    self.globalAndLocalPostcondition(self.obj1060, rootNode)
    self.obj1060.postAction( rootNode.CREATE )

    self.obj1061=Attribute(self)
    self.obj1061.isGraphObjectVisual = True

    if(hasattr(self.obj1061, '_setHierarchicalLink')):
      self.obj1061._setHierarchicalLink(False)

    # Type
    self.obj1061.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1061.Type.config = 0

    # name
    self.obj1061.name.setValue('literal')

    self.obj1061.graphClass_= graph_Attribute
    if self.genGraphics:
       new_obj = graph_Attribute(780.0,372.0,self.obj1061)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Attribute", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1061.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1061)
    self.globalAndLocalPostcondition(self.obj1061, rootNode)
    self.obj1061.postAction( rootNode.CREATE )

    self.obj1062=Attribute(self)
    self.obj1062.isGraphObjectVisual = True

    if(hasattr(self.obj1062, '_setHierarchicalLink')):
      self.obj1062._setHierarchicalLink(False)

    # Type
    self.obj1062.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1062.Type.config = 0

    # name
    self.obj1062.name.setValue('name')

    self.obj1062.graphClass_= graph_Attribute
    if self.genGraphics:
       new_obj = graph_Attribute(240.0,280.0,self.obj1062)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Attribute", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1062.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1062)
    self.globalAndLocalPostcondition(self.obj1062, rootNode)
    self.obj1062.postAction( rootNode.CREATE )

    self.obj1063=Attribute(self)
    self.obj1063.isGraphObjectVisual = True

    if(hasattr(self.obj1063, '_setHierarchicalLink')):
      self.obj1063._setHierarchicalLink(False)

    # Type
    self.obj1063.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1063.Type.config = 0

    # name
    self.obj1063.name.setValue('pivot')

    self.obj1063.graphClass_= graph_Attribute
    if self.genGraphics:
       new_obj = graph_Attribute(60.0,500.0,self.obj1063)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Attribute", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1063.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1063)
    self.globalAndLocalPostcondition(self.obj1063, rootNode)
    self.obj1063.postAction( rootNode.CREATE )

    self.obj1064=Equation(self)
    self.obj1064.isGraphObjectVisual = True

    if(hasattr(self.obj1064, '_setHierarchicalLink')):
      self.obj1064._setHierarchicalLink(False)

    # name
    self.obj1064.name.setValue('eq2')

    self.obj1064.graphClass_= graph_Equation
    if self.genGraphics:
       new_obj = graph_Equation(820.0,300.0,self.obj1064)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Equation", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1064.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1064)
    self.globalAndLocalPostcondition(self.obj1064, rootNode)
    self.obj1064.postAction( rootNode.CREATE )

    self.obj1065=Equation(self)
    self.obj1065.isGraphObjectVisual = True

    if(hasattr(self.obj1065, '_setHierarchicalLink')):
      self.obj1065._setHierarchicalLink(False)

    # name
    self.obj1065.name.setValue('eq1')

    self.obj1065.graphClass_= graph_Equation
    if self.genGraphics:
       new_obj = graph_Equation(540.0,280.0,self.obj1065)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Equation", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1065.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1065)
    self.globalAndLocalPostcondition(self.obj1065, rootNode)
    self.obj1065.postAction( rootNode.CREATE )

    self.obj1066=Equation(self)
    self.obj1066.isGraphObjectVisual = True

    if(hasattr(self.obj1066, '_setHierarchicalLink')):
      self.obj1066._setHierarchicalLink(False)

    # name
    self.obj1066.name.setValue('eq3')

    self.obj1066.graphClass_= graph_Equation
    if self.genGraphics:
       new_obj = graph_Equation(240.0,520.0,self.obj1066)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Equation", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1066.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1066)
    self.globalAndLocalPostcondition(self.obj1066, rootNode)
    self.obj1066.postAction( rootNode.CREATE )

    self.obj1067=Concat(self)
    self.obj1067.isGraphObjectVisual = True

    if(hasattr(self.obj1067, '_setHierarchicalLink')):
      self.obj1067._setHierarchicalLink(False)

    # Type
    self.obj1067.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1067.Type.config = 0

    # name
    self.obj1067.name.setValue('concat1')

    self.obj1067.graphClass_= graph_Concat
    if self.genGraphics:
       new_obj = graph_Concat(520.0,200.0,self.obj1067)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Concat", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1067.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1067)
    self.globalAndLocalPostcondition(self.obj1067, rootNode)
    self.obj1067.postAction( rootNode.CREATE )

    self.obj1068=Constant(self)
    self.obj1068.isGraphObjectVisual = True

    if(hasattr(self.obj1068, '_setHierarchicalLink')):
      self.obj1068._setHierarchicalLink(False)

    # Type
    self.obj1068.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1068.Type.config = 0

    # name
    self.obj1068.name.setValue('sh')

    self.obj1068.graphClass_= graph_Constant
    if self.genGraphics:
       new_obj = graph_Constant(860.0,440.0,self.obj1068)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Constant", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1068.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1068)
    self.globalAndLocalPostcondition(self.obj1068, rootNode)
    self.obj1068.postAction( rootNode.CREATE )

    self.obj1069=Constant(self)
    self.obj1069.isGraphObjectVisual = True

    if(hasattr(self.obj1069, '_setHierarchicalLink')):
      self.obj1069._setHierarchicalLink(False)

    # Type
    self.obj1069.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1069.Type.config = 0

    # name
    self.obj1069.name.setValue('B')

    self.obj1069.graphClass_= graph_Constant
    if self.genGraphics:
       new_obj = graph_Constant(363.0,200.0,self.obj1069)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Constant", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1069.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1069)
    self.globalAndLocalPostcondition(self.obj1069, rootNode)
    self.obj1069.postAction( rootNode.CREATE )

    self.obj1070=Constant(self)
    self.obj1070.isGraphObjectVisual = True

    if(hasattr(self.obj1070, '_setHierarchicalLink')):
      self.obj1070._setHierarchicalLink(False)

    # Type
    self.obj1070.Type.setValue( (['String', 'Bool', 'Integer', 'Float'], 0) )
    self.obj1070.Type.config = 0

    # name
    self.obj1070.name.setValue('instfortrans')

    self.obj1070.graphClass_= graph_Constant
    if self.genGraphics:
       new_obj = graph_Constant(400.0,480.0,self.obj1070)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("Constant", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
       new_obj.layConstraints['scale'] = [1.0, 1.0]
    else: new_obj = None
    self.obj1070.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1070)
    self.globalAndLocalPostcondition(self.obj1070, rootNode)
    self.obj1070.postAction( rootNode.CREATE )

    self.obj1071=paired_with(self)
    self.obj1071.isGraphObjectVisual = True

    if(hasattr(self.obj1071, '_setHierarchicalLink')):
      self.obj1071._setHierarchicalLink(False)

    self.obj1071.graphClass_= graph_paired_with
    if self.genGraphics:
       new_obj = graph_paired_with(140.5,162.0,self.obj1071)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("paired_with", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1071.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1071)
    self.globalAndLocalPostcondition(self.obj1071, rootNode)
    self.obj1071.postAction( rootNode.CREATE )

    self.obj1072=match_contains(self)
    self.obj1072.isGraphObjectVisual = True

    if(hasattr(self.obj1072, '_setHierarchicalLink')):
      self.obj1072._setHierarchicalLink(False)

    self.obj1072.graphClass_= graph_match_contains
    if self.genGraphics:
       new_obj = graph_match_contains(238.0,60.0,self.obj1072)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("match_contains", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1072.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1072)
    self.globalAndLocalPostcondition(self.obj1072, rootNode)
    self.obj1072.postAction( rootNode.CREATE )

    self.obj1073=match_contains(self)
    self.obj1073.isGraphObjectVisual = True

    if(hasattr(self.obj1073, '_setHierarchicalLink')):
      self.obj1073._setHierarchicalLink(False)

    self.obj1073.graphClass_= graph_match_contains
    if self.genGraphics:
       new_obj = graph_match_contains(234.0,117.0,self.obj1073)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("match_contains", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1073.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1073)
    self.globalAndLocalPostcondition(self.obj1073, rootNode)
    self.obj1073.postAction( rootNode.CREATE )

    self.obj1074=match_contains(self)
    self.obj1074.isGraphObjectVisual = True

    if(hasattr(self.obj1074, '_setHierarchicalLink')):
      self.obj1074._setHierarchicalLink(False)

    self.obj1074.graphClass_= graph_match_contains
    if self.genGraphics:
       new_obj = graph_match_contains(465.0,50.5,self.obj1074)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("match_contains", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1074.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1074)
    self.globalAndLocalPostcondition(self.obj1074, rootNode)
    self.obj1074.postAction( rootNode.CREATE )

    self.obj1075=match_contains(self)
    self.obj1075.isGraphObjectVisual = True

    if(hasattr(self.obj1075, '_setHierarchicalLink')):
      self.obj1075._setHierarchicalLink(False)

    self.obj1075.graphClass_= graph_match_contains
    if self.genGraphics:
       new_obj = graph_match_contains(484.0,107.0,self.obj1075)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("match_contains", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1075.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1075)
    self.globalAndLocalPostcondition(self.obj1075, rootNode)
    self.obj1075.postAction( rootNode.CREATE )

    self.obj1076=apply_contains(self)
    self.obj1076.isGraphObjectVisual = True

    if(hasattr(self.obj1076, '_setHierarchicalLink')):
      self.obj1076._setHierarchicalLink(False)

    self.obj1076.graphClass_= graph_apply_contains
    if self.genGraphics:
       new_obj = graph_apply_contains(149.5,358.0,self.obj1076)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("apply_contains", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1076.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1076)
    self.globalAndLocalPostcondition(self.obj1076, rootNode)
    self.obj1076.postAction( rootNode.CREATE )

    self.obj1077=apply_contains(self)
    self.obj1077.isGraphObjectVisual = True

    if(hasattr(self.obj1077, '_setHierarchicalLink')):
      self.obj1077._setHierarchicalLink(False)

    self.obj1077.graphClass_= graph_apply_contains
    if self.genGraphics:
       new_obj = graph_apply_contains(179.5,347.0,self.obj1077)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("apply_contains", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1077.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1077)
    self.globalAndLocalPostcondition(self.obj1077, rootNode)
    self.obj1077.postAction( rootNode.CREATE )

    self.obj1078=directLink_T(self)
    self.obj1078.isGraphObjectVisual = True

    if(hasattr(self.obj1078, '_setHierarchicalLink')):
      self.obj1078._setHierarchicalLink(False)

    # associationType
    self.obj1078.associationType.setValue('channelNames')

    self.obj1078.graphClass_= graph_directLink_T
    if self.genGraphics:
       new_obj = graph_directLink_T(517.0,430.0,self.obj1078)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("directLink_T", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1078.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1078)
    self.globalAndLocalPostcondition(self.obj1078, rootNode)
    self.obj1078.postAction( rootNode.CREATE )

    self.obj1079=directLink_S(self)
    self.obj1079.isGraphObjectVisual = True

    if(hasattr(self.obj1079, '_setHierarchicalLink')):
      self.obj1079._setHierarchicalLink(False)

    # associationType
    self.obj1079.associationType.setValue('type')

    self.obj1079.graphClass_= graph_directLink_S
    if self.genGraphics:
       new_obj = graph_directLink_S(330.0,133.0,self.obj1079)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("directLink_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1079.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1079)
    self.globalAndLocalPostcondition(self.obj1079, rootNode)
    self.obj1079.postAction( rootNode.CREATE )

    self.obj1080=directLink_S(self)
    self.obj1080.isGraphObjectVisual = True

    if(hasattr(self.obj1080, '_setHierarchicalLink')):
      self.obj1080._setHierarchicalLink(False)

    # associationType
    self.obj1080.associationType.setValue('owningStateMachine')

    self.obj1080.graphClass_= graph_directLink_S
    if self.genGraphics:
       new_obj = graph_directLink_S(577.242375062,73.1510372393,self.obj1080)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("directLink_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1080.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1080)
    self.globalAndLocalPostcondition(self.obj1080, rootNode)
    self.obj1080.postAction( rootNode.CREATE )

    self.obj1081=directLink_S(self)
    self.obj1081.isGraphObjectVisual = True

    if(hasattr(self.obj1081, '_setHierarchicalLink')):
      self.obj1081._setHierarchicalLink(False)

    # associationType
    self.obj1081.associationType.setValue('exitPoints')

    self.obj1081.graphClass_= graph_directLink_S
    if self.genGraphics:
       new_obj = graph_directLink_S(859.0,103.5,self.obj1081)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("directLink_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1081.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1081)
    self.globalAndLocalPostcondition(self.obj1081, rootNode)
    self.obj1081.postAction( rootNode.CREATE )

    self.obj1082=directLink_S(self)
    self.obj1082.isGraphObjectVisual = True

    if(hasattr(self.obj1082, '_setHierarchicalLink')):
      self.obj1082._setHierarchicalLink(False)

    # associationType
    self.obj1082.associationType.setValue('dest')

    self.obj1082.graphClass_= graph_directLink_S
    if self.genGraphics:
       new_obj = graph_directLink_S(621.242375062,102.151037239,self.obj1082)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("directLink_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1082.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1082)
    self.globalAndLocalPostcondition(self.obj1082, rootNode)
    self.obj1082.postAction( rootNode.CREATE )

    self.obj1083=hasAttribute_S(self)
    self.obj1083.isGraphObjectVisual = True

    if(hasattr(self.obj1083, '_setHierarchicalLink')):
      self.obj1083._setHierarchicalLink(False)

    self.obj1083.graphClass_= graph_hasAttribute_S
    if self.genGraphics:
       new_obj = graph_hasAttribute_S(692.0,158.5,self.obj1083)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("hasAttribute_S", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1083.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1083)
    self.globalAndLocalPostcondition(self.obj1083, rootNode)
    self.obj1083.postAction( rootNode.CREATE )

    self.obj1084=hasAttribute_T(self)
    self.obj1084.isGraphObjectVisual = True

    if(hasattr(self.obj1084, '_setHierarchicalLink')):
      self.obj1084._setHierarchicalLink(False)

    self.obj1084.graphClass_= graph_hasAttribute_T
    if self.genGraphics:
       new_obj = graph_hasAttribute_T(843.0,418.5,self.obj1084)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("hasAttribute_T", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1084.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1084)
    self.globalAndLocalPostcondition(self.obj1084, rootNode)
    self.obj1084.postAction( rootNode.CREATE )

    self.obj1085=hasAttribute_T(self)
    self.obj1085.isGraphObjectVisual = True

    if(hasattr(self.obj1085, '_setHierarchicalLink')):
      self.obj1085._setHierarchicalLink(False)

    self.obj1085.graphClass_= graph_hasAttribute_T
    if self.genGraphics:
       new_obj = graph_hasAttribute_T(363.0,392.5,self.obj1085)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("hasAttribute_T", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1085.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1085)
    self.globalAndLocalPostcondition(self.obj1085, rootNode)
    self.obj1085.postAction( rootNode.CREATE )

    self.obj1086=hasAttribute_T(self)
    self.obj1086.isGraphObjectVisual = True

    if(hasattr(self.obj1086, '_setHierarchicalLink')):
      self.obj1086._setHierarchicalLink(False)

    self.obj1086.graphClass_= graph_hasAttribute_T
    if self.genGraphics:
       new_obj = graph_hasAttribute_T(303.0,482.5,self.obj1086)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("hasAttribute_T", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1086.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1086)
    self.globalAndLocalPostcondition(self.obj1086, rootNode)
    self.obj1086.postAction( rootNode.CREATE )

    self.obj1087=leftExpr(self)
    self.obj1087.isGraphObjectVisual = True

    if(hasattr(self.obj1087, '_setHierarchicalLink')):
      self.obj1087._setHierarchicalLink(False)

    self.obj1087.graphClass_= graph_leftExpr
    if self.genGraphics:
       new_obj = graph_leftExpr(936.0,372.5,self.obj1087)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("leftExpr", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1087.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1087)
    self.globalAndLocalPostcondition(self.obj1087, rootNode)
    self.obj1087.postAction( rootNode.CREATE )

    self.obj1088=leftExpr(self)
    self.obj1088.isGraphObjectVisual = True

    if(hasattr(self.obj1088, '_setHierarchicalLink')):
      self.obj1088._setHierarchicalLink(False)

    self.obj1088.graphClass_= graph_leftExpr
    if self.genGraphics:
       new_obj = graph_leftExpr(526.0,316.5,self.obj1088)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("leftExpr", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1088.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1088)
    self.globalAndLocalPostcondition(self.obj1088, rootNode)
    self.obj1088.postAction( rootNode.CREATE )

    self.obj1089=leftExpr(self)
    self.obj1089.isGraphObjectVisual = True

    if(hasattr(self.obj1089, '_setHierarchicalLink')):
      self.obj1089._setHierarchicalLink(False)

    self.obj1089.graphClass_= graph_leftExpr
    if self.genGraphics:
       new_obj = graph_leftExpr(316.0,549.5,self.obj1089)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("leftExpr", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1089.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1089)
    self.globalAndLocalPostcondition(self.obj1089, rootNode)
    self.obj1089.postAction( rootNode.CREATE )

    self.obj1090=rightExpr(self)
    self.obj1090.isGraphObjectVisual = True

    if(hasattr(self.obj1090, '_setHierarchicalLink')):
      self.obj1090._setHierarchicalLink(False)

    self.obj1090.graphClass_= graph_rightExpr
    if self.genGraphics:
       new_obj = graph_rightExpr(976.0,406.5,self.obj1090)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("rightExpr", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1090.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1090)
    self.globalAndLocalPostcondition(self.obj1090, rootNode)
    self.obj1090.postAction( rootNode.CREATE )

    self.obj1091=rightExpr(self)
    self.obj1091.isGraphObjectVisual = True

    if(hasattr(self.obj1091, '_setHierarchicalLink')):
      self.obj1091._setHierarchicalLink(False)

    self.obj1091.graphClass_= graph_rightExpr
    if self.genGraphics:
       new_obj = graph_rightExpr(666.0,276.5,self.obj1091)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("rightExpr", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1091.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1091)
    self.globalAndLocalPostcondition(self.obj1091, rootNode)
    self.obj1091.postAction( rootNode.CREATE )

    self.obj1092=rightExpr(self)
    self.obj1092.isGraphObjectVisual = True

    if(hasattr(self.obj1092, '_setHierarchicalLink')):
      self.obj1092._setHierarchicalLink(False)

    self.obj1092.graphClass_= graph_rightExpr
    if self.genGraphics:
       new_obj = graph_rightExpr(445.0,539.0,self.obj1092)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("rightExpr", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1092.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1092)
    self.globalAndLocalPostcondition(self.obj1092, rootNode)
    self.obj1092.postAction( rootNode.CREATE )

    self.obj1093=hasArgs(self)
    self.obj1093.isGraphObjectVisual = True

    if(hasattr(self.obj1093, '_setHierarchicalLink')):
      self.obj1093._setHierarchicalLink(False)

    self.obj1093.graphClass_= graph_hasArgs
    if self.genGraphics:
       new_obj = graph_hasArgs(584.0,234.0,self.obj1093)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("hasArgs", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1093.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1093)
    self.globalAndLocalPostcondition(self.obj1093, rootNode)
    self.obj1093.postAction( rootNode.CREATE )

    self.obj1094=hasArgs(self)
    self.obj1094.isGraphObjectVisual = True

    if(hasattr(self.obj1094, '_setHierarchicalLink')):
      self.obj1094._setHierarchicalLink(False)

    self.obj1094.graphClass_= graph_hasArgs
    if self.genGraphics:
       new_obj = graph_hasArgs(604.0,194.0,self.obj1094)
       new_obj.DrawObject(self.UMLmodel)
       self.UMLmodel.addtag_withtag("hasArgs", new_obj.tag)
       new_obj.layConstraints = dict() # Graphical Layout Constraints
    else: new_obj = None
    self.obj1094.graphObject_ = new_obj

    # Add node to the root: rootNode
    rootNode.addNode(self.obj1094)
    self.globalAndLocalPostcondition(self.obj1094, rootNode)
    self.obj1094.postAction( rootNode.CREATE )

    # Connections for obj1052 (graphObject_: Obj949) of type MatchModel
    self.drawConnections(
(self.obj1052,self.obj1071,[138.0, 51.0, 140.5, 162.0],"true", 2),
(self.obj1052,self.obj1072,[138.0, 51.0, 238.0, 60.0],"true", 2),
(self.obj1052,self.obj1073,[138.0, 51.0, 234.0, 117.0],"true", 2),
(self.obj1052,self.obj1074,[138.0, 51.0, 465.0, 50.5],"true", 2),
(self.obj1052,self.obj1075,[138.0, 51.0, 484.0, 107.0],"true", 2) )
    # Connections for obj1053 (graphObject_: Obj950) of type ApplyModel
    self.drawConnections(
(self.obj1053,self.obj1076,[143.0, 273.0, 149.5, 358.0],"true", 2),
(self.obj1053,self.obj1077,[143.0, 273.0, 179.5, 347.0],"true", 2) )
    # Connections for obj1054 (graphObject_: Obj951) named vertex1
    self.drawConnections(
(self.obj1054,self.obj1083,[830.0, 163.0, 692.0, 158.5],"true", 2) )
    # Connections for obj1055 (graphObject_: Obj952) named transition1
    self.drawConnections(
(self.obj1055,self.obj1079,[324.4847501237708, 71.30207447863364, 330.0, 133.0],"true", 2),
(self.obj1055,self.obj1080,[324.4847501237708, 71.30207447863364, 577.2423750618855, 73.15103723931682],"true", 2),
(self.obj1055,self.obj1082,[324.4847501237708, 71.30207447863364, 621.2423750618855, 102.15103723931682],"true", 2) )
    # Connections for obj1056 (graphObject_: Obj953) named statemachine1
    self.drawConnections(
(self.obj1056,self.obj1081,[830.0, 68.0, 859.0, 103.5],"true", 2) )
    # Connections for obj1057 (graphObject_: Obj954) named out2_1
    self.drawConnections(
 )
    # Connections for obj1058 (graphObject_: Obj955) named name1
    self.drawConnections(
(self.obj1058,self.obj1084,[772.0, 431.0, 843.0, 418.5],"true", 2) )
    # Connections for obj1059 (graphObject_: Obj956) named inst1
    self.drawConnections(
(self.obj1059,self.obj1078,[372.0, 431.0, 517.0, 430.0],"true", 2),
(self.obj1059,self.obj1085,[372.0, 431.0, 363.0, 392.5],"true", 2),
(self.obj1059,self.obj1086,[372.0, 431.0, 303.0, 482.5],"true", 2) )
    # Connections for obj1060 (graphObject_: Obj957) named name
    self.drawConnections(
 )
    # Connections for obj1061 (graphObject_: Obj958) named literal
    self.drawConnections(
 )
    # Connections for obj1062 (graphObject_: Obj959) named name
    self.drawConnections(
 )
    # Connections for obj1063 (graphObject_: Obj960) named pivot
    self.drawConnections(
 )
    # Connections for obj1064 (graphObject_: Obj961) named eq2
    self.drawConnections(
(self.obj1064,self.obj1087,[958.0, 339.0, 936.0, 372.5],"true", 2),
(self.obj1064,self.obj1090,[958.0, 339.0, 976.0, 406.5],"true", 2) )
    # Connections for obj1065 (graphObject_: Obj962) named eq1
    self.drawConnections(
(self.obj1065,self.obj1088,[678.0, 319.0, 526.0, 316.5],"true", 2),
(self.obj1065,self.obj1091,[678.0, 319.0, 666.0, 276.5],"true", 2) )
    # Connections for obj1066 (graphObject_: Obj963) named eq3
    self.drawConnections(
(self.obj1066,self.obj1089,[378.0, 559.0, 316.0, 549.5],"true", 2),
(self.obj1066,self.obj1092,[378.0, 559.0, 445.0, 539.0],"true", 2) )
    # Connections for obj1067 (graphObject_: Obj964) named concat1
    self.drawConnections(
(self.obj1067,self.obj1093,[654.0, 234.0, 584.0, 234.0],"true", 2),
(self.obj1067,self.obj1094,[654.0, 234.0, 604.0, 194.0],"true", 2) )
    # Connections for obj1068 (graphObject_: Obj965) named sh
    self.drawConnections(
 )
    # Connections for obj1069 (graphObject_: Obj966) named B
    self.drawConnections(
 )
    # Connections for obj1070 (graphObject_: Obj967) named instfortrans
    self.drawConnections(
 )
    # Connections for obj1071 (graphObject_: Obj968) of type paired_with
    self.drawConnections(
(self.obj1071,self.obj1053,[140.5, 162.0, 143.0, 273.0],"true", 2) )
    # Connections for obj1072 (graphObject_: Obj969) of type match_contains
    self.drawConnections(
(self.obj1072,self.obj1055,[234.0, 67.0, 324.4847501237708, 71.30207447863364],"true", 2) )
    # Connections for obj1073 (graphObject_: Obj970) of type match_contains
    self.drawConnections(
(self.obj1073,self.obj1057,[234.0, 117.0, 330.0, 164.0],"true", 2) )
    # Connections for obj1074 (graphObject_: Obj971) of type match_contains
    self.drawConnections(
(self.obj1074,self.obj1056,[465.0, 50.5, 830.0, 68.0],"true", 2) )
    # Connections for obj1075 (graphObject_: Obj972) of type match_contains
    self.drawConnections(
(self.obj1075,self.obj1054,[484.0, 107.0, 830.0, 163.0],"true", 2) )
    # Connections for obj1076 (graphObject_: Obj973) of type apply_contains
    self.drawConnections(
(self.obj1076,self.obj1059,[149.5, 358.0, 372.0, 431.0],"true", 2) )
    # Connections for obj1077 (graphObject_: Obj974) of type apply_contains
    self.drawConnections(
(self.obj1077,self.obj1058,[179.5, 347.0, 772.0, 431.0],"true", 2) )
    # Connections for obj1078 (graphObject_: Obj975) of type directLink_T
    self.drawConnections(
(self.obj1078,self.obj1058,[517.0, 430.0, 772.0, 431.0],"true", 2) )
    # Connections for obj1079 (graphObject_: Obj976) of type directLink_S
    self.drawConnections(
(self.obj1079,self.obj1057,[330.0, 133.0, 330.0, 164.0],"true", 2) )
    # Connections for obj1080 (graphObject_: Obj977) of type directLink_S
    self.drawConnections(
(self.obj1080,self.obj1056,[577.2423750618855, 73.15103723931682, 830.0, 68.0],"true", 2) )
    # Connections for obj1081 (graphObject_: Obj978) of type directLink_S
    self.drawConnections(
(self.obj1081,self.obj1054,[859.0, 103.5, 830.0, 163.0],"true", 2) )
    # Connections for obj1082 (graphObject_: Obj979) of type directLink_S
    self.drawConnections(
(self.obj1082,self.obj1054,[621.2423750618855, 102.15103723931682, 830.0, 163.0],"true", 2) )
    # Connections for obj1083 (graphObject_: Obj980) of type hasAttribute_S
    self.drawConnections(
(self.obj1083,self.obj1060,[692.0, 158.5, 554.0, 161.0],"true", 2) )
    # Connections for obj1084 (graphObject_: Obj981) of type hasAttribute_T
    self.drawConnections(
(self.obj1084,self.obj1061,[843.0, 418.5, 914.0, 406.0],"true", 2) )
    # Connections for obj1085 (graphObject_: Obj982) of type hasAttribute_T
    self.drawConnections(
(self.obj1085,self.obj1062,[363.0, 392.5, 374.0, 314.0],"true", 2) )
    # Connections for obj1086 (graphObject_: Obj983) of type hasAttribute_T
    self.drawConnections(
(self.obj1086,self.obj1063,[303.0, 482.5, 194.0, 534.0],"true", 2) )
    # Connections for obj1087 (graphObject_: Obj984) of type leftExpr
    self.drawConnections(
(self.obj1087,self.obj1061,[936.0, 372.5, 914.0, 406.0],"true", 2) )
    # Connections for obj1088 (graphObject_: Obj985) of type leftExpr
    self.drawConnections(
(self.obj1088,self.obj1062,[526.0, 316.5, 374.0, 314.0],"true", 2) )
    # Connections for obj1089 (graphObject_: Obj986) of type leftExpr
    self.drawConnections(
(self.obj1089,self.obj1063,[316.0, 549.5, 194.0, 534.0],"true", 2) )
    # Connections for obj1090 (graphObject_: Obj987) of type rightExpr
    self.drawConnections(
(self.obj1090,self.obj1068,[976.0, 406.5, 994.0, 474.0],"true", 2) )
    # Connections for obj1091 (graphObject_: Obj988) of type rightExpr
    self.drawConnections(
(self.obj1091,self.obj1067,[666.0, 276.5, 654.0, 234.0],"true", 2) )
    # Connections for obj1092 (graphObject_: Obj989) of type rightExpr
    self.drawConnections(
(self.obj1092,self.obj1070,[445.0, 539.0, 534.0, 514.0],"true", 2) )
    # Connections for obj1093 (graphObject_: Obj990) of type hasArgs
    self.drawConnections(
(self.obj1093,self.obj1069,[584.0, 234.0, 497.0, 234.0],"true", 2) )
    # Connections for obj1094 (graphObject_: Obj991) of type hasArgs
    self.drawConnections(
(self.obj1094,self.obj1060,[604.0, 194.0, 554.0, 161.0],"true", 2) )

newfunction = Transition2QInstOUT_MDL

loadedMMName = 'UMLRT2Kiltera_MM_META'

atom3version = '0.3'


text:
package com.odiago.flumebase.exec.local;

import com.odiago.flumebase.exec.EventWrapper;
import com.odiago.flumebase.exec.FlowElement;

/**
 * A container for an event that should be posted to the FlowElement.
 */
public class PendingEvent {
  private final FlowElement mTarget;
  private final EventWrapper mEvent;

  public PendingEvent(FlowElement fe, EventWrapper event) {
    mTarget = fe;
    mEvent = event;
  }

  public EventWrapper getEvent() {
    return mEvent;
  }

  public FlowElement getFlowElement() {
    return mTarget;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("(\"");
    String eventStr = mEvent.getEventText();
    sb.append(eventStr);
    sb.append("\" -> ");
    sb.append(mTarget);
    sb.append(")");
    return sb.toString();
  }
}

redpajama_set_name: RedPajamaGithub


text:
/***********************************************************************/
/*                                                                     */
/*                           Objective Caml                            */
/*                                                                     */
/*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         */
/*                                                                     */
/*  Copyright 1996 Institut National de Recherche en Informatique et   */
/*  en Automatique.  All rights reserved.  This file is distributed    */
/*  under the terms of the GNU Library General Public License, with    */
/*  the special exception on linking described in file ../../LICENSE.  */
/*                                                                     */
/***********************************************************************/

/* $Id: schar2.c 4144 2001-12-07 13:41:02Z xleroy $ */

signed char foo[]="\377";

int main(int argc, char ** argv)
{
  int i;
  i = foo[0];
  exit(i != -1);
}


text:
{% extends "ui/app.html" %}

{% load i18n%}

{% block container %}

{% trans 'Cambio de identificación del paciente' %}

   {% if patient_user.email %}

        {% trans 'Se le ha enviado un correo electrónico al paciente con el nuevo nombre de usuario.' %}

    {% else %}

        {% trans 'Paciente actualizado correctamente. Puede continuar al siguiente bloque.' %}

    {% endif %}

        {% trans 'Continuar' %}

{% endblock %}

{% block right %}
  {% include "consulting/patient/card.html" %}
{% endblock %}


text:
/*
 * automaton_transition_file_loader.h
 *
 *  Created on: 5 Mar 2010
 *      Author: David
 */

#ifndef AUTOMATON_TRANSITION_FILE_LOADER_H_
#define AUTOMATON_TRANSITION_FILE_LOADER_H_

#include "ezxml/ezxml.h"

struct automaton;
struct automaton_set;

/*
 * The maximum length of a line in the transition file. If this is exceeded
 * then we abort the file.
 */
#define MAX_TRANSITION_FILE_LINE_LEN 1024

/*
 * The number of different fields described in a transition block. Used to store
 * all the lines for post processing.
 */
#define NUM_TRANSITION_FIELDS 4

/*
 * The maximum length of a filename describing where the lua, csv files are in
 * an automaton.
 */
#define MAX_INT_FILENAME_LEN 1024

/*
 * PARSE_SINGLE_AUTOMATON_RET_CODES
 *
 * PARSE_SINGLE_AUTOMATON_OK - If the function was successful.
 * PARSE_SINGLE_AUTOMATON_PARSE_FAIL - If any part of the file could not be
 *                                     parsed.
 * PARSE_SINGLE_AUTOMATON_LOAD_MISSING_CSV_FILENAME - xml missing csv_filename
 *                                                    tag.
 * PARSE_SINGLE_AUTOMATON_MISSING_LUA_FILENAME - xml missing lua_filename tag.
 * PARSE_SINGLE_AUTOMATON_LOAD_MISSING_START_STATE - xml missing start_state
 *                                                   tag.
 * PARSE_SINGLE_AUTOMATON_LOAD_INVALID_START_STATE - start_state tag doesn't match
 *                                                   match any states in
 *                                                   automaton.
 */
#define PARSE_SINGLE_AUTOMATON_OK                        0
#define PARSE_SINGLE_AUTOMATON_PARSE_FAIL                1
#define PARSE_SINGLE_AUTOMATON_LOAD_MISSING_CSV_FILENAME 2
#define PARSE_SINGLE_AUTOMATON_LOAD_MISSING_LUA_FILENAME 3
#define PARSE_SINGLE_AUTOMATON_LOAD_MISSING_START_STATE  4
#define PARSE_SINGLE_AUTOMATON_LOAD_INVALID_START_STATE  5

/*
 * AUTOMATON_XML_FILE_RET_CODES
 *
 * AUTOMATON_XML_FILE_OK - Function successful.
 * AUTOMATON_XML_FILE_LOAD_FAIL - Failed to load the xml file.
 * AUTOMATON_XML_FILE_PARSE_FAIL - Failed to parse the links for one of the
 *                                 automatons.
 * AUTOMATON_XML_FILE_START_AUTOMATON_BAD - The automaton set does not have a
 *                                          starting automaton.
 */
#define AUTOMATON_XML_FILE_OK                  0
#define AUTOMATON_XML_FILE_LOAD_FAIL           1
#define AUTOMATON_XML_FILE_LINKS_FAIL          2
#define AUTOMATON_XML_FILE_START_AUTOMATON_BAD 3

int parse_single_automaton(ezxml_t,
                           struct automaton *,
                           struct automaton_set *, char *, char *);
int parse_automaton_set_xml_file(char *,
                                 struct automaton_set *,
                                 int(*)(struct automaton_state ***, int),
                                 int(*)(struct automaton_event ***),
                                 struct match_state *);

#endif /* AUTOMATON_TRANSITION_FILE_LOADER_H_ */


text:
module Cb
  module Models
    module Branding
      class Section
        attr_accessor :type, :section_1, :section_2, :section_3, :description, :requirements, :snapshot

        def initialize(type, args = {})
          @type = type
          @section_1 = args['Section1'] || ''
          @section_2 = args['Section2'] || ''
          @section_3 = args['Section3'] || ''
          @description = args['Description'] || ''
          @requirements = args['Requirements'] || ''
          @snapshot = args['Snapshot'] || ''
        end
      end
    end
  end
end


text:
<meta charset="UTF-8">
<title>doAction - core</title>
<link rel="stylesheet" href="..\..\style.css">

core / com.erikcupal.theblackcatclient.helpers / doAction

doAction

fun doAction(callback: () -> Unit): Action


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="User-PC" name="com.example.tests.ContactModification" tests="5" failures="0" timestamp="23 Apr 2014 20:02:29 GMT" time="16.613" errors="0">
  <testcase name="modifySomeContact" time="3.378" classname="com.example.tests.ContactModification"/>
  <testcase name="modifySomeContact" time="3.115" classname="com.example.tests.ContactModification"/>
  <testcase name="modifySomeContact" time="3.190" classname="com.example.tests.ContactModification"/>
  <testcase name="modifySomeContact" time="3.441" classname="com.example.tests.ContactModification"/>
  <testcase name="modifySomeContact" time="3.489" classname="com.example.tests.ContactModification"/>
</testsuite> <!-- com.example.tests.ContactModification -->


text:
class UsersController < ApplicationController

  before_filter :load_user, :only => [:show, :edit, :update, :destroy]
  before_filter :must_be_self, :only => [:edit, :update, :destroy]
  protect_from_forgery :except => [:api_key, :login]

  # GET /users
  # GET /users.xml
  def index
   if @current_goal
      @link_name = "users"
      @users = User.paginate :page => params[:page],
                             :per_page => 10,
                             :include => [:usergoals, :goals]
                             # ,
                             #:conditions => {"usergoals.goal_id" => @current_goal.id}
    else
      if @current_user
        #Find all people who share a goal with the current user.
        #(Kind of horrible)
        @link_name = "users"
        @users = User.paginate :page => params[:page],
                               :per_page => 10,
                               :joins => {:goals => :usergoals},
                               :select => 'distinct users.*'
                               #,
                               #:conditions => {"usergoals_goals.user_id" => @current_user.id}
      else
        @link_name = "users"
        @users = User.paginate :page => params[:page],
                               :per_page => 10
      end
    end
    respond_to do |format|
      format.html # by default index.html.erb
    end
  end

  # GET /users/1
  # GET /users/1.xml
  def show
    respond_to do |format|
      format.html # show.html.erb
    end
  end

  # GET /users/new
  # GET /users/new.xml
  def new
    @user = User.new

    respond_to do |format|
      format.html # new.html.erb
    end
  end

  # GET /users/1/edit
  def edit
  end

  # POST /users
  # POST /users.xml
  def create
    @user = User.new(params[:user])

    respond_to do |format|
      if @user.save
        session[:current_user] = @user.id
        format.html { redirect_to(@user, :notice => 'User was successfully created.') }
      else
        format.html { render :action => "new" }
      end
    end
  end

  # PUT /users/1
  # PUT /users/1.xml
  def update
    respond_to do |format|
      if @user.update_attributes(params[:user])
        format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
      else
        format.html { render :action => "edit" }
      end
    end
  end

  # DELETE /users/1
  # DELETE /users/1.xml
  def destroy
    @user.destroy

    respond_to do |format|
      format.html { redirect_to(users_url) }
    end
  end

  def login
    user = User.auth(params[:login][:username],
                     params[:login][:password])
    if user
      flash[:notice] = "Logged in."
      session[:current_user] = user.id
    else
      flash[:error] = "Failed to log in."
    end
    redirect_to request.referer
  end

  def logout
    session[:current_user] = nil
    redirect_to '/'
  end

  def me
    if @current_user
      redirect_to @current_user
    else
      redirect_to '/'
    end
  end

  def api_key

    # Allow login parameters to be passed when requesting an api key.
    if params[:login]
      user = User.auth(params[:login][:username],
                       params[:login][:password])
      if user
        session[:current_user] = user.id
        @current_user = user
      end
    end

    respond_to do |format|
      if @current_user
        info = {:apiKey => {:user => @current_user.name, :key => @current_user.api_key}}
        format.xml  {render :xml => @current_user.to_xml(:only => [:name, :api_key])}
        format.json {render :json => @current_user.to_json(:only => [:name, :api_key])}
        format.js   {render :json => @current_user.to_json(:only => [:name, :api_key]), :callback => 'charting.apiKey'}
      else
        format.xml  {render :text => '<error>Not logged in.</error>', :status => :forbidden}
        format.json {render :json => '"Not logged in."', :status => :forbidden}
        format.js   {render :json => '"Not logged in."', :callback => 'charting.apiKeyError'}
      end
    end
  end

  def verify_api_key
    respond_to do |format|
      if params[:user] and User.find_by_name_and_api_key(params[:user][:name], params[:user][:key])
        format.xml  {render :text => '<apiKey><status>Verified</status></apiKey>'}
        format.json {render :json => '"Verified."'}
        format.js   {render :json => '"Verified."', :callback => 'charting.keyVerified'}
      else
        format.xml  {render :text => '<apiKey><status>Failed</status></apiKey>'}
        format.json {render :text => '"Invalid."', :status => :forbidden}
        format.js   {render :json => '"Invalid."', :callback => 'charting.keyInvalid'}
      end
    end
  end

  private
  def load_user
    @user = User.find(params[:id])
  end

  def must_be_self
    p @user
    p @current_user
    if @user != @current_user
      flash[:error] = "Cannot perform this action on another user."
      redirect_to request.referer
    end
  end
end


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>sharding-jdbc-example</artifactId>
        <groupId>com.dangdang</groupId>
        <version>1.4.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>sharding-jdbc-example-config-spring-masterslave</artifactId>
</project>


text:
<?php

class Revision2_addIndex extends opMigration
{
  public function up()
  {
    $conn = $this->getConnection();

    if (!$conn->import->tableIndexExists('created_at_idx', 'intro_friend'))
    {
      $this->addIndex('intro_friend', 'created_at_idx', array('fields' => array('created_at')));
    }

    if (!$conn->import->tableIndexExists('member_id_from_member_id_to_idx', 'intro_friend'))
    {
      $this->addIndex('intro_friend', 'member_id_from_member_id_to_idx', array('fields' => array('member_id_from', 'member_id_to')));
    }
  }

  public function down()
  {
    $conn = $this->getConnection();

    if ($conn->import->tableIndexExists('created_at_idx', 'intro_friend'))
    {
      $this->dropIndex('intro_friend', 'created_at_idx');
    }

    if ($conn->import->tableIndexExists('member_id_from_member_id_to_idx', 'intro_friend'))
    {
      $this->dropIndex('intro_friend', 'member_id_from_member_id_to_idx');
    }
  }
}


text:
// This file is used into ../../app.module.ts

import { Action } from '@ngrx/store';

export const SAY_HELLO = '[Example] Say Hello';
export const SAY_BYEBYE = '[Example] Say ByeBye';

export class SayHelloAction implements Action {
  readonly type = SAY_HELLO;
}

export class SayByeByeAction implements Action {
  readonly type = SAY_BYEBYE;
}

export type Actions = SayHelloAction | SayByeByeAction;


text:
layout: post
title: "Reinventing the Wheel"
date: 2016-8-4
redirect_from: /reinventing-the-wheel.html
---
I've been working on some front-end design for a website I'm creating, and that's okay, but I'm getting a little sick of just making things pretty. I wanted to make another tool, and potentially learn a little something in the process. After much consideration, I decided to go for a tool that compiles Scratch projects into Javascript. [http://phosphorus.github.io/](http://phosphorus.github.io/), but I don't really mind. I'll try to make mine a bit different by allowing the aspect ratio of the project to change, but for the most part I'll just be re-doing what has been done before (and probably much less elegantly).

The first step was to pick a language, and because this is meant to be a learning experience, I decided to go with Python. I haven't used Python much and it makes a lot of sense for this project, so that's what I'm going with.

The next step, for me, was to learn a bit about Python's file I/O. Ideally, this will be a command line tool where you can give it a .sb2 and it will spit out a .html (the html file will contain everything in it, for easy project portability).

I managed, after a few attempts, to read the project JSON and print it out into the console:

```python
import zipfile
zf = zipfile.ZipFile('myProjectName.sb2', 'r')

print zf.read('project.json')
```

Of course, `myProjectName.sb2` isn't really an acceptable file name, so I had to let users input their own. I added a command line argument to fix that:

```python
import zipfile, argparse

parser = argparse.ArgumentParser()
parser.add_argument('filename', type=str)
args = parser.parse_args()

zf = zipfile.ZipFile(args.filename, 'r')

print zf.read('project.json')
```

 Now you can run `python compile.py yourproject.sb2` to see the json.

The last thing I wanted to do before taking a break was parse the json. It turned out to be surprisingly easy:

```python
import zipfile, argparse, json

parser = argparse.ArgumentParser()
parser.add_argument('filename', type=str)
args = parser.parse_args()

zf = zipfile.ZipFile(args.filename, 'r')

projectJSON = zf.read('project.json')

print json.loads(projectJSON)["costumes"][0]["costumeName"]
```

Then we can get the name of the first backdrop:

```
python compile.py project.sb2
> backdrop1
```

So far this project has been coming along fairly well! There's nothing too interesting going on just yet, but I'm having fun, and that was really the goal in the first place.


text:
package com.hazelcast.internal.config;

import com.hazelcast.config.Config;
import com.hazelcast.config.MergePolicyConfig;
import com.hazelcast.config.SetConfig;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.test.HazelcastParallelClassRunner;
import com.hazelcast.test.annotation.ParallelJVMTest;
import com.hazelcast.test.annotation.QuickTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

/**
 * Tests the integration of the {@link MergePolicyValidator}
 * into the proxy creation of split-brain capable data structures.
 */
@RunWith(HazelcastParallelClassRunner.class)
@Category({QuickTest.class, ParallelJVMTest.class})
public class MergePolicyValidatorSetIntegrationTest extends AbstractMergePolicyValidatorIntegrationTest {

    @Override
    void addConfig(Config config, String name, MergePolicyConfig mergePolicyConfig) {
        SetConfig setConfig = new SetConfig(name)
                .setMergePolicyConfig(mergePolicyConfig);

        config.addSetConfig(setConfig);
    }

    @Test
    public void testSet_withPutIfAbsentMergePolicy() {
        HazelcastInstance hz = getHazelcastInstance("putIfAbsent", putIfAbsentMergePolicy);

        hz.getSet("putIfAbsent");
    }

    @Test
    public void testSet_withHyperLogLogMergePolicy() {
        HazelcastInstance hz = getHazelcastInstance("cardinalityEstimator", hyperLogLogMergePolicy);

        expectCardinalityEstimatorException();
        hz.getSet("cardinalityEstimator");
    }

    @Test
    public void testSet_withHigherHitsMergePolicy() {
        HazelcastInstance hz = getHazelcastInstance("higherHits", higherHitsMergePolicy);

        expectedHigherHitsException();
        hz.getSet("higherHits");
    }

    @Test
    public void testSet_withInvalidMergePolicy() {
        HazelcastInstance hz = getHazelcastInstance("invalid", invalidMergePolicyConfig);

        expectedInvalidMergePolicyException();
        hz.getSet("invalid");
    }
}


text:
class Topic
  include Mongoid::Document
  include Mongoid::Elasticsearch
  elasticsearch!
  field :name, type: String
  field :place, type: String
  field :gar, type: Array, default: []
  field :has, type: Hash, default: {}

  def self.agg

    Topic.collection.aggregate([

      {
        "$match" => {
          "$or" => [
            {
              "gar" => "hello"
            },
            {
              "name" => "eminem"
            }
          ]
        }
      },
      {
        "$project" => {
           "gar" => {
              "$filter" => {
                 "input" => "$gar",
                 "as" => "gar",
                 "cond" => { "$eq" => [ "$$gar", "hello" ] }
              }
           }
        }
      }

    ])

  end

  def self.mailgun

		##########

		# First, instantiate the Mailgun Client with your API key
		mg_client = Mailgun::Client.new 'key-6263360b078081b625182ff17d7a92fd'

		# Define your message parameters
		message_params =  { from: 'bob@sending_domain.com',
		                    to:   'bhargav.r.raut@gmail.com',
		                    subject: 'The Ruby SDK is awesome!',
		                    text:    'It is really easy to send a message!'
		                  }

		# Send your message through the client
		result = mg_client.send_message('sandboxc0248205473845c3a998e44941ee503e.mailgun.org', message_params).to_h!

		puts result.to_s

  end

  def self.delay
  	message = Auth.configuration.mailer_class.constantize.notification(nil,nil)
  	puts message.class.name
  	puts message.message.class.name
  	message.message_id = "here-is-my-test-message-id"
  	r = message.deliver
  	puts r.class.name
  	puts r.message_id
  end

end


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>ru.nsu.java.db</groupId>
    <artifactId>parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>jpa</artifactId>
  <packaging>jar</packaging>

  <name>JPA implementation</name>

  <dependencies>
    <dependency>
      <groupId>ru.nsu.java.db</groupId>
      <artifactId>api</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>4.3.8.Final</version>
    </dependency>
  </dependencies>
</project>


text:
<?php

defined('JPATH_PLATFORM') or die;

JLog::add('JDocumentRendererRSS is deprecated, use JDocumentRendererFeedRss instead.', JLog::WARNING, 'deprecated');

/**
 * JDocumentRendererRSS is a feed that implements RSS 2.0 Specification
 *
 * @see         http://www.rssboard.org/rss-specification
 * @since       11.1
 * @deprecated  4.0  Use JDocumentRendererFeedRss instead
 */
class JDocumentRendererRSS extends JDocumentRendererFeedRss
{
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>Pardal</logradouro><bairro>Vasco da Gama</bairro><cidade>Recife</cidade><uf>PE</uf><cep>52081526</cep></feed>


text:
// +build !ignore_autogenerated

// This file was autogenerated by deepcopy-gen. Do not edit it manually!

package scheduling

import (
	conversion "k8s.io/apimachinery/pkg/conversion"
	runtime "k8s.io/apimachinery/pkg/runtime"
	reflect "reflect"
)

func init() {
	SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
	return scheme.AddGeneratedDeepCopyFuncs(
		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
			in.(*PriorityClass).DeepCopyInto(out.(*PriorityClass))
			return nil
		}, InType: reflect.TypeOf(&PriorityClass{})},
		conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
			in.(*PriorityClassList).DeepCopyInto(out.(*PriorityClassList))
			return nil
		}, InType: reflect.TypeOf(&PriorityClassList{})},
	)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PriorityClass) DeepCopyInto(out *PriorityClass) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClass.
func (in *PriorityClass) DeepCopy() *PriorityClass {
	if in == nil {
		return nil
	}
	out := new(PriorityClass)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PriorityClass) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	} else {
		return nil
	}
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PriorityClassList) DeepCopyInto(out *PriorityClassList) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	out.ListMeta = in.ListMeta
	if in.Items != nil {
		in, out := &in.Items, &out.Items
		*out = make([]PriorityClass, len(*in))
		for i := range *in {
			(*in)[i].DeepCopyInto(&(*out)[i])
		}
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClassList.
func (in *PriorityClassList) DeepCopy() *PriorityClassList {
	if in == nil {
		return nil
	}
	out := new(PriorityClassList)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PriorityClassList) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	} else {
		return nil
	}
}


text:
package com.google.glassware;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * A filter which ensures that prevents unauthenticated users from accessing the
 * web app
 *
 * @author Jenny Murphy - http://google.com/+JennyMurphy
 */
public class AuthFilter implements Filter {
  private static final Logger LOG = Logger.getLogger(AuthFilter.class.getSimpleName());

  public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
      throws IOException, ServletException {
    if (response instanceof HttpServletResponse && request instanceof HttpServletRequest) {
      HttpServletRequest httpRequest = (HttpServletRequest) request;
      HttpServletResponse httpResponse = (HttpServletResponse) response;

      // skip auth for static content, middle of auth flow, notify servlet
      if (httpRequest.getRequestURI().startsWith("/static") ||
          httpRequest.getRequestURI().equals("/oauth2callback") ||
          httpRequest.getRequestURI().equals("/notification")) {
        LOG.info("Skipping auth check during auth flow");
        filterChain.doFilter(request, response);
        return;
      }

      LOG.fine("Checking to see if anyone is logged in");
      if (AuthUtil.getUserId(httpRequest) == null
          || AuthUtil.getCredential(AuthUtil.getUserId(httpRequest)) == null
          || AuthUtil.getCredential(AuthUtil.getUserId(httpRequest)).getAccessToken() == null) {
        // redirect to auth flow
        httpResponse.sendRedirect(WebUtil.buildUrl(httpRequest, "/oauth2callback"));
        return;
      }

      // Things checked out OK :)
      filterChain.doFilter(request, response);
    } else {
      LOG.warning("Unexpected non HTTP servlet response. Proceeding anyway.");
      filterChain.doFilter(request, response);
    }
  }

  @Override
  public void init(FilterConfig filterConfig) throws ServletException {
  }

  @Override
  public void destroy() {
  }
}


text:
import os
import sys
import linecache
import re
import Tkinter as tk

from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas
from idlelib.ObjectBrowser import ObjectTreeItem, make_objecttreeitem
from idlelib.PyShell import PyShellFileList

def StackBrowser(root, flist=None, tb=None, top=None):
    if top is None:
        top = tk.Toplevel(root)
    sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
    sc.frame.pack(expand=1, fill="both")
    item = StackTreeItem(flist, tb)
    node = TreeNode(sc.canvas, None, item)
    node.expand()

class StackTreeItem(TreeItem):

    def __init__(self, flist=None, tb=None):
        self.flist = flist
        self.stack = self.get_stack(tb)
        self.text = self.get_exception()

    def get_stack(self, tb):
        if tb is None:
            tb = sys.last_traceback
        stack = []
        if tb and tb.tb_frame is None:
            tb = tb.tb_next
        while tb is not None:
            stack.append((tb.tb_frame, tb.tb_lineno))
            tb = tb.tb_next
        return stack

    def get_exception(self):
        type = sys.last_type
        value = sys.last_value
        if hasattr(type, "__name__"):
            type = type.__name__
        s = str(type)
        if value is not None:
            s = s + ": " + str(value)
        return s

    def GetText(self):
        return self.text

    def GetSubList(self):
        sublist = []
        for info in self.stack:
            item = FrameTreeItem(info, self.flist)
            sublist.append(item)
        return sublist

class FrameTreeItem(TreeItem):

    def __init__(self, info, flist):
        self.info = info
        self.flist = flist

    def GetText(self):
        frame, lineno = self.info
        try:
            modname = frame.f_globals["__name__"]
        except:
            modname = "?"
        code = frame.f_code
        filename = code.co_filename
        funcname = code.co_name
        sourceline = linecache.getline(filename, lineno)
        sourceline = sourceline.strip()
        if funcname in ("?", "", None):
            item = "%s, line %d: %s" % (modname, lineno, sourceline)
        else:
            item = "%s.%s(...), line %d: %s" % (modname, funcname,
                                             lineno, sourceline)
        return item

    def GetSubList(self):
        frame, lineno = self.info
        sublist = []
        if frame.f_globals is not frame.f_locals:
            item = VariablesTreeItem("<locals>", frame.f_locals, self.flist)
            sublist.append(item)
        item = VariablesTreeItem("<globals>", frame.f_globals, self.flist)
        sublist.append(item)
        return sublist

    def OnDoubleClick(self):
        if self.flist:
            frame, lineno = self.info
            filename = frame.f_code.co_filename
            if os.path.isfile(filename):
                self.flist.gotofileline(filename, lineno)

class VariablesTreeItem(ObjectTreeItem):

    def GetText(self):
        return self.labeltext

    def GetLabelText(self):
        return None

    def IsExpandable(self):
        return len(self.object) > 0

    def GetSubList(self):
        sublist = []
        for key in self.object.keys():
            try:
                value = self.object[key]
            except KeyError:
                continue
            def setfunction(value, key=key, object=self.object):
                object[key] = value
            item = make_objecttreeitem(key + " =", value, setfunction)
            sublist.append(item)
        return sublist

    def keys(self):  # unused, left for possible 3rd party use
        return self.object.keys()

def _stack_viewer(parent):  # htest #
    root = tk.Tk()
    root.title("Test StackViewer")
    width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
    root.geometry("+%d+%d"%(x, y + 150))
    flist = PyShellFileList(root)
    try: # to obtain a traceback object
        intentional_name_error
    except NameError:
        exc_type, exc_value, exc_tb = sys.exc_info()

    # inject stack trace to sys
    sys.last_type = exc_type
    sys.last_value = exc_value
    sys.last_traceback = exc_tb

    StackBrowser(root, flist=flist, top=root, tb=exc_tb)

    # restore sys to original state
    del sys.last_type
    del sys.last_value
    del sys.last_traceback

if __name__ == '__main__':
    from idlelib.idle_test.htest import run
    run(_stack_viewer)


text:
from django.conf import settings
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db import IntegrityError
from django.http import (HttpResponseRedirect,
                         HttpResponseNotFound,
                         HttpResponseBadRequest)
from django.test import TestCase
from pamietacz.models import Shelf, Deck, Card
from test_utils import (add_shelf,
                        add_deck,
                        add_card,
                        TestCaseWithAuthentication)
from PIL import Image
import StringIO
import shutil
import os

class AddCardTests(TestCaseWithAuthentication):
    def test_add_card(self):
        shelf_name = "Some nice shelf"
        deck_name = "Some nice deck"
        card_question = "What is it?"
        card_answer = "This is that."

        add_shelf(self.client, shelf_name)

        # Add deck.
        shelf = Shelf.objects.all()[0]
        add_deck(self.client, shelf.id, deck_name)

        # There is no card shown on deck page.
        deck = Deck.objects.all()[0]
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertNotIn(card_question, r.content)
        self.assertNotIn(card_answer, r.content)

        # There are now no cards in database.
        self.assertEqual(len(Card.objects.all()), 0)

        # Add new card.
        r = add_card(self.client, deck.id, card_question, card_answer)
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)

        # There is now one card in database.
        self.assertEqual(len(Card.objects.all()), 1)

        # Card is also shown on deck page.
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertIn(card_question, r.content)
        self.assertIn(card_answer, r.content)

    def test_add_card_with_the_same_question_to_one_deck(self):
        """For one deck card questions must be unique. However
        different decks can have cards with the same questions."""
        shelf_name = "Some nice shelf"
        deck_name1 = "Some nice deck"
        deck_name2 = "Some other deck"
        card_question = "What is it?"
        card_answer = "This is that."

        add_shelf(self.client, shelf_name)

        # Add deck.
        shelf = Shelf.objects.all()[0]
        add_deck(self.client, shelf.id, deck_name1)

        # Add some card.
        deck1 = Deck.objects.all()[0]
        add_card(self.client, deck1.id, card_question, card_answer)
        self.assertEqual(len(Card.objects.all()), 1)

        # Try to add another card with the same question to the same deck.
        # It is forbidden.
        r = add_card(self.client, deck1.id, card_question, card_answer)
        self.assertIn(("The question for this card already exists"
                       " in this deck."),
                      r.content)
        self.assertEqual(len(Card.objects.all()), 1)

        # Try to add another card with similar question but with
        # some trailing whitespaces. Question will be stripped
        # and the card will be not added.
        r = add_card(self.client, deck1.id, " What is it?    \n ",
                     card_answer)
        self.assertIn(("The question for this card already exists"
                       " in this deck."),
                      r.content)
        self.assertEqual(len(Card.objects.all()), 1)

        # Try to edit the same card without changing question.
        # It should pass - there is still only one card in the deck
        # with this question.
        cards = Card.objects.all()
        card = cards[0]
        r = self.client.post("/card/%s/edit/" % card.id,
                             {"question": card_question,
                              "answer": card_answer}, follow=True)
        self.assertNotIn(("The question for this card already exists"
                          " in this deck."),
                         r.content)

        # Add some another card successfully.
        add_card(self.client, deck1.id, "Yeyeye", card_answer)
        self.assertEqual(len(Card.objects.all()), 2)

        # Try to edit previous card with the question the same like
        # in new card just added - it should fail.
        r = self.client.post("/card/%s/edit/" % card.id,
                             {"question": "Yeyeye",
                              "answer": card_answer})
        self.assertIn(("The question for this card already exists"
                       " in this deck."),
                      r.content)

        # Add another deck.
        add_deck(self.client, shelf.id, deck_name2)
        deck2 = Deck.objects.all()[1]

        # Try to add new card with the same question like in previous card
        # but previous card was added to DIFFERENT deck. It should
        # be ok.
        r = add_card(self.client, deck2.id, card_question, card_answer)
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)
        self.assertEqual(len(Card.objects.all()), 3)

        # Two cards with the same pair question and answer should be not
        # placed in database.
        card = Card(question="What is it?",
                    answer="This is that.",
                    deck=deck1)
        self.assertRaises(IntegrityError, card.save)

    def test_add_card_with_empty_question(self):
        """Question and answer for the card cannot be empty."""

        shelf_name = "Some nice shelf"
        deck_name = "Some nice deck"
        card_question = ""
        card_answer = "This is that."

        add_shelf(self.client, shelf_name)

        # Add deck.
        shelf = Shelf.objects.all()[0]
        add_deck(self.client, shelf.id, deck_name)

        # Get deck.
        deck = Deck.objects.all()[0]

        # Add new card.
        r = add_card(self.client, deck.id, card_question, card_answer)
        self.assertIn("This field is required.", r.content)

class EditCardTests(TestCaseWithAuthentication):
    def test_edit_card(self):
        shelf_name = "Some nice shelf"
        deck_name = "Some nice deck"
        card_question = "What is it?"
        card_answer = "This is that."
        new_card_question = "Why so?"
        new_card_answer = "No idea"

        add_shelf(self.client, shelf_name)

        # Add deck.
        shelf = Shelf.objects.all()[0]
        add_deck(self.client, shelf.id, deck_name)

        # Add card.
        deck = Deck.objects.all()[0]
        add_card(self.client, deck.id, card_question, card_answer)

        # Only this card is in database.
        cards = Card.objects.all()
        card = cards[0]
        self.assertEqual(len(cards), 1)

        # Check if card is shown on deck page.
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertIn(card_question, r.content)
        self.assertIn(card_answer, r.content)

        # Edit card.
        r = self.client.post("/card/%s/edit/" % card.id,
                             {"question": new_card_question,
                              "answer": new_card_answer})
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)

        # Edited card is shown on deck page.
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertNotIn(card_question, r.content)
        self.assertNotIn(card_answer, r.content)
        self.assertIn(new_card_question, r.content)
        self.assertIn(new_card_answer, r.content)

        # The number of card objects should not change.
        self.assertEqual(len(Card.objects.all()), 1)

    def test_edit_not_existing_card(self):
        r = self.client.get("/card/%d/edit/" % 777)
        self.assertEqual(r.status_code, HttpResponseNotFound.status_code)

class DeleteCardTests(TestCaseWithAuthentication):
    def test_delete_card(self):
        shelf_name = "Some nice shelf"
        deck_name = "Some nice deck"
        card_question = "What is it?"
        card_answer = "This is that."

        add_shelf(self.client, shelf_name)

        # Add deck.
        shelf = Shelf.objects.all()[0]
        add_deck(self.client, shelf.id, deck_name)

        # Add card.
        deck = Deck.objects.all()[0]
        add_card(self.client, deck.id, card_question, card_answer)

        # Only this card is placed in database.
        cards = Card.objects.all()
        card = cards[0]
        self.assertEqual(len(cards), 1)

        # Check if card is shown on deck page.
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertIn(card_question, r.content)
        self.assertIn(card_answer, r.content)

        # Delete card.
        r = self.client.get("/card/%s/delete/" % card.id)
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)

        # Card is not visible on deck page.
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertNotIn(card_question, r.content)
        self.assertNotIn(card_answer, r.content)

        # There are also no cards in database.
        self.assertEqual(len(Card.objects.all()), 0)

    def test_delete_not_existing_card(self):
        r = self.client.get("/card/%d/delete/" % 777)
        self.assertEqual(r.status_code, HttpResponseNotFound.status_code)

class MarkdownCardTests(TestCaseWithAuthentication):
    def test_question_and_answer_use_markdown(self):
        """Markdown is used to make text looking nicer."""
        shelf_name = "Some nice shelf"
        deck_name = "Some nice deck"
        card_question = "**What is it?**"
        card_answer = ("~~~~{.python}\n"
                       "import os\n"
                       "~~~~")

        # Add shelf, deck and card.
        add_shelf(self.client, shelf_name)
        shelf = Shelf.objects.all()[0]
        add_deck(self.client, shelf.id, deck_name)
        deck = Deck.objects.all()[0]
        add_card(self.client, deck.id, card_question, card_answer)

        # Text is processed by Markdown - ** is transformed to strong and
        # code listing is appropriately formatted.
        r = self.client.get("/deck/%s/show/" % deck.id)
        self.assertIn("What is it?", r.content)
        self.assertIn('

'
                      'import os\n
'
                      '
', r.content)

class NotAuthenticatedCardTests(TestCase):
    def test_add_card(self):
        self.assertEqual(len(Card.objects.all()), 0)
        r = add_card(self.client, 777, "Some question", "Some answer")
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)
        self.assertIn("login", r.get("location"))
        self.assertEqual(len(Card.objects.all()), 0)

    def test_edit_card(self):
        r = self.client.post("/card/%s/edit/" % 777,
                             {"name": "New card name"})
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)
        self.assertIn("login", r.get("location"))

    def test_delete_card(self):
        r = self.client.get("/card/%d/delete/" % 777)
        self.assertEqual(r.status_code, HttpResponseRedirect.status_code)
        self.assertIn("login", r.get("location"))

class UploadImageTests(TestCaseWithAuthentication):
    def setUp(self):
        super(UploadImageTests, self).setUp()
        if os.path.isdir(settings.MEDIA_ROOT):
            shutil.rmtree(settings.MEDIA_ROOT)

    def tearDown(self):
        super(UploadImageTests, self).tearDown()
        if os.path.isdir(settings.MEDIA_ROOT):
            shutil.rmtree(settings.MEDIA_ROOT)

    def test_upload_image(self):
        # Create image.
        new_image = Image.new("RGB", (10, 10), (255, 255, 255))
        image_data = StringIO.StringIO()
        new_image.save(image_data, format="PNG")
        sent_file = SimpleUploadedFile("image_file.png",
                                       image_data.getvalue())

        # Check if image already doesn't exist.
        self.assertFalse(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                     "image_file.png")))

        # Upload image.
        r = self.client.post("/image/upload/", {"uploaded_image": sent_file})
        self.assertEqual(r.status_code, 200)

        # The name of image is returned in response.
        self.assertEqual(r.content, "image_file.png")

        # Check if now image exists.
        self.assertTrue(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                    "image_file.png")))

    def test_upload_file_which_is_not_image(self):
        """Only images can be uploaded. Other file types are discarded."""
        sent_file = SimpleUploadedFile("image_file.txt", "some text")
        self.assertFalse(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                     "image_file.png")))
        r = self.client.post("/image/upload/", {"uploaded_image": sent_file})

        # 400 error is returned when some other filetype than
        # image is uploaded.
        self.assertEqual(r.status_code, HttpResponseBadRequest.status_code)
        self.assertEqual(r.content, "")
        self.assertFalse(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                     "image_file.png")))

    def test_upload_file_with_the_same_name(self):
        """When uploaded file already exists, then Django takes care by
        adding appropriate suffix to make image name unique."""

        # Create image.
        new_image = Image.new("RGB", (10, 10), (255, 255, 255))
        image_data = StringIO.StringIO()
        new_image.save(image_data, format="PNG")
        first_image = SimpleUploadedFile("image_file.png",
                                         image_data.getvalue())

        # Upload first image.
        self.assertFalse(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                     "image_file.png")))
        r = self.client.post("/image/upload/",
                             {"uploaded_image": first_image})
        self.assertEqual(r.status_code, 200)
        self.assertEqual(r.content, "image_file.png")
        self.assertTrue(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                    "image_file.png")))

        # Upload second image with the same name.
        second_image = SimpleUploadedFile("image_file.png",
                                          image_data.getvalue())
        r = self.client.post("/image/upload/",
                             {"uploaded_image": second_image})
        self.assertEqual(r.status_code, 200)

        # Suffix _1 is added to file name.
        self.assertEqual(r.content, "image_file_1.png")
        self.assertTrue(os.path.isfile(os.path.join(settings.MEDIA_ROOT,
                                                    "image_file_1.png")))