Class: Moab::SignatureCatalogEntry
- Inherits:
-
Serializable
- Object
- Serializable
- Moab::SignatureCatalogEntry
- Includes:
- HappyMapper
- Defined in:
- lib/moab/signature_catalog_entry.rb
Overview
Copyright © 2012 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved. See LICENSE for details.
A file-level entry in a digital object’s SignatureCatalog. It has a child FileSignature element that identifies the file’s contents (the bytestream) along with data that specfies the SDR storage location that was used to preserve a single file instance.
Data Model
-
SignatureCatalog = lookup table containing a cumulative collection of all files ever ingested
-
SignatureCatalogEntry [1..*] = an row in the lookup table containing storage information about a single file
-
FileSignature [1] = file fixity information
-
-
Instance Attribute Summary collapse
-
#group_id ⇒ String
The name of the file group.
-
#path ⇒ String
The id is the filename path, relative to the file group’s base directory.
-
#signature ⇒ FileSignature
The fixity data of the file instance.
-
#version_id ⇒ Integer
The ordinal version number.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ SignatureCatalogEntry
constructor
A new instance of SignatureCatalogEntry.
-
#storage_path ⇒ String
Returns the storage path to a file, relative to the object storage home directory.
Constructor Details
#initialize(opts = {}) ⇒ SignatureCatalogEntry
Returns a new instance of SignatureCatalogEntry.
24 25 26 |
# File 'lib/moab/signature_catalog_entry.rb', line 24 def initialize(opts={}) super(opts) end |
Instance Attribute Details
#group_id ⇒ String
Returns The name of the file group.
34 |
# File 'lib/moab/signature_catalog_entry.rb', line 34 attribute :group_id, String, :tag => 'groupId', :key => true |
#path ⇒ String
Returns The id is the filename path, relative to the file group’s base directory.
38 |
# File 'lib/moab/signature_catalog_entry.rb', line 38 attribute :path, String, :key => true, :tag => 'storagePath' |
#signature ⇒ FileSignature
Returns The fixity data of the file instance.
42 |
# File 'lib/moab/signature_catalog_entry.rb', line 42 element :signature, FileSignature, :tag => 'fileSignature' |
#version_id ⇒ Integer
Returns The ordinal version number.
30 |
# File 'lib/moab/signature_catalog_entry.rb', line 30 attribute :version_id, Integer, :tag => 'originalVersion', :key => true, :on_save => Proc.new {|n| n.to_s} |
Instance Method Details
#storage_path ⇒ String
Returns the storage path to a file, relative to the object storage home directory
55 56 57 |
# File 'lib/moab/signature_catalog_entry.rb', line 55 def storage_path File.join(StorageObject.version_dirname(version_id),'data', group_id, path) end |