using Core.Entities; namespace Core.Utility; /// /// Static class that defines all 25 career field clusters and provides methods to match careers to fields. /// public static class CareerFieldDefinitions { private static readonly Lazy> _allFields = new(() => CreateAllCareerFields()); /// /// Gets all 25 career field definitions /// public static IReadOnlyList GetAllCareerFields() => _allFields.Value; /// /// Gets the career fields that are related to the given careers. /// Uses both direct name matching and pattern-based keyword matching. /// /// The careers to match against /// Distinct list of related CareerFields public static IReadOnlyList GetRelatedCareerFields(IEnumerable careers) { if (careers == null) return []; var careerNames = careers .Where(c => !string.IsNullOrWhiteSpace(c.Name)) .Select(c => c.Name.Trim()) .ToHashSet(StringComparer.OrdinalIgnoreCase); if (!careerNames.Any()) return []; var matchingFields = new HashSet(); var allFields = GetAllCareerFields(); foreach (var field in allFields) { bool matches = false; // Check direct matches foreach (var directMatch in field.DirectCareerMatches) { if (careerNames.Contains(directMatch)) { matches = true; break; } } // Check pattern matches if no direct match found if (!matches) { foreach (var keyword in field.PatternKeywords) { if (careerNames.Any(name => name.Contains(keyword, StringComparison.OrdinalIgnoreCase))) { matches = true; break; } } } if (matches) { matchingFields.Add(field); } } return matchingFields.OrderBy(f => f.Id).ToList(); } private static IReadOnlyList CreateAllCareerFields() { return [ // 1. Aerospace & Automotive Engineering new CareerField( 1, "Aerospace & Automotive Engineering", "Careers focused on designing and engineering aircraft, spacecraft, and vehicles for transportation.", [ "Aeronautical engineer", "Aircraft systems engineer", "Automobile designer", "Automotive designer", "Automotive modeler", "Race car engineer" ], [ "aeronautical", "aircraft", "automobile", "automotive", "race car" ] ), // 2. Mechanical & Robotics Engineering new CareerField( 2, "Mechanical & Robotics Engineering", "Engineering disciplines involving mechanical systems, machinery design, and automated robotic systems.", [ "Machine designer", "Mechanical drafter", "Mechanical engineer", "Robotics engineer" ], [ "mechanical", "robotics", "machine" ] ), // 3. Electrical & Electronics Engineering new CareerField( 3, "Electrical & Electronics Engineering", "Careers involving electrical systems, circuits, and electronic device design and maintenance.", [ "Electrical engineer", "Electrical technician", "Electrician", "Electromechanical engineer", "Electronic analyst", "Electronic designer" ], [ "electrical", "electronic", "electrician" ] ), // 4. Civil & Structural Engineering new CareerField( 4, "Civil & Structural Engineering", "Engineering fields focused on infrastructure, buildings, bridges, and construction project management.", [ "Civil engineer", "Construction analyst", "Construction manager", "General contractor", "Structural engineer", "Structural iron and steel work technician" ], [ "civil", "construction", "structural", "contractor" ] ), // 5. Environmental & Energy Engineering new CareerField( 5, "Environmental & Energy Engineering", "Engineering careers focused on sustainable energy solutions, environmental protection, and chemical processes.", [ "Chemical engineer", "Energy efficiency technician", "Environmental engineer", "Solar engineer", "Solar panel installer", "Solar sales consultant" ], [ "chemical", "energy", "environmental", "solar" ] ), // 6. General Engineering & Quality new CareerField( 6, "General Engineering & Quality", "Broad engineering roles including management, quality assurance, and standards compliance across various industries.", [ "Engineer", "Engineering manager", "Engineering technician", "Quality assurance engineer", "Quality engineer", "Standards engineer" ], [ "engineer", "quality", "standards" ] ), // 7. Architecture & Urban Planning new CareerField( 7, "Architecture & Urban Planning", "Design and planning careers focused on buildings, spaces, and community development.", [ "Architect", "Community planner", "Interior designer", "Urban and regional planner" ], [ "architect", "planner", "interior design", "urban" ] ), // 8. Software Development new CareerField( 8, "Software Development", "Careers in creating, designing, and developing computer software applications and systems.", [ "Computer programmer", "Computer software engineer", "Programming & software development", "Software designer", "Software engineer" ], [ "programming", "programmer", "software", "developer" ] ), // 9. IT & Networking new CareerField( 9, "IT & Networking", "Information technology careers involving computer systems, networks, technical support, and telecommunications.", [ "Computer engineer", "Computer network specialist", "Computer technician", "Information support & services", "Network systems", "Technical support specialist", "Telecommunications manager" ], [ "network", "computer", "technical support", "telecommunications", "IT" ] ), // 10. Cybersecurity & Digital Forensics new CareerField( 10, "Cybersecurity & Digital Forensics", "Security-focused careers protecting digital systems, investigating cybercrimes, and ensuring information security.", [ "Cryptographer", "Cyber Crime Investigator", "Cyber defense incident responder", "Cyber forensics expert", "Cyber legal advisor", "Cyber operator", "Cybersecurity engineer", "Vulnerability assessor" ], [ "cyber", "security", "forensics", "cryptography", "vulnerability" ] ), // 11. Data Science & Analytics new CareerField( 11, "Data Science & Analytics", "Careers analyzing data, applying mathematical and statistical methods to solve problems and make decisions.", [ "Actuary", "Data analyst", "Data scientist", "Economist", "Mathematician", "Operations research analyst" ], [ "data", "analyst", "actuary", "economist", "mathematician", "research" ] ), // 12. CAD, CNC & Manufacturing new CareerField( 12, "CAD, CNC & Manufacturing", "Careers in computer-aided design, manufacturing processes, and production planning.", [ "CAD professional", "CNC programmer", "Manufacturing", "Production planner" ], [ "CAD", "CNC", "manufacturing", "production" ] ), // 13. Industrial & Product Design new CareerField( 13, "Industrial & Product Design", "Design careers creating products, commercial goods, and industrial solutions with focus on form and function.", [ "Appraiser", "Commercial and industrial design", "Designer", "Industrial designer", "Product designer" ], [ "designer", "design", "industrial", "product", "appraiser" ] ), // 14. Visual Arts & Animation new CareerField( 14, "Visual Arts & Animation", "Creative careers in visual design, illustration, animation, and digital art creation.", [ "Animator", "Artist", "Computer animator", "Graphic artist", "Illustrator", "Multimedia designer" ], [ "animator", "artist", "graphic", "illustrator", "multimedia" ] ), // 15. Game Design & Interactive Media new CareerField( 15, "Game Design & Interactive Media", "Careers in video game design, development, testing, and professional gaming.", [ "Game designer", "Game Play Tester", "Professional Gamer" ], [ "game", "gamer", "gaming" ] ), // 16. Audio & Music Production new CareerField( 16, "Audio & Music Production", "Careers in audio engineering, music composition, sound design, and broadcast technology.", [ "Audio designer or engineer", "Audio Engineer", "Audio operator or technician", "Broadcast technician", "Music composer" ], [ "audio", "music", "broadcast", "sound" ] ), // 17. Video & Film Production new CareerField( 17, "Video & Film Production", "Careers in video production, filmmaking, directing, and television broadcasting.", [ "Audiovisual technician", "Director", "Entertainment/television broadcaster", "Videographer" ], [ "video", "film", "director", "television", "broadcast", "videographer" ] ), // 18. Web & Digital Communications new CareerField( 18, "Web & Digital Communications", "Careers in web design, digital communication, and instructional technology.", [ "Instructional technologist", "Web & digital communications", "Webmaster", "Website designer" ], [ "web", "website", "digital", "communications", "webmaster" ] ), // 19. Writing & Publishing new CareerField( 19, "Writing & Publishing", "Careers in writing, editing, publishing, and content creation across various media formats.", [ "Ad copy writer", "Editor", "Publisher", "Screenplay writer", "Speech writer", "Technical writer", "Writer" ], [ "writing", "writer", "editor", "publisher", "copy" ] ), // 20. Journalism & Public Relations new CareerField( 20, "Journalism & Public Relations", "Careers in news reporting, photojournalism, public relations, and communications management.", [ "Internal communications manager", "Motivational speaker", "Photojournalist", "Reporter" ], [ "journalism", "reporter", "photojournalist", "communications", "speaker" ] ), // 21. Forensics & Criminal Investigation new CareerField( 21, "Forensics & Criminal Investigation", "Careers in criminal investigation, forensic science, and analyzing evidence for legal proceedings.", [ "Crime scene investigator", "Detective", "Forensic accountant", "Forensic anthropologist", "Forensic engineering scientist", "Forensic pathologist" ], [ "forensic", "detective", "investigator", "crime" ] ), // 22. Healthcare & Medical Technology new CareerField( 22, "Healthcare & Medical Technology", "Medical and healthcare careers providing patient care, medical technology, and health services.", [ "Dietitian", "Doctor", "Epidemiologist", "Medical technologist", "Nurse", "Pharmacist", "Prosthetics practitioner" ], [ "medical", "health", "doctor", "nurse", "pharmacist", "dietitian", "epidemiology" ] ), // 23. Science & Research new CareerField( 23, "Science & Research", "Scientific research careers across biology, physics, meteorology, and other scientific disciplines.", [ "Botanist", "Food scientist", "Meteorologist", "Molecular biologist", "Physics instructor", "Plant geneticist", "Research and development scientist", "Research assistant", "Researcher" ], [ "scientist", "research", "biology", "physics", "botanist", "meteorologist", "geneticist" ] ), // 24. Education & Training new CareerField( 24, "Education & Training", "Careers in teaching, training, and educational instruction across various subjects and technologies.", [ "Educator", "Teacher/trainer", "Technology education instructor" ], [ "educator", "teacher", "trainer", "education", "instructor" ] ), // 25. Business, Legal & Government new CareerField( 25, "Business, Legal & Government", "Careers in business management, legal services, government, politics, and public policy.", [ "Creative consultant", "Entrepreneur", "Government Official", "Lawyer", "Legal Aide", "Lobbyist", "Management executive", "Market researcher", "Marketing strategist", "Parliamentarian", "Politician", "Project manager", "Public affairs specialist", "Public policy specialist", "Recording Clerk", "Small business owner", "Volunteer manager" ], [ "business", "legal", "lawyer", "government", "politician", "manager", "marketing", "consultant", "entrepreneur" ] ) ]; } }