Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
original_filename now stored in adminMetadata using premis:hasOrigina…
Browse files Browse the repository at this point in the history
…lName predicate.

Closes #85
This change clears the way to remove the properties datastream and may help with
Fedora 4 migration since Fedora 4 stores the original name of a binary file under
the same predicate.
  • Loading branch information
dchandekstark committed Jan 9, 2015
1 parent c6a8903 commit f153639
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions ddr-models.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Gem::Specification.new do |s|
s.add_dependency "grouper-rest-client"
s.add_dependency "ezid-client", "~> 0.9"
s.add_dependency "resque", "~> 1.25"
s.add_dependency "rdf-vocab", "~> 0.4"

s.add_development_dependency "bundler", "~> 1.7"
s.add_development_dependency "rake"
Expand Down
4 changes: 3 additions & 1 deletion lib/ddr/datastreams/admin_metadata_datastream.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
require "rdf-vocab"

module Ddr
module Datastreams
class AdminMetadataDatastream < ActiveFedora::NtriplesRDFDatastream

property :permanent_id, predicate: Ddr::Vocab::Asset.permanentId

property :permanent_url, predicate: Ddr::Vocab::Asset.permanentUrl
property :original_filename, predicate: RDF::Vocab::PREMIS::V1.hasOriginalName

Ddr::Vocab::Roles.each do |term|
property Ddr::Metadata::Vocabulary.term_name(Ddr::Vocab::Roles, term),
Expand Down
2 changes: 1 addition & 1 deletion lib/ddr/models/has_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module HasContent
label: "Content file for this object",
control_group: "M"

has_attributes :original_filename, datastream: "properties", multiple: false
has_attributes :original_filename, datastream: "adminMetadata", multiple: false

include Hydra::Derivatives
include FileManagement unless include?(FileManagement)
Expand Down

0 comments on commit f153639

Please sign in to comment.