public void Init() { xmiDocument=new XmlDocument(); documentInterpreter =new XmiModelDocumentInterpreter(); namespaceManager=new PapyrusXmiModelNamespaceManager(xmiDocument.NameTable); documentInterpreter.NamespaceManager =namespaceManager; modelElement=ModelElementStub.CreateModelElementStub(xmiDocument); firstInteractionElement=InteractionElementStub.CreateInteractionElementStub(xmiDocument); secondInteractionElement=InteractionElementStub.CreateInteractionElementStub(xmiDocument); thirdInteractionElement=InteractionElementStub.CreateInteractionElementStub(xmiDocument); firstMessageElement=MessageElementStub.CreateMessageElementStub(xmiDocument); secondMessageElement=MessageElementStub.CreateMessageElementStub(xmiDocument); thirdMessageElement=MessageElementStub.CreateMessageElementStub(xmiDocument); firstLifelineElement=LifelineElementStub.CreateLifelineElementStub(xmiDocument); secondLifelineElement=LifelineElementStub.CreateLifelineElementStub(xmiDocument); thirdLifelineElement=LifelineElementStub.CreateLifelineElementStub(xmiDocument); firstBehaviorExecutionSpecElement=BehaviorExecutionSpecElementStub.CreateBehaviorExecutionSpecElementStub(xmiDocument); secondBehaviorExecutionSpecElement=BehaviorExecutionSpecElementStub.CreateBehaviorExecutionSpecElementStub(xmiDocument); thirdBehaviorExecutionSpecElement=BehaviorExecutionSpecElementStub.CreateBehaviorExecutionSpecElementStub(xmiDocument); containerInteractionElement=InteractionElementStub.CreateInteractionElementStub(xmiDocument); containerLifelineElement=LifelineElementStub.CreateLifelineElementStub(xmiDocument,CONTAINER_LIFELINE_ELEMENT_ID); firstExecutionOccurrenceSpecElement=ExecutionOccurrenceSpecElementStub.CreateExecutionOccurrenceSpecElementStub(xmiDocument,FIRST_EXECUTION_OCCURRENCE_SPEC_ELEMENT_ID,CONTAINER_LIFELINE_ELEMENT_ID); firstExecutionOccurrenceSpecElement.SetAttribute(UmlModelElements.EXECUTION_ATTR_NAME,FIRST_BEHAVIOR_EXECUTION_SPEC_ELEMENT_ID); secondExecutionOccurrenceSpecElement=ExecutionOccurrenceSpecElementStub.CreateExecutionOccurrenceSpecElementStub(xmiDocument,SECOND_EXECUTION_OCCURRENCE_SPEC_ELEMENT_ID,CONTAINER_LIFELINE_ELEMENT_ID); secondExecutionOccurrenceSpecElement.SetAttribute(UmlModelElements.EXECUTION_ATTR_NAME,FIRST_BEHAVIOR_EXECUTION_SPEC_ELEMENT_ID); thirdExecutionOccurrenceSpecElement=ExecutionOccurrenceSpecElementStub.CreateExecutionOccurrenceSpecElementStub(xmiDocument,THIRD_EXECUTION_OCCURRENCE_SPEC_ELEMENT_ID,CONTAINER_LIFELINE_ELEMENT_ID); thirdExecutionOccurrenceSpecElement.SetAttribute(UmlModelElements.EXECUTION_ATTR_NAME,SECOND_BEHAVIOR_EXECUTION_SPEC_ELEMENT_ID); fourthExecutionOccurrenceSpecElement=ExecutionOccurrenceSpecElementStub.CreateExecutionOccurrenceSpecElementStub(xmiDocument,FOURTH_EXECUTION_OCCURRENCE_SPEC_ELEMENT_ID,CONTAINER_LIFELINE_ELEMENT_ID); fourthExecutionOccurrenceSpecElement.SetAttribute(UmlModelElements.EXECUTION_ATTR_NAME,SECOND_BEHAVIOR_EXECUTION_SPEC_ELEMENT_ID); }
public void Init() { xmiDocument= new XmlDocument(); modelDocumentInterpreter=new XmiModelDocumentInterpreter(); dIDocumentInterpreter=new PapyrusXmiDIDocumentInterpreter(MODEL_DOCUMENT_NAME); sequenceChartModelCreator=new SequenceChartModelCreator(modelDocumentInterpreter,dIDocumentInterpreter); namespaceManager=new XmlNamespaceManager(xmiDocument.NameTable); namespaceManager.AddNamespace(XmiElements.UML_NAMESPACE_PREFIX,XmiElements.UML_NAMESPACE_URI); namespaceManager.AddNamespace(XmiElements.XMI_NAMESPACE_PREFIX,XmiElements.XMI_NAMESPACE_URI); firstConsideredLifelineHorizontal= new Lifeline(POSITION_CONSIDERED_FIRST_ELEMENT_HORIZONTAL,EMPTY_STRING,null); secondConsideredLifelineHorizontal= new Lifeline(POSITION_CONSIDERED_SECOND_ELEMENT_HORIZONTAL,EMPTY_STRING,null); thirdConsideredLifelineHorizontal= new Lifeline(POSITION_CONSIDERED_THIRD_ELEMENT_HORIZONTAL,EMPTY_STRING,null); fourthConsideredLifelineHorizontal= new Lifeline(POSITION_CONSIDERED_FOURTH_ELEMENT_HORIZONTAL,EMPTY_STRING,null); fifthConsideredLifelineHorizontal= new Lifeline(POSITION_CONSIDERED_FIFTH_ELEMENT_HORIZONTAL,EMPTY_STRING,null); firstConsideredLifelineVertical= new Lifeline(POSITION_CONSIDERED_FIRST_ELEMENT_VERTICAL,EMPTY_STRING,null); secondConsideredLifelineVertical= new Lifeline(POSITION_CONSIDERED_SECOND_ELEMENT_VERTICAL,EMPTY_STRING,null); thirdConsideredLifelineVertical= new Lifeline(POSITION_CONSIDERED_THIRD_ELEMENT_VERTICAL,EMPTY_STRING,null); fourthConsideredLifelineVertical= new Lifeline(POSITION_CONSIDERED_FOURTH_ELEMENT_VERTICAL,EMPTY_STRING,null); fifthConsideredLifelineVertical= new Lifeline(POSITION_CONSIDERED_FIFTH_ELEMENT_VERTICAL,EMPTY_STRING,null); interactionElement=InteractionElementStub.CreateInteractionElementStub(xmiDocument); modelElement=ModelElementStub.CreateModelElementStub(xmiDocument); interaction= new Interaction(ZERO_POSITION,EMPTY_STRING,interactionElement); diagramElement =DiagramElementStub.CreateDiagramElementStub(xmiDocument); }
public SequenceChartModelCreator(XmiModelDocumentInterpreter modelDocumentInterpreter,XmiDIDocumentInterpreter diDocumentInterpreter) { this.modelDocumentInterpreter=modelDocumentInterpreter; this.diDocumentInterpreter=diDocumentInterpreter; }
private void InitProperties(string modelName) { XmiModelDocumentInterpreter modelDocumentInterpreter=new XmiModelDocumentInterpreter(); XmiDIDocumentInterpreter diDocumentInterpreter=new PapyrusXmiDIDocumentInterpreter(modelName); SequenceChartModelInterpreter modelInterpreter=new SequenceChartModelInterpreter(); SequenceChartModelCreator modelCreator=new SequenceChartModelCreator(modelDocumentInterpreter,diDocumentInterpreter); this.ModelCreator=modelCreator; this.ModelInterpreter=modelInterpreter; this.modelElementInterpreter.InitNamespaceManager(this.loadedXmiModelDocument.NameTable); this.xmiElementInterpreter.InitNamespaceManager(this.loadedXmiModelDocument.NameTable); }