-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using ActiveFedora::WithMetadata::DefaultMetadataClassFactory
Add our custom properties to Hydra::PCDM::File and opens the way for additional properties to be added downstream.
- Loading branch information
Showing
5 changed files
with
4 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
module Hydra::PCDM | ||
class File < ActiveFedora::File | ||
include ActiveFedora::WithMetadata | ||
include ActiveFedora::Schema | ||
|
||
metadata do | ||
configure type: Vocab::PCDMTerms.File | ||
property :label, predicate: ::RDF::RDFS.label | ||
|
||
property :file_name, predicate: RDF::Vocab::EBUCore.filename | ||
property :file_size, predicate: RDF::Vocab::EBUCore.fileSize | ||
property :date_created, predicate: RDF::Vocab::EBUCore.dateCreated | ||
property :has_mime_type, predicate: RDF::Vocab::EBUCore.hasMimeType | ||
property :date_modified, predicate: RDF::Vocab::EBUCore.dateModified | ||
property :byte_order, predicate: Vocab::SweetJPLTerms.byteOrder | ||
|
||
# This is a server-managed predicate which means Fedora does not let us change it. | ||
property :file_hash, predicate: RDF::Vocab::PREMIS.hasMessageDigest | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters