Sha256: a735fe827a66ecb94c70b78783b0d51488776a342ea7a87eafd3904fa9eaa980

Contents?: true

Size: 1.28 KB

Versions: 10

Compression:

Stored size: 1.28 KB

Contents

# Copyright © 2012 The Pennsylvania State University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# properties datastream: catch-all for info that didn't have another home.  Particularly depositor.
class PropertiesDatastream < ActiveFedora::NokogiriDatastream
  set_terminology do |t|
    t.root(:path=>"fields", :xmlns => '', :namespace_prefix => nil) 
    # This is where we put the user id of the object depositor -- impacts permissions/access controls
    t.depositor :xmlns => '', :namespace_prefix => nil, :index_as=>[:searchable]
    # This is where we put the relative path of the file if submitted as a folder
    t.relative_path :xmlns => '', :namespace_prefix => nil
  end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sufia-0.1.0 app/models/datastreams/properties_datastream.rb
sufia-0.0.8 app/models/datastreams/properties_datastream.rb
sufia-0.0.7 app/models/datastreams/properties_datastream.rb
sufia-0.0.6 app/models/datastreams/properties_datastream.rb
sufia-0.0.5 app/models/datastreams/properties_datastream.rb
sufia-0.0.4 app/models/datastreams/properties_datastream.rb
sufia-0.0.3 app/models/datastreams/properties_datastream.rb
sufia-0.0.2 app/models/datastreams/properties_datastream.rb
sufia-0.0.1 app/models/datastreams/properties_datastream.rb
sufia-0.0.1.pre2 app/models/datastreams/properties_datastream.rb