/// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="viewModelStore">The store this view model belongs to.</param>
        /// <param name="referenceRSNode">ReferenceRSNode.</param>
        /// <param name="parent">Parent.</param>
        public DomainRelationshipViewModel(ViewModelStore viewModelStore, DomainRelationship relationship, TreeNodeViewModel parent)
            : base(viewModelStore, relationship)
        {
            this.parentTreeNode = parent;

            if (relationship != null)
            {
                sourceRoleVM = new DomainRoleViewModel(this.ViewModelStore, relationship.Source, this);
                targetRoleVM = new DomainRoleViewModel(this.ViewModelStore, relationship.Target, this);

            }
        }
        /// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="viewModelStore">The store this view model belongs to.</param>
        /// <param name="modelTreeView">Domain model tree view.</param>
        /// <param name="parent">Parent node.</param>
        protected TreeNodeViewModel(ViewModelStore viewModelStore, TreeNode treeNode, TreeNodeViewModel parent)
            : base(viewModelStore, treeNode.DomainElement)
        {
            this.treeNode = treeNode;
            this.parentTreeNode = parent;

            this.embeddingRSNodeVMs = new ObservableCollection<EmbeddingRSNodeViewModel>();
            this.embeddingRSNodeVMsRO = new ReadOnlyObservableCollection<EmbeddingRSNodeViewModel>(embeddingRSNodeVMs);

            this.inheritanceNodeVMs = new ObservableCollection<InheritanceNodeViewModel>();
            this.inheritanceNodeVMsRO = new ReadOnlyObservableCollection<InheritanceNodeViewModel>(inheritanceNodeVMs);

            this.referenceRSNodeVMs = new ObservableCollection<ReferenceRSNodeViewModel>();
            this.referenceRSNodeVMsRO = new ReadOnlyObservableCollection<ReferenceRSNodeViewModel>(referenceRSNodeVMs);

            this.shapeClassNodeVMs = new ObservableCollection<ShapeClassNodeViewModel>();
            this.shapeClassNodeVMsRO = new ReadOnlyObservableCollection<ShapeClassNodeViewModel>(shapeClassNodeVMs);

            this.collapseExpandEmbeddingCommand = new DelegateCommand(CollapseExpandEmbeddingCommand_Executed);
            this.collapseExpandReferencingCommand = new DelegateCommand(CollapseExpandReferencingCommand_Executed);
            this.collapseExpandInheritingCommand = new DelegateCommand(CollapseExpandInheritingCommand_Executed);
            this.collapseExpandClassShapeMappingCommand = new DelegateCommand(CollapseExpandClassShapeMappingCommand_Executed);

            if (this.TreeNode != null)
            {
                foreach (EmbeddingRSNode node in this.TreeNode.EmbeddingRSNodes)
                    if (node != null)
                        AddEmbeddingRSNode(node);

                foreach (ReferenceRSNode node in this.TreeNode.ReferenceRSNodes)
                    if (node != null)
                        AddReferenceRSNode(node);

                foreach (InheritanceNode node in this.TreeNode.InheritanceNodes)
                    if (node != null)
                        AddInheritanceNode(node);

                foreach (ShapeClassNode node in this.TreeNode.ShapeClassNodes)
                    if (node != null)
                        AddShapeClassNode(node);



                Subscribe();
            }
        }
        /// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="viewModelStore">The store this view model belongs to.</param>
        /// <param name="embeddingRSNode">EmbeddingRSNode.</param>
        /// <param name="parent">Parent.</param>
        public EmbeddingRSNodeViewModel(ViewModelStore viewModelStore, EmbeddingRSNode embeddingRSNode, TreeNodeViewModel parent)
            : base(viewModelStore, embeddingRSNode.Relationship, parent)
        {
            this.embeddingRSNode = embeddingRSNode;

            this.embeddingNodeVMs = new ObservableCollection<EmbeddingNodeViewModel>();
            this.embeddingNodeVMsRO = new ReadOnlyObservableCollection<EmbeddingNodeViewModel>(embeddingNodeVMs);

            if (embeddingRSNode != null)
            {
                if (embeddingRSNode.EmbeddingNode != null)
                {
                    AddEmbeddingNode(embeddingRSNode.EmbeddingNode);
                }

                Subscribe();
            }
        }
 /// <summary>
 /// Constuctor.
 /// </summary>
 /// <param name="viewModelStore">The store this view model belongs to.</param>
 /// <param name="inheritanceNode">Inheritance node.</param>
 /// <param name="parent">Parent.</param>
 public InheritanceNodeViewModel(ViewModelStore viewModelStore, InheritanceNode inheritanceNode, TreeNodeViewModel parent)
     : base(viewModelStore, inheritanceNode, parent)
 {
 }