Sha256: 91c994551b9cc472867830def45a6e481f7b7a786ec11b7fd6ca81aab1f3ac63

Contents?: true

Size: 726 Bytes

Versions: 4

Compression:

Stored size: 726 Bytes

Contents

module Sufia
  module PropertiesDatastreamBehavior
    extend ActiveSupport::Concern

    included do
      set_terminology do |t|
        t.root(:path=>"fields" )
        # This is where we put the user id of the object depositor -- impacts permissions/access controls
        t.depositor :index_as=>[:stored_searchable]
        # This is where we put the relative path of the file if submitted as a folder
        t.relative_path
        t.import_url path: 'importUrl', :index_as=>:symbol
      end
    end

    module ClassMethods
      def xml_template
        builder = Nokogiri::XML::Builder.new do |xml|
          xml.fields
        end
        builder.doc
      end
    end

    def prefix
      ""
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sufia-4.0.0.beta2 sufia-models/app/models/concerns/sufia/properties_datastream_behavior.rb
sufia-models-4.0.0.beta2 app/models/concerns/sufia/properties_datastream_behavior.rb
sufia-4.0.0.beta1 sufia-models/app/models/concerns/sufia/properties_datastream_behavior.rb
sufia-models-4.0.0.beta1 app/models/concerns/sufia/properties_datastream_behavior.rb