Sha256: 2945924e774bddd97617a2d7a21d64f472ebfd1c1d07de94a4f73706852f531d

Contents?: true

Size: 414 Bytes

Versions: 48

Compression:

Stored size: 414 Bytes

Contents

module Hyrax
  module ControlledVocabularies
    class Location < ActiveTriples::Resource
      configure rdf_label: ::RDF::Vocab::GEONAMES.name

      # Return a tuple of url & label
      def solrize
        return [rdf_subject.to_s] if rdf_label.first.to_s.blank? || rdf_label.first.to_s == rdf_subject.to_s
        [rdf_subject.to_s, { label: "#{rdf_label.first}$#{rdf_subject}" }]
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
hyrax-2.9.6 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.9.5 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.9.4 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.9.3 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.9.2 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.9.1 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.9.0 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.8.0 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.7.2 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.7.1 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.7.0 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.6.0 lib/hyrax/controlled_vocabularies/location.rb
hyrax-3.0.0.pre.rc1 lib/hyrax/controlled_vocabularies/location.rb
hyrax-3.0.0.pre.beta3 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.5.1 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.5.0 lib/hyrax/controlled_vocabularies/location.rb
hyrax-3.0.0.pre.beta2 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.4.1 lib/hyrax/controlled_vocabularies/location.rb
hyrax-3.0.0.pre.beta1 lib/hyrax/controlled_vocabularies/location.rb
hyrax-2.4.0 lib/hyrax/controlled_vocabularies/location.rb