	
	--lQuery.model.add_class("GraphDiagramType")
		lQuery.model.add_property("GraphDiagramType", "id")
		lQuery.model.add_property("GraphDiagramType", "caption")
	lQuery.model.add_class("ElemType")
		lQuery.model.add_property("ElemType", "id")
		lQuery.model.add_property("ElemType", "caption")
		lQuery.model.add_property("ElemType", "multiplicityConstraint")
		lQuery.model.add_property("ElemType", "openPropertiesOnElementCreate")
	lQuery.model.add_class("NodeType")
		lQuery.model.add_property("NodeType", "isContainerMandatory")
	lQuery.model.add_class("EdgeType")
		lQuery.model.add_property("EdgeType", "startMultiplicityConstraint")
		lQuery.model.add_property("EdgeType", "endMultiplicityConstraint")
		lQuery.model.add_property("EdgeType", "direction")
	lQuery.model.add_class("PortType")
	lQuery.model.add_class("CompartType")
		lQuery.model.add_property("CompartType", "id")
		lQuery.model.add_property("CompartType", "caption")
		lQuery.model.add_property("CompartType", "isMultiple")
		lQuery.model.add_property("CompartType", "startValue")
		lQuery.model.add_property("CompartType", "adornmentPrefix")
		lQuery.model.add_property("CompartType", "adornmentSuffix")
		lQuery.model.add_property("CompartType", "concatStyle")
		lQuery.model.add_property("CompartType", "isHint")
		lQuery.model.add_property("CompartType", "toBeInvisible")
		lQuery.model.add_property("CompartType", "isEssential")
		lQuery.model.add_property("CompartType", "defaultValue")
		lQuery.model.add_property("CompartType", "shouldBeIncluded")
		lQuery.model.add_property("CompartType", "isGroup")
	lQuery.model.add_class("ChoiceItem")
		lQuery.model.add_property("ChoiceItem", "value")
		lQuery.model.add_property("ChoiceItem", "shouldBeIncluded")
	lQuery.model.add_class("Notation")
		lQuery.model.add_property("Notation", "value")
	lQuery.model.add_class("ToolType")
		lQuery.model.add_property("ToolType", "id")
		lQuery.model.add_property("ToolType", "caption")
	lQuery.model.add_class("PresentationElement")
	lQuery.model.add_class("KeyboardShortcut")
		lQuery.model.add_property("KeyboardShortcut", "key")
		lQuery.model.add_property("KeyboardShortcut", "procedureName")
	lQuery.model.add_class("PropertyElement")
		lQuery.model.add_property("PropertyElement", "height", 1)
		lQuery.model.add_property("PropertyElement", "width", 1)
	lQuery.model.add_class("PropertyDiagram")
		lQuery.model.add_property("PropertyDiagram", "id")
		lQuery.model.add_property("PropertyDiagram", "isReadOnly")
	lQuery.model.add_class("PropertyTab")
		lQuery.model.add_property("PropertyTab", "id")
		lQuery.model.add_property("PropertyTab", "caption")
		lQuery.model.add_property("PropertyTab", "isReadOnly")
		lQuery.model.add_property("PropertyTab", "shouldBeIncluded")
	lQuery.model.add_class("PropertyRow")
		lQuery.model.add_property("PropertyRow", "id")
		lQuery.model.add_property("PropertyRow", "rowType")
		lQuery.model.add_property("PropertyRow", "validationProcedure")
		lQuery.model.add_property("PropertyRow", "isEditable")
		lQuery.model.add_property("PropertyRow", "isReadOnly")
		lQuery.model.add_property("PropertyRow", "isFirstRespondent")
		lQuery.model.add_property("PropertyRow", "shouldBeIncluded")	
	lQuery.model.add_class("PropertyEventHandler")
		lQuery.model.add_property("PropertyEventHandler", "eventType")
		lQuery.model.add_property("PropertyEventHandler", "transformationName")
		lQuery.model.add_property("PropertyEventHandler", "eventSourceType")
	lQuery.model.add_class("Extension")
		lQuery.model.add_property("Extension", "id")
		lQuery.model.add_property("Extension", "caption")
		lQuery.model.add_property("Extension", "type")
	lQuery.model.add_class("Translet")
		lQuery.model.add_property("Translet", "extensionPoint")
		lQuery.model.add_property("Translet", "procedureName")
		lQuery.model.add_property("Translet", "shouldBeIncluded")
	lQuery.model.add_class("Type")
	lQuery.model.add_link("Type", "type", "treeNode", "D#TreeNode")
	lQuery.model.add_class("Tag")
		lQuery.model.add_property("Tag", "key")
		lQuery.model.add_property("Tag", "value")
	lQuery.model.add_class("PaletteType")
	lQuery.model.add_class("PaletteElementType")
		lQuery.model.add_property("PaletteElementType", "id")
		lQuery.model.add_property("PaletteElementType", "caption")
		lQuery.model.add_property("PaletteElementType", "picture")
		lQuery.model.add_property("PaletteElementType", "nr")
		lQuery.model.add_property("PaletteElementType", "shouldBeIncluded")
	lQuery.model.add_class("ToolbarType")
	lQuery.model.add_class("ToolbarElementType")
		lQuery.model.add_property("ToolbarElementType", "id")
		lQuery.model.add_property("ToolbarElementType", "caption")
		lQuery.model.add_property("ToolbarElementType", "picture")
		lQuery.model.add_property("ToolbarElementType", "nr")
		lQuery.model.add_property("ToolbarElementType", "procedureName")
		lQuery.model.add_property("ToolbarElementType", "shouldBeIncluded")
	lQuery.model.add_class("PopUpDiagramType")
	lQuery.model.add_class("PopUpElementType")
		lQuery.model.add_property("PopUpElementType", "id")
		lQuery.model.add_property("PopUpElementType", "caption")
		lQuery.model.add_property("PopUpElementType", "nr")
		lQuery.model.add_property("PopUpElementType", "procedureName")
		lQuery.model.add_property("PopUpElementType", "shouldBeIncluded")
	lQuery.model.add_class("FreeBoxType")
	lQuery.model.add_class("FreeLineType")
	lQuery.model.set_super_class("PropertyDiagram", "PropertyElement")
	lQuery.model.set_super_class("PropertyTab", "PropertyElement")
	lQuery.model.set_super_class("PropertyRow", "PropertyElement")
	lQuery.model.add_link("ElemType", "elemType", "propertyDiagram", "PropertyDiagram")
	lQuery.model.add_link("CompartType", "compartType", "propertyDiagram", "PropertyDiagram")
	lQuery.model.add_link("CompartType", "compartType", "propertyRow", "PropertyRow")
	lQuery.model.add_link("CompartType", "compartType", "propertyTab", "PropertyTab")
	lQuery.model.add_composition("PropertyTab", "propertyTab", "propertyDiagram", "PropertyDiagram")
	lQuery.model.add_composition("PropertyRow", "propertyRow", "propertyDiagram", "PropertyDiagram")
	lQuery.model.add_composition("PropertyRow", "propertyRow", "propertyTab", "PropertyTab")
	lQuery.model.add_link("PropertyRow", "calledPropertyRow", "calledDiagram", "PropertyDiagram")
	lQuery.model.add_link("PropertyElement", "propertyElement", "propertyEventHandler", "PropertyEventHandler")
	lQuery.model.add_link("ElemType", "elemType", "popUpDiagramType", "PopUpDiagramType")
	lQuery.model.add_link("CompartType", "compartType", "compartStyle", "CompartStyle")
	lQuery.model.set_super_class("EdgeType", "ElemType")
	lQuery.model.set_super_class("NodeType", "ElemType")
	lQuery.model.set_super_class("PortType", "ElemType")
	lQuery.model.set_super_class("GraphDiagram", "PresentationElement")
	lQuery.model.add_composition("ElemType", "elemType", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("ElemType", "elemType", "paletteElement", "PaletteElement")
	lQuery.model.add_composition("CompartType", "compartType", "elemType", "ElemType")
	lQuery.model.add_link("ElemType", "subtype", "supertype", "ElemType")
	lQuery.model.add_link("ElemType", "elemType", "elemStyle", "ElemStyle")
	lQuery.model.add_link("PortType", "portType", "nodeType", "NodeType")
	lQuery.model.add_link("NodeType", "containerType", "componentType", "NodeType")
	lQuery.model.add_link("ElemType", "source", "target", "GraphDiagramType")
	lQuery.model.add_link("Compartment", "compartment", "selectedItem", "ChoiceItem")
	lQuery.model.add_composition("ChoiceItem", "choiceItem", "compartType", "CompartType")
	lQuery.model.add_link("Notation", "notation", "choiceItem", "ChoiceItem")
	lQuery.model.add_link("ElemStyle", "elemStyleByChoiceItem", "choiceItem", "ChoiceItem")
	lQuery.model.add_link("CompartStyle", "compartStyleByChoiceItem", "choiceItem", "ChoiceItem")
	lQuery.model.add_link("GraphDiagram", "presentation", "target_type", "GraphDiagramType")
	lQuery.model.add_link("Element", "element", "elemType", "ElemType")
	lQuery.model.add_link("Element", "presentation", "target_type", "ElemType")
	lQuery.model.add_link("Compartment", "presentation", "target_type", "CompartType")
	lQuery.model.add_link("Compartment", "compartment", "compartType", "CompartType")
	lQuery.model.add_composition("Compartment", "subCompartment", "parentCompartment", "Compartment")	
	lQuery.model.add_composition("CompartType", "subCompartType", "parentCompartType", "CompartType")
	lQuery.model.add_link("ElemType", "elemType", "keyboardShortcut", "KeyboardShortcut")
	lQuery.model.add_link("GraphDiagramType", "eType", "eKeyboardShortcut", "KeyboardShortcut")
	lQuery.model.add_link("GraphDiagramType", "cType", "cKeyboardShortcut", "KeyboardShortcut")
	lQuery.model.set_super_class("PropertyDiagram", "PropertyElement")
	lQuery.model.set_super_class("PropertyTab", "PropertyElement")
	lQuery.model.set_super_class("PropertyRow", "PropertyElement")
	lQuery.model.add_link("ElemType", "elemType", "propertyDiagram", "PropertyDiagram")
	lQuery.model.add_link("CompartType", "compartType", "propertyDiagram", "PropertyDiagram")
 	lQuery.model.add_link("CompartType", "compartType", "propertyRow", "PropertyRow")
	lQuery.model.add_link("CompartType", "compartType", "propertyTab", "PropertyTab")
	lQuery.model.add_link("PropertyElement", "propertyElement", "propertyEventHandler", "PropertyEventHandler")
	lQuery.model.add_link("CompartType", "compartType", "compartStyle", "CompartStyle")
	lQuery.model.add_link("EdgeType", "eEnd", "end", "ElemType")
	lQuery.model.add_link("EdgeType", "eStart", "start", "ElemType")
	lQuery.model.add_link("GraphDiagram", "graphDiagram", "toolbar", "Toolbar")
	lQuery.model.add_link("GraphDiagram", "graphDiagram", "palette", "Palette")
	lQuery.model.add_link("Extension", "extension", "paletteElement", "PaletteElement")
	lQuery.model.add_link("Extension", "extension", "toolbarElement", "ToolbarElement")
	lQuery.model.add_link("Extension", "extension", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("Extension", "extension", "propertyRow", "PropertyRow")
	lQuery.model.add_link("Extension", "extension", "propertyTab", "PropertyTab")
	lQuery.model.add_link("Extension", "extension", "compartType", "CompartType")
	lQuery.model.add_link("Extension", "extension", "translet", "Translet")
	lQuery.model.add_link("Extension", "extension", "choiceItem", "ChoiceItem")
	lQuery.model.add_link("Extension", "extension", "elemType", "ElemType")
	lQuery.model.add_link("Extension", "extension", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("Extension", "extension", "type", "Type")
	lQuery.model.add_composition("Translet", "translet", "type", "Type")
	lQuery.model.add_link("Tag", "tag", "choiceItem", "ChoiceItem")
	lQuery.model.add_composition("PaletteElementType", "paletteElementType", "paletteType", "PaletteType")
	lQuery.model.add_composition("ToolbarElementType", "toolbarElementType", "toolbarType", "ToolbarType")
	lQuery.model.add_composition("PopUpElementType", "popUpElementType", "popUpDiagramType", "PopUpDiagramType")
	lQuery.model.add_link("PopUpDiagramType", "rClickCollection", "cType", "GraphDiagramType")
	lQuery.model.add_link("PopUpDiagramType", "rClickEmpty", "eType", "GraphDiagramType")
	lQuery.model.add_link("ToolbarType", "toolbarType", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("PaletteType", "paletteType", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("PaletteElementType", "paletteElementType", "elemType", "ElemType")
	lQuery.model.add_link("PresentationElement", "presentationElement", "type", "Type")
	lQuery.model.add_link("Style", "style", "type", "Type")
	lQuery.model.add_link("Style", "style", "item", "D#Item")
	lQuery.model.add_link("Type", "type", "item", "D#Item")
	lQuery.model.add_class("Project")
		lQuery.model.add_property("Project", "name")
		lQuery.model.add_property("Project", "version")
		lQuery.model.add_property("Project", "procOnOpen")
		lQuery.model.add_property("Project", "procOnClose")
	lQuery.model.add_link("Project", "project", "graphDiagram", "GraphDiagram")
--superclasses
	lQuery.model.set_super_class("GraphDiagramType", "Type")
	lQuery.model.set_super_class("ElemType", "Type")
	lQuery.model.set_super_class("CompartType", "Type")
	lQuery.model.set_super_class("PaletteType", "Type")
	lQuery.model.set_super_class("PaletteElementType", "Type")
	lQuery.model.set_super_class("ToolbarType", "Type")
	lQuery.model.set_super_class("ToolbarElementType", "Type")
	lQuery.model.set_super_class("PopUpDiagramType", "Type")
	lQuery.model.set_super_class("PopUpElementType", "Type")
	lQuery.model.set_super_class("ToolType", "Type")	
	lQuery.model.set_super_class("Project", "PresentationElement")
	lQuery.model.set_super_class("FreeBoxType", "ElemType")
	lQuery.model.set_super_class("FreeLineType", "ElemType")
--scaffoldings
	lQuery.model.add_class("FirstCmdPtr")
	lQuery.model.add_class("LastCmdPtr")
	lQuery.model.add_link("FirstCmdPtr", "firstCmdPtr", "command", "Command")
	lQuery.model.add_link("LastCmdPtr", "lastCmdPtr", "command", "Command")

	lQuery.model.add_link("D#VTableRow", "vTableRow", "compartType", "CompartType")
	lQuery.model.add_link("Compartment", "compartment", "row", "D#Row")
	lQuery.model.add_link("Compartment", "compartment", "horizontalBox", "D#HorizontalBox")
	lQuery.model.add_link("PresentationElement", "presentationElement", "form", "D#Form")
	lQuery.model.add_link("Compartment", "compartment", "component", "D#Component")
	lQuery.model.add_link("PropertyElement", "propertyElement", "component", "D#Component")
	lQuery.model.add_link("CompartType", "compartType", "component", "D#Component")
	--lQuery.model.add_link("PropertyDiagram", "propertyDiagram", "treeNode", "D#TreeNode")
	--lQuery.model.add_link("PropertyRow", "propertyRow", "treeNode", "D#TreeNode")
	--lQuery.model.add_link("PropertyTab", "propertyTab", "treeNode", "D#TreeNode")
	lQuery.model.add_link("PropertyElement", "propertyElement", "treeNode", "D#TreeNode")
	lQuery.model.add_link("CompartStyle", "compartStyle", "treeNode", "D#TreeNode")
	lQuery.model.add_link("Compartment", "compartment", "textLine", "D#TextLine")
	lQuery.model.add_link("ChoiceItem", "choiceItem", "item", "D#Item")
	lQuery.model.add_link("Compartment", "compartment", "treeNode", "D#TreeNode")
	lQuery.model.add_link("Element", "original", "copy", "Element")

--need addition to GraphDiagram MM
	lQuery.model.add_link("Palette", "palette", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("Toolbar", "toolbar", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("ToolType", "toolType", "graphDiagramType", "GraphDiagramType")

	lQuery.model.add_link("GraphDiagramStyle", "graphDiagramStyle", "graphDiagramType", "GraphDiagramType")
	lQuery.model.add_link("GraphDiagramStyle", "graphDiagramStyle", "graphDiagram", "GraphDiagram")
	--lQuery.model.set_super_class("GraphDiagramStyle", "Style")
	
	lQuery.model.delete_class("PopUpMenu")
	lQuery.model.delete_class("PopUpMenuItem")
	lQuery.model.delete_class("PopUpMenuItemSelectEvent")

	lQuery.model.add_class("Thing")	
	lQuery.model.add_link("Tag", "tag", "thing", "Thing")
	lQuery.model.set_super_class("Type", "Thing")
	lQuery.model.set_super_class("PresentationElement", "Thing")
	lQuery.model.add_link("Thing", "thing", "nodeParent", "PT#NodeParent")


	lQuery.model.add_class("ActiveDgrEvent")
	lQuery.model.set_super_class("ActiveDgrEvent", "Event")
	lQuery.model.add_link("GraphDiagram", "graphDiagram", "activeDgrEvent", "ActiveDgrEvent")
	lQuery.model.delete_class("OpenDgrEvent")

--trace MM
	lQuery.model.add_class("ProjectOpenTrace")
	lQuery.model.add_property("ProjectOpenTrace", "machine_id")
	lQuery.model.add_property("ProjectOpenTrace", "session_number")
	lQuery.model.add_property("ProjectOpenTrace", "project_name")
	lQuery.model.add_property("ProjectOpenTrace", "timezone_offset")
	lQuery.model.add_property("ProjectOpenTrace", "open_time")
	lQuery.model.add_property("ProjectOpenTrace", "last_save_time")
	lQuery.model.add_link("ProjectOpenTrace", "previous", "next", "ProjectOpenTrace")

