/// <summary>
        /// Initializes a new instance of the <see cref="CompetencyContextSetType" /> class.
        /// </summary>
        /// <param name="input">List of programs serving as competency contexts</param>
        /// <returns></returns>
        public static CompetencyContextType Map(Credential input)
        {
            CompetencyContextType def = new CompetencyContextType(Guid.NewGuid(), input.org_name)
            {
                ContextId            = string.Format("CREDENTIAL.{0}", input.credential_id),
                ContextEffectiveDate = input.lst_mod_dt,
                ContextLabel         = input.org_name,
                ContextTitle         = input.credential_name,
                ContextType          = "CREDENTIAL"
            };

            if (input.sloes != null)
            {
                def.CompetencyList = new List <CompetencyDefinitionType>();

                foreach (SLO s in input.sloes)
                {
                    def.CompetencyList.Add(CompetencyDefinitionSetMapper.Map(s));
                }
            }

            return(def);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CompetencyContextSetType" /> class.
        /// </summary>
        /// <param name="inputs">List of programs serving as competency contexts</param>
        /// <returns></returns>
        public static CompetencyContextType Map(Organization input)
        {
            CompetencyContextType def = new CompetencyContextType(Guid.NewGuid(), input.name)
            {
                ContextId            = string.Format("ORGANIZATION.{0}", input.org_entity_id),
                ContextEffectiveDate = input.lst_mod_dt,
                ContextLabel         = input.org_type_name,
                ContextTitle         = string.IsNullOrEmpty(input.mission) ? input.description : input.description,
                ContextType          = "ORGANIZATION"
            };

            if (input.sloes != null)
            {
                def.CompetencyList = new List <CompetencyDefinitionType>();

                foreach (SLO s in input.sloes)
                {
                    def.CompetencyList.Add(CompetencyDefinitionSetMapper.Map(s));
                }
            }

            return(def);
        }