Class: Moab::VersionMetadataEntry

Inherits:
Serializer::Serializable 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

Methods inherited from Serializer::Serializable

#array_to_hash, deep_diff, #diff, #key, #key_name, #summary, #to_hash, #to_json, #to_yaml, #variable_names, #variables

Constructor Details

#initialize(opts = {}) ⇒ VersionMetadataEntry

Returns a new instance of VersionMetadataEntry.


20
21
22
23
# File 'lib/moab/version_metadata_entry.rb', line 20

def initialize(opts = {})
  @events = []
  super(opts)
end

Instance Attribute Details

#content_changesFileGroupDifference

Returns Summary of content file differences since previous version.

Returns:


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

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


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

element :description, String

#eventsArray<VersionMetadataEvent>

Returns Array of events with timestamps that track lifecycle stages.

Returns:


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

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,


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

attribute :label, String

#metadata_changesFileGroupDifference

Returns Summary of metadata file differences since previous version.

Returns:


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

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

#noteString

Returns An internal annotation summarizing the changes (optional).

Returns:

  • (String)

    An internal annotation summarizing the changes (optional)


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

element :note, String

#significanceString

Returns “major|minor|admin”.

Returns:

  • (String)

    “major|minor|admin”


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

attribute :significance, String

#version_idInteger

Returns The object version number (A sequential integer).

Returns:

  • (Integer)

    The object version number (A sequential integer)


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

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