Class: Libis::Tools::MetsFile::Representation

Inherits:
Object
  • Object
show all
Includes:
IdContainer
Defined in:
lib/libis/tools/mets_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from IdContainer

#id, #set_from_hash, #to_s

Instance Attribute Details

#dc_recordObject

Returns the value of attribute dc_record.



44
45
46
# File 'lib/libis/tools/mets_file.rb', line 44

def dc_record
  @dc_record
end

#labelObject

Returns the value of attribute label.



44
45
46
# File 'lib/libis/tools/mets_file.rb', line 44

def label
  @label
end

#preservation_typeObject

Returns the value of attribute preservation_type.



44
45
46
# File 'lib/libis/tools/mets_file.rb', line 44

def preservation_type
  @preservation_type
end

#usage_typeObject

Returns the value of attribute usage_type.



44
45
46
# File 'lib/libis/tools/mets_file.rb', line 44

def usage_type
  @usage_type
end

Instance Method Details

#amdObject



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/libis/tools/mets_file.rb', line 50

def amd
  dnx = {}
  tech_data = []
  data = {
      preservationType: preservation_type,
      usageType: usage_type,
      # RevisionNumber: 1,
      # DigitalOriginal: true,
  }.cleanup
  tech_data << TechGeneralRep.new(data) unless data.empty?
  dnx[:tech] = tech_data unless tech_data.empty?
  dnx
end

#xml_idObject



46
47
48
# File 'lib/libis/tools/mets_file.rb', line 46

def xml_id
  "rep#{id}"
end