Class: Dspace::Bitstream
- Inherits:
-
Object
- Object
- Dspace::Bitstream
- Includes:
- Dspace::Builders::HashBuilder
- Defined in:
- lib/dspace/bitstream.rb
Instance Attribute Summary collapse
-
#bundle_name ⇒ Object
Returns the value of attribute bundle_name.
-
#check_sum ⇒ Object
readonly
Returns the value of attribute check_sum.
-
#description ⇒ Object
Returns the value of attribute description.
-
#format ⇒ Object
Returns the value of attribute format.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_object ⇒ Object
readonly
Returns the value of attribute parent_object.
-
#policies ⇒ Object
readonly
Returns the value of attribute policies.
-
#retrieve_link ⇒ Object
readonly
Returns the value of attribute retrieve_link.
-
#sequence_id ⇒ Object
readonly
Returns the value of attribute sequence_id.
-
#size_bytes ⇒ Object
readonly
Returns the value of attribute size_bytes.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(args) ⇒ Bitstream
constructor
A new instance of Bitstream.
- #to_h ⇒ Object
Methods included from Dspace::Builders::HashBuilder
Constructor Details
#initialize(args) ⇒ Bitstream
Returns a new instance of Bitstream.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dspace/bitstream.rb', line 12 def initialize args @id = args['id'] @name = args['name'] @type = args['type'] @link = args['link'] @bundle_name = args['bundleName'] @description = args['description'] @format = args['format'] @mime_type = args['mimeType'] @size_bytes = args['sizeBytes'] @parent_object = args['parentObject'] @retrieve_link = args['retrieveLink'] @check_sum = args['checkSum'] @sequence_id = args['sequenceId'] @policies = Dspace::Builders::ModelBuilder.build_policies(args['policies']) @expand = args['expand'] end |
Instance Attribute Details
#bundle_name ⇒ Object
Returns the value of attribute bundle_name.
5 6 7 |
# File 'lib/dspace/bitstream.rb', line 5 def bundle_name @bundle_name end |
#check_sum ⇒ Object (readonly)
Returns the value of attribute check_sum.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def check_sum @check_sum end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/dspace/bitstream.rb', line 5 def description @description end |
#format ⇒ Object
Returns the value of attribute format.
5 6 7 |
# File 'lib/dspace/bitstream.rb', line 5 def format @format end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def id @id end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def link @link end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
5 6 7 |
# File 'lib/dspace/bitstream.rb', line 5 def mime_type @mime_type end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/dspace/bitstream.rb', line 5 def name @name end |
#parent_object ⇒ Object (readonly)
Returns the value of attribute parent_object.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def parent_object @parent_object end |
#policies ⇒ Object (readonly)
Returns the value of attribute policies.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def policies @policies end |
#retrieve_link ⇒ Object (readonly)
Returns the value of attribute retrieve_link.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def retrieve_link @retrieve_link end |
#sequence_id ⇒ Object (readonly)
Returns the value of attribute sequence_id.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def sequence_id @sequence_id end |
#size_bytes ⇒ Object (readonly)
Returns the value of attribute size_bytes.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def size_bytes @size_bytes end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/dspace/bitstream.rb', line 8 def type @type end |
Instance Method Details
#to_h ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/dspace/bitstream.rb', line 30 def to_h { id: @id, name: @name, type: @type, link: @link, bundleName: @bundle_name, description: @description, format: @format, mimeType: @mime_type, sizeBytes: @size_bytes, parentObject: @parent_object, retrieveLink: @retrieve_link, checkSum: @check_sum, sequenceId: @sequence_id, policies: @policies, expand: @expand } end |