Sha256: f6d0dd554af3f09727cd5d0db78d3da005e7a875434f884ec661de51fcf9112b

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 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
    # 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

1 entries across 1 versions & 1 rubygems

Version Path
sufia-0.0.1.pre1 app/models/datastreams/properties_datastream.rb