Module: Iev::SubjectAreaConcepts
- Defined in:
- lib/iev/subject_area_concepts.rb
Overview
Creates ManagedConcept entries for the IEV subject area hierarchy.
The hierarchy has two levels:
- Area (e.g., "102" = "Mathematics - General concepts and linear algebra")
- Section (e.g., "102-01" = "Sets and operations")
Linking:
- Each IEV concept's ConceptData#domain references its section URI
- Each IEV concept's ManagedConceptData#domains includes area and section codes
- Each section concept has a "broader" relation to its parent area
- Each area concept has "narrower" relations to its sections
Class Method Summary collapse
-
.add_to(collection) ⇒ void
Build all area and section concepts and add them to the collection.
Class Method Details
.add_to(collection) ⇒ void
This method returns an undefined value.
Build all area and section concepts and add them to the collection.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/iev/subject_area_concepts.rb', line 21 def add_to(collection) Iev.subject_areas.each do |area| area_mc = build_area_concept(area) collection.store(area_mc) (area["sections"] || []).each do |section| section_mc = build_section_concept(section, area) collection.store(section_mc) end end end |