private static List <IBriefItemMapper> get_mapping_set(string mappingSet)
        {
            // First, look in the dictionary, if it exists
            if ((mappingSets != null) && (mappingSets.ContainsKey(mappingSet)))
            {
                return(mappingSets[mappingSet]);
            }

            // Ensure the dictionary exists
            if (mappingSets == null)
            {
                mappingSets = new Dictionary <string, List <IBriefItemMapper> >(StringComparer.OrdinalIgnoreCase);
            }

            // Is this a valid mapping set id?
            BriefItemMapping_Set set = Engine_ApplicationCache_Gateway.Configuration.BriefItemMapping.GetMappingSet(mappingSet);

            if (set == null)
            {
                return(null);
            }

            // build error messages
            StringBuilder errormessages = new StringBuilder();

            // Build this return list
            List <IBriefItemMapper> returnValue = new List <IBriefItemMapper>();

            foreach (BriefItemMapping_Mapper mappingConfig in set.Mappings)
            {
                // Build the mapper
                string           errorMessage;
                IBriefItemMapper mapper = get_or_create_mapper(mappingConfig.Assembly, mappingConfig.Class, out errorMessage);
                if (mapper != null)
                {
                    returnValue.Add(mapper);
                }
            }

            // Now, set to the dictionary
            mappingSets[mappingSet] = returnValue;

            // Return
            return(returnValue);
        }
        private static IBriefItemMapper get_or_create_mapper(string MapperAssembly, string MapperClass, out string ErrorMessage)
        {
            ErrorMessage = String.Empty;

            // Ensure this is built
            if (mappingObjDictionary == null)
            {
                mappingObjDictionary = new Dictionary <string, IBriefItemMapper>();
            }

            // Was this already created (for a different mapping set)?
            if (mappingObjDictionary.ContainsKey(MapperAssembly + "." + MapperClass))
            {
                return(mappingObjDictionary[MapperAssembly + "." + MapperClass]);
            }

            // Look for the standard classes, just to avoid having to use reflection
            // for these that are built right into the system
            if (String.IsNullOrEmpty(MapperAssembly))
            {
                IBriefItemMapper thisModule = null;
                switch (MapperClass)
                {
                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Abstracts_BriefItemMapper":
                    thisModule = new Abstracts_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Affiliations_BriefItemMapper":
                    thisModule = new Affiliations_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Aggregations_BriefItemMapper":
                    thisModule = new Aggregations_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Behaviors_BriefItemMapper":
                    thisModule = new Behaviors_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Classifications_BriefItemMapper":
                    thisModule = new Classifications_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Containers_BriefItemMapper":
                    thisModule = new Containers_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Dates_BriefItemMapper":
                    thisModule = new Dates_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Donor_BriefItemMapper":
                    thisModule = new Donor_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Edition_BriefItemMapper":
                    thisModule = new Edition_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Files_BriefItemMapper":
                    thisModule = new Files_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Frequency_BriefItemMapper":
                    thisModule = new Frequency_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Genres_BriefItemMapper":
                    thisModule = new Genres_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.GeoSpatial_BriefItemMapper":
                    thisModule = new GeoSpatial_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Hierarchical_Spatial_BriefItemMapper":
                    thisModule = new Hierarchical_Spatial_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Holding_Location_BriefItemMapper":
                    thisModule = new Holding_Location_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Identifiers_BriefItemMapper":
                    thisModule = new Identifiers_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.InternalComments_BriefItemMapper":
                    thisModule = new InternalComments_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.InternalVarious_BriefItemMapper":
                    thisModule = new InternalVarious_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Languages_BriefItemMapper":
                    thisModule = new Languages_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.LearningObjectMetadata_BriefItemMapper":
                    thisModule = new LearningObjectMetadata_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Links_BriefItemMapper":
                    thisModule = new Links_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Manufacturers_BriefItemMapper":
                    thisModule = new Manufacturers_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Names_BriefItemMapper":
                    thisModule = new Names_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Notes_BriefItemMapper":
                    thisModule = new Notes_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Physical_Description_BriefItemMapper":
                    thisModule = new Physical_Description_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Publisher_BriefItemMapper":
                    thisModule = new Publisher_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Related_Items_BriefItemMapper":
                    thisModule = new Related_Items_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.ResourceType_BriefItemMapper":
                    thisModule = new ResourceType_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Rights_BriefItemMapper":
                    thisModule = new Rights_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Rights_MD_BriefItemMapper":
                    thisModule = new Rights_MD_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Source_Institution_BriefItemMapper":
                    thisModule = new Source_Institution_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Standard_BriefItemMapper":
                    thisModule = new Standard_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Subjects_BriefItemMapper":
                    thisModule = new Subjects_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Target_Audience_BriefItemMapper":
                    thisModule = new Target_Audience_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Temporal_Coverage_BriefItemMapper":
                    thisModule = new Temporal_Coverage_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Thesis_Dissertation_BriefItemMapper":
                    thisModule = new Thesis_Dissertation_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Titles_BriefItemMapper":
                    thisModule = new Titles_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.User_Tags_BriefItemMapper":
                    thisModule = new User_Tags_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.User_Tags_Internal_BriefItemMapper":
                    thisModule = new User_Tags_Internal_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.VRACore_BriefItemMapper":
                    thisModule = new VRACore_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Web_BriefItemMapper":
                    thisModule = new Web_BriefItemMapper();
                    break;

                case "SobekCM.Engine_Library.Items.BriefItems.Mappers.Zoological_Taxonomy_BriefItemMapper":
                    thisModule = new Zoological_Taxonomy_BriefItemMapper();
                    break;
                }

                // Was this a match?
                if (thisModule != null)
                {
                    // Add to the dictionary to avoid looking this up again
                    mappingObjDictionary[MapperAssembly + "." + MapperClass] = thisModule;

                    // Return this standard IBriefItemMapper
                    return(thisModule);
                }
            }

            // Try to retrieve this from the assembly using reflection
            object itemAsObj = Get_Mapper(MapperAssembly, MapperClass, out ErrorMessage);

            if ((itemAsObj == null) && (ErrorMessage.Length > 0))
            {
                return(null);
            }


            // Ensure this implements the IBriefItemMapper class
            IBriefItemMapper itemAsItem = itemAsObj as IBriefItemMapper;

            if (itemAsItem == null)
            {
                ErrorMessage = MapperClass + " loaded from assembly but does not implement the IBriefItemMapper interface!";
                return(null);
            }


            // Add to the dictionary to avoid looking this up again
            mappingObjDictionary[MapperAssembly + "." + MapperClass] = itemAsItem;

            // Return this custom IBriefItemMapper
            return(itemAsItem);
        }