/// <summary>
        /// Cleans all text fields in this element
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="visitSubNodes"></param>
        public override void visit(Generated.SubSequence obj, bool visitSubNodes)
        {
            if ( obj.getD_LRBG() != null )
              {
            obj.setD_LRBG(obj.getD_LRBG().Trim());
              }
              if ( obj.getLevel() != null )
              {
            obj.setLevel(obj.getLevel().Trim());
              }
              if ( obj.getMode() != null )
              {
            obj.setMode(obj.getMode().Trim());
              }
              if ( obj.getNID_LRBG() != null )
              {
            obj.setNID_LRBG(obj.getNID_LRBG().Trim());
              }
              if ( obj.getQ_DIRLRBG() != null )
              {
            obj.setQ_DIRLRBG(obj.getQ_DIRLRBG().Trim());
              }
              if ( obj.getQ_DIRTRAIN() != null )
              {
            obj.setQ_DIRTRAIN(obj.getQ_DIRTRAIN().Trim());
              }
              if ( obj.getQ_DLRBG() != null )
              {
            obj.setQ_DLRBG(obj.getQ_DLRBG().Trim());
              }
              if ( obj.getRBC_ID() != null )
              {
            obj.setRBC_ID(obj.getRBC_ID().Trim());
              }
              if ( obj.getRBCPhone() != null )
              {
            obj.setRBCPhone(obj.getRBCPhone().Trim());
              }
              if ( obj.getComment() != null )
              {
            obj.setComment(obj.getComment().Trim());
              }

              base.visit(obj, visitSubNodes);
        }
        /// <summary>
        /// Duplicates a source SubSequence into its target
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void DuplicateSubSequence(Generated.SubSequence source, Generated.SubSequence target)
        {
            if ( source != null && target != null )
            {
                DuplicateNamable (source, target);

                target.setD_LRBG(source.getD_LRBG());
                target.setLevel(source.getLevel());
                target.setMode(source.getMode());
                target.setNID_LRBG(source.getNID_LRBG());
                target.setQ_DIRLRBG(source.getQ_DIRLRBG());
                target.setQ_DIRTRAIN(source.getQ_DIRTRAIN());
                target.setQ_DLRBG(source.getQ_DLRBG());
                target.setRBC_ID(source.getRBC_ID());
                target.setRBCPhone(source.getRBCPhone());
                target.setComment(source.getComment());
                target.setCompleted(source.getCompleted());
            }
        }
        /// <summary>
        /// Duplicates a source StructureElement into its target
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void DuplicateStructureElement(Generated.StructureElement source, Generated.StructureElement target)
        {
            if ( source != null && target != null )
            {
                DuplicateReqRelated (source, target);

                target.setTypeName(source.getTypeName());
                target.setDefault(source.getDefault());
                target.setMode(source.getMode());
            }
        }
        /// <summary>
        /// Compares two SubSequence and annotates the differences on the first one
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="other"></param>
        public static void compareSubSequence(Generated.SubSequence obj, Generated.SubSequence other, VersionDiff diff)
        {
            if ( other == null )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
                return;
            }

            compareNamable (obj, other, diff);

            if ( !CompareUtil.canonicalStringEquality(obj.getD_LRBG(), other.getD_LRBG()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "D_LRBG", other.getD_LRBG(), obj.getD_LRBG()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getLevel(), other.getLevel()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Level", other.getLevel(), obj.getLevel()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getMode(), other.getMode()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Mode", other.getMode(), obj.getMode()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getNID_LRBG(), other.getNID_LRBG()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "NID_LRBG", other.getNID_LRBG(), obj.getNID_LRBG()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getQ_DIRLRBG(), other.getQ_DIRLRBG()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Q_DIRLRBG", other.getQ_DIRLRBG(), obj.getQ_DIRLRBG()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getQ_DIRTRAIN(), other.getQ_DIRTRAIN()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Q_DIRTRAIN", other.getQ_DIRTRAIN(), obj.getQ_DIRTRAIN()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getQ_DLRBG(), other.getQ_DLRBG()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Q_DLRBG", other.getQ_DLRBG(), obj.getQ_DLRBG()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getRBC_ID(), other.getRBC_ID()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "RBC_ID", other.getRBC_ID(), obj.getRBC_ID()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getRBCPhone(), other.getRBCPhone()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "RBCPhone", other.getRBCPhone(), obj.getRBCPhone()) );
            }
            if ( obj.allTestCases() != null )
            {
                if ( other.allTestCases() != null )
                {
                    foreach ( Generated.TestCase subElement in obj.allTestCases() )
                    {
                        bool compared = false;
                        foreach ( Generated.TestCase otherElement in other.allTestCases() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                compareTestCase ( subElement, otherElement, diff );
                                compared = true;
                            break;
                            }
                        }

                        if ( !compared )
                        {
                            diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "TestCases", "", subElement.Name ) );
                        }
                    }

                    foreach ( Generated.TestCase otherElement in other.allTestCases() )
                    {
                        bool found = false;
                        foreach ( Generated.TestCase subElement in obj.allTestCases() )
                        {
                            if ( subElement.Guid == otherElement.Guid )
                            {
                                found = true;
                                break;
                            }
                        }

                        if ( !found )
                        {
                            diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "TestCases", otherElement.Name) );
                        }
                    }
                }
                else
                {
                    foreach ( Generated.TestCase subElement in obj.allTestCases() )
                    {
                        diff.appendChanges ( new Diff(subElement, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "TestCases", "", subElement.Name ) );
                    }
                }
            }
            else
            {
                if ( other.allTestCases() != null )
                {
                    foreach ( Generated.TestCase otherElement in other.allTestCases() )
                    {
                        diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aRemove , "TestCases", otherElement.Name) );
                    }
                }
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getComment(), other.getComment()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Comment", other.getComment(), obj.getComment()) );
            }
            if ( obj.getCompleted() != other.getCompleted() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Completed", other.getCompleted().ToString(), obj.getCompleted().ToString()) );
            }
        }
        /// <summary>
        /// Compares two StructureElement and annotates the differences on the first one
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="other"></param>
        public static void compareStructureElement(Generated.StructureElement obj, Generated.StructureElement other, VersionDiff diff)
        {
            if ( other == null )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aAdd, "", "", obj.Name ) );
                return;
            }

            compareReqRelated (obj, other, diff);

            if ( !CompareUtil.canonicalStringEquality(obj.getTypeName(), other.getTypeName()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "TypeName", other.getTypeName(), obj.getTypeName()) );
            }
            if ( !CompareUtil.canonicalStringEquality(obj.getDefault(), other.getDefault()) )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Default", other.getDefault(), obj.getDefault()) );
            }
            if ( obj.getMode() != other.getMode() )
            {
                diff.appendChanges ( new Diff(obj, HistoricalData.Generated.acceptor.ChangeOperationEnum.aChange, "Mode", other.getMode().ToString(), obj.getMode().ToString()) );
            }
        }
        /// <summary>
        /// Searches a specific string in SubSequence and updates the list 
        /// of model element with all the elements in which that string is found
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="obj">The string to search for</param>
        /// <param name="occurences">The list of model elements which hold the searched string</param>
        public static void searchSubSequence(Generated.SubSequence obj, string searchString, List<ModelElement> occurences)
        {
            searchNamable (obj, searchString, occurences);

            if ( obj.getD_LRBG() != null && obj.getD_LRBG().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getLevel() != null && obj.getLevel().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getMode() != null && obj.getMode().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getNID_LRBG() != null && obj.getNID_LRBG().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getQ_DIRLRBG() != null && obj.getQ_DIRLRBG().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getQ_DIRTRAIN() != null && obj.getQ_DIRTRAIN().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getQ_DLRBG() != null && obj.getQ_DLRBG().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getRBC_ID() != null && obj.getRBC_ID().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.getRBCPhone() != null && obj.getRBCPhone().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
            if ( obj.allTestCases() != null )
            {
                foreach ( Generated.TestCase subElement in obj.allTestCases() )
                {
                    searchTestCase ( subElement, searchString, occurences );
                }
            }
            if ( obj.getComment() != null && obj.getComment().Contains (searchString) )
            {
                occurences.Add ( obj );
            }
        }