private void SetFolderFromElement(IContentTypeBase item, XElement folderNode)
        {
            var folder = folderNode.ValueOrDefault(string.Empty);

            if (string.IsNullOrWhiteSpace(folder))
            {
                return;
            }

            var container = FindFolder(folderNode.GetKey(), folder);

            if (container != null && container.Id != item.ParentId)
            {
                item.SetParent(container);
            }
        }
        private bool SetMasterFromElement(IContentTypeBase item, XElement masterNode)
        {
            logger.Debug(serializerType, "SetMasterFromElement");

            if (masterNode == null)
            {
                return(false);
            }

            var key = masterNode.Attribute("Key").ValueOrDefault(Guid.Empty);

            if (key != Guid.Empty)
            {
                var entity = entityService.Get(key);
                if (entity != null && entity.Id != item.ParentId)
                {
                    item.SetParent(entity);
                    return(true);
                }
            }

            return(false);
        }