Class: Moab::VersionMetadataEntry

Inherits:
Serializable
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/moab/version_metadata_entry.rb

Overview

Note:

Copyright © 2012 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved. See LICENSE for details.

The descriptive attributes of a digital object version.

Data Model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ VersionMetadataEntry

Returns a new instance of VersionMetadataEntry


22
23
24
25
# File 'lib/moab/version_metadata_entry.rb', line 22

def initialize(opts={})
  @events = Array.new
  super(opts)
end

Instance Attribute Details

#content_changesFileGroupDifference

Returns Summary of content file differences since previous version

Returns:


51
# File 'lib/moab/version_metadata_entry.rb', line 51

element :content_changes, FileGroupDifference, :tag => 'fileGroupDifference'

#descriptionString

Returns A free text external description of why the version was created

Returns:

  • (String)

    A free text external description of why the version was created


43
# File 'lib/moab/version_metadata_entry.rb', line 43

element :description, String

#eventsArray<VersionMetadataEvent>

Returns Array of events with timestamps that track lifecycle stages

Returns:


59
# File 'lib/moab/version_metadata_entry.rb', line 59

has_many :events, VersionMetadataEvent, :tag => 'event'

#labelString

second digit for minor revisions, and third for admin? e.g., 1.0, 1.1, 2.0, 2.0.1 etc. This should be dynamically derivable across the set of versions

Returns:

  • (String)

    “an external version label that increments the most significant digit for major revisions,


35
# File 'lib/moab/version_metadata_entry.rb', line 35

attribute :label, String

#metadata_changesFileGroupDifference

Returns Summary of metadata file differences since previous version

Returns:


55
# File 'lib/moab/version_metadata_entry.rb', line 55

element :metadata_changes, FileGroupDifference, :tag => 'fileGroupDifference'

#noteString

Returns An internal annotation summarizing the changes (optional)

Returns:

  • (String)

    An internal annotation summarizing the changes (optional)


47
# File 'lib/moab/version_metadata_entry.rb', line 47

element :note, String

#significanceString

Returns “major|minor|admin”

Returns:

  • (String)

    “major|minor|admin”


39
# File 'lib/moab/version_metadata_entry.rb', line 39

attribute :significance, String

#version_idInteger

Returns The object version number (A sequential integer)

Returns:

  • (Integer)

    The object version number (A sequential integer)


29
# File 'lib/moab/version_metadata_entry.rb', line 29

attribute :version_id, Integer, :tag => 'versionId', :key => true, :on_save => Proc.new {|n| n.to_s}