Sha256: 19eed00bcf81cfa6a0574e95a217837876699e894971d2fe61458e15e493235a

Contents?: true

Size: 615 Bytes

Versions: 33

Compression:

Stored size: 615 Bytes

Contents

module Dor
  module Rightsable
    extend ActiveSupport::Concern

    included do
      has_metadata :name => 'rightsMetadata', :type => Dor::RightsMetadataDS, :label => 'Rights metadata'
    end

    def build_rightsMetadata_datastream(ds)
      content_ds = admin_policy_object.datastreams['defaultObjectRights']
      ds.dsLabel = 'Rights Metadata'
      ds.ng_xml = content_ds.ng_xml.clone
      ds.content = ds.ng_xml.to_xml
    end

    def world_doc
      Nokogiri::XML::Builder.new do |xml|
        xml.access(:type => 'read') {
          xml.machine { xml.world }
        }
      end.doc
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
dor-services-5.15.1 lib/dor/models/rightsable.rb
dor-services-5.15.0 lib/dor/models/rightsable.rb
dor-services-5.14.2 lib/dor/models/rightsable.rb
dor-services-5.14.1 lib/dor/models/rightsable.rb
dor-services-5.14.0 lib/dor/models/rightsable.rb
dor-services-5.13.0 lib/dor/models/rightsable.rb
dor-services-5.12.0 lib/dor/models/rightsable.rb
dor-services-5.11.1 lib/dor/models/rightsable.rb
dor-services-5.11.0 lib/dor/models/rightsable.rb
dor-services-5.10.4 lib/dor/models/rightsable.rb
dor-services-5.10.3 lib/dor/models/rightsable.rb
dor-services-5.10.2 lib/dor/models/rightsable.rb
dor-services-5.10.1 lib/dor/models/rightsable.rb
dor-services-5.10.0 lib/dor/models/rightsable.rb
dor-services-5.9.1 lib/dor/models/rightsable.rb
dor-services-5.9.0 lib/dor/models/rightsable.rb
dor-services-5.8.2 lib/dor/models/rightsable.rb
dor-services-5.8.1 lib/dor/models/rightsable.rb
dor-services-5.8.0 lib/dor/models/rightsable.rb
dor-services-5.7.0 lib/dor/models/rightsable.rb