/// <summary>
        /// Method to add header row
        /// </summary>
        /// <param name="headerName">headerName string</param>
        /// <param name="currentHeaderRowIndex">currentHeaderRow index</param>
        /// <param name="metadataType">MetadataType object</param>
        private static void AddHeaderRow(string headerName, ref int currentHeaderRowIndex, ManageReopsitoryViewModel viewModel)
        {
            var metaDataTypes = GetMetaDataTypes();

            var headeRow = viewModel.RepositoryMetaDataFieldList.FirstOrDefault(m => (string.Compare(m.MetadataNodeName, headerName, StringComparison.Ordinal) == 0));
            if (headeRow == null)
            {
                var metaDataHeaderRow = new RepositoryMetadataFieldViewModel();
                metaDataHeaderRow.RowType = MetaDataRowType.HeaderRow;
                metaDataHeaderRow.MetadataNodeName = headerName;
                //metaDataHeaderRow.MetaDataTypes = new SelectList(metaDataTypes, Helpers.Constants.ID, Helpers.Constants.NAME, metaDataTypes.FirstOrDefault().Id.ToString());
                viewModel.RepositoryMetaDataFieldList.Add(metaDataHeaderRow);
            }
            else
            {
                currentHeaderRowIndex = viewModel.RepositoryMetaDataFieldList.FindIndex(m => (string.Compare(m.MetadataNodeName, headerName, StringComparison.Ordinal) == 0));
            }
        }
        /// <summary>
        /// Method adds the xml node to MetadataType List collection
        /// </summary>
        /// <param name="childNode">xml child node</param>
        /// <param name="metadataType">MetadataTypeViewModel object</param>
        /// <returns>returns currentHeaderRow Index</returns>
        private static int AddDataRow(XmlNode childNode, ManageReopsitoryViewModel metadataType)
        {
            var metaDataTypes = GetMetaDataTypes();

            var currentHeaderRowIndex = -1;
            var metaDataDetailRow = new RepositoryMetadataFieldViewModel();
            metaDataDetailRow.MappedLocation = GetParentNodePath(childNode);
            metaDataDetailRow.MetaDataTypes = new SelectList(metaDataTypes, Helpers.Constants.ID, Helpers.Constants.NAME, metaDataTypes.FirstOrDefault().Id.ToString());
            metaDataDetailRow.IsBlankRow = false;
            metaDataDetailRow.MetaDataTypeId = metaDataTypes.FirstOrDefault().Id.ToString();
            //metaDataDetailRow.MetadataNodeName = childNode.Name;
            ////before adding the data row,If the header row is not there add it else get the index of the header row to add this item next to the header index
            AddHeaderRow(metaDataDetailRow.MappedLocation, ref currentHeaderRowIndex, metadataType);
            metaDataDetailRow.MappedLocation = string.Concat(metaDataDetailRow.MappedLocation, ".", childNode.Name);
            //parents tag and body tag should not be added
            if (metaDataDetailRow.MappedLocation != "xml" && metaDataDetailRow.MappedLocation != ".xml" && !metaDataDetailRow.MappedLocation.Contains(".body"))
            {
                metaDataDetailRow.MappedLocation = metaDataDetailRow.MappedLocation.Replace(".#text", string.Empty);
                if (currentHeaderRowIndex > -1)
                {
                    metadataType.RepositoryMetaDataFieldList.Insert(currentHeaderRowIndex + 1, metaDataDetailRow);
                }
                else
                {
                    metadataType.RepositoryMetaDataFieldList.Add(metaDataDetailRow);
                }
            }

            return currentHeaderRowIndex;
        }