Class: OpenBD::Resources::Onix::Contributor

Inherits:
BaseResource show all
Defined in:
lib/openbd/resources/onix/contributor.rb

Overview

Authorship (Contributor)

This class is used in DescriptiveDetail as Contributor

Instance Attribute Summary collapse

Attributes inherited from BaseResource

#source

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ Contributor

Returns a new instance of Contributor.



29
30
31
32
33
34
35
36
# File 'lib/openbd/resources/onix/contributor.rb', line 29

def initialize(source)
  super
  @role = source["ContributorRole"]
  @name = source["PersonName"]["content"] rescue nil
  @name_collationkey = source["PersonName"]["collationkey"] rescue nil
  @seqence_number = source["SequenceNumber"]
  @biographical_note = source["BiographicalNote"]
end

Instance Attribute Details

#biographical_noteObject (readonly)

Biographical Note (著者略歴)



27
28
29
# File 'lib/openbd/resources/onix/contributor.rb', line 27

def biographical_note
  @biographical_note
end

#nameObject (readonly)

Contributor’s Name (著者名)



17
18
19
# File 'lib/openbd/resources/onix/contributor.rb', line 17

def name
  @name
end

#name_colationkeyObject (readonly)

Collationkey of Contributor’s Name (著者名読み)



20
21
22
# File 'lib/openbd/resources/onix/contributor.rb', line 20

def name_colationkey
  @name_colationkey
end

#roleArray<String> (readonly)

Contributor’s Role (著者区分)

Returns:

  • (Array<String>)


14
15
16
# File 'lib/openbd/resources/onix/contributor.rb', line 14

def role
  @role
end

#seqence_numberString (readonly)

Sequence number of Contributor (著者順序)

Returns:

  • (String)


24
25
26
# File 'lib/openbd/resources/onix/contributor.rb', line 24

def seqence_number
  @seqence_number
end