Class: Hyrax::ControlledVocabularies::Location
- Inherits:
-
ActiveTriples::Resource
- Object
- ActiveTriples::Resource
- Hyrax::ControlledVocabularies::Location
- Includes:
- ResourceLabelCaching
- Defined in:
- lib/hyrax/controlled_vocabularies/location.rb
Constant Summary
Constants included from ResourceLabelCaching
ResourceLabelCaching::CACHE_KEY_PREFIX
Instance Method Summary collapse
- #full_label ⇒ Object
-
#solrize ⇒ Object
Return a tuple of url & label.
Methods included from ResourceLabelCaching
Instance Method Details
#full_label ⇒ Object
16 17 18 |
# File 'lib/hyrax/controlled_vocabularies/location.rb', line 16 def full_label location_service.full_label(rdf_subject.to_s) end |
#solrize ⇒ Object
Return a tuple of url & label
10 11 12 13 14 |
# File 'lib/hyrax/controlled_vocabularies/location.rb', line 10 def solrize label = full_label || rdf_label.first.to_s return [rdf_subject.to_s] if label.blank? || label == rdf_subject.to_s [rdf_subject.to_s, { label: "#{label}$#{rdf_subject}" }] end |