Class: Elibri::ONIX::Release_3_0::Contributor
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::Contributor
- Includes:
- ExternalId, ExternalTimestamp, Inspector
- Defined in:
- lib/elibri_onix/onix_3_0/contributor.rb
Constant Summary collapse
- ATTRIBUTES =
:nodoc:
[ :number, :role, :person_name, :from_language, :titles_before_names, :names_before_key, :prefix_to_key, :key_names, :names_after_key, :biographical_note, :unnamed_persons, :role_name ]
- RELATIONS =
:nodoc:
[ :inspect_include_fields ]
Instance Attribute Summary collapse
-
#biographical_note ⇒ Object
readonly
biografia.
-
#corporate_name ⇒ Object
readonly
Returns the value of attribute corporate_name.
-
#corporate_name_inverted ⇒ Object
readonly
Returns the value of attribute corporate_name_inverted.
-
#from_language ⇒ Object
readonly
w przypadku tłumacza kod języka oryginału, lista języków dostępna pod adresem github.com/elibri/elibri_onix_dict/blob/master/lib/elibri_onix_dict/onix_3_0/serialized/LanguageCode.yml.
-
#key_names ⇒ Object
readonly
nazwisko lub nazwiska.
-
#names_after_key ⇒ Object
readonly
dodatkowe oznaczenia, np.
-
#names_before_key ⇒ Object
readonly
imię lub imiona.
-
#number ⇒ Object
readonly
:nodoc:.
-
#person_name ⇒ Object
readonly
pełne imię i nazwisko - to pole jest zawsze uzupełnione.
-
#person_name_inverted ⇒ Object
readonly
jednak czasami, nie ma :person_name, jest za to :person_name_inverted - e-isbn.
-
#prefix_to_key ⇒ Object
readonly
prefix przed nazwiskiem, np.
-
#role ⇒ Object
readonly
:doc: kod ONIX dla roli - np.
-
#titles_before_names ⇒ Object
readonly
tytuł naukowy, np.
-
#to_xml ⇒ Object
readonly
reprezentacja danych w xml-u.
-
#unnamed_persons ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#initialize(data) ⇒ Contributor
constructor
A new instance of Contributor.
- #inspect_include_fields ⇒ Object
- #role_name ⇒ Object
Methods included from Inspector
#attribute_for_inspect, #inspect
Methods included from ExternalTimestamp
#datestamp, included, #set_datestamp
Methods included from ExternalId
Constructor Details
#initialize(data) ⇒ Contributor
Returns a new instance of Contributor.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 79 def initialize(data) @to_xml = data.to_s @number = data.at_css('SequenceNumber').try(:text).try(:to_i) @role = data.at_css('ContributorRole').try(:text) @person_name = data.at_css('PersonName').try(:text) @person_name_inverted = data.at_css('PersonNameInverted').try(:text) @from_language = data.at_css('FromLanguage').try(:text) @titles_before_names = data.at_css('TitlesBeforeNames').try(:text) @names_before_key = data.at_css('NamesBeforeKey').try(:text) @prefix_to_key = data.at_css('PrefixToKey').try(:text) @key_names = data.at_css('KeyNames').try(:text) @names_after_key = data.at_css('NamesAfterKey').try(:text) @biographical_note = data.at_css('BiographicalNote').try(:text) @unnamed_persons = data.at_css('UnnamedPersons').try(:text) @corporate_name = data.at_css('CorporateName').try(:text) @corporate_name_inverted = data.at_css('CorporateNameInverted').try(:text) set_eid(data) set_datestamp(data) end |
Instance Attribute Details
#biographical_note ⇒ Object (readonly)
biografia
67 68 69 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 67 def biographical_note @biographical_note end |
#corporate_name ⇒ Object (readonly)
Returns the value of attribute corporate_name.
72 73 74 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 72 def corporate_name @corporate_name end |
#corporate_name_inverted ⇒ Object (readonly)
Returns the value of attribute corporate_name_inverted.
73 74 75 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 73 def corporate_name_inverted @corporate_name_inverted end |
#from_language ⇒ Object (readonly)
w przypadku tłumacza kod języka oryginału, lista języków dostępna pod adresem github.com/elibri/elibri_onix_dict/blob/master/lib/elibri_onix_dict/onix_3_0/serialized/LanguageCode.yml
49 50 51 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 49 def from_language @from_language end |
#key_names ⇒ Object (readonly)
nazwisko lub nazwiska
61 62 63 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 61 def key_names @key_names end |
#names_after_key ⇒ Object (readonly)
dodatkowe oznaczenia, np. OHP (zakon)
64 65 66 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 64 def names_after_key @names_after_key end |
#names_before_key ⇒ Object (readonly)
imię lub imiona
55 56 57 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 55 def names_before_key @names_before_key end |
#number ⇒ Object (readonly)
:nodoc:
34 35 36 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 34 def number @number end |
#person_name ⇒ Object (readonly)
pełne imię i nazwisko - to pole jest zawsze uzupełnione
42 43 44 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 42 def person_name @person_name end |
#person_name_inverted ⇒ Object (readonly)
jednak czasami, nie ma :person_name, jest za to :person_name_inverted - e-isbn
45 46 47 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 45 def person_name_inverted @person_name_inverted end |
#prefix_to_key ⇒ Object (readonly)
prefix przed nazwiskiem, np. von, van
58 59 60 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 58 def prefix_to_key @prefix_to_key end |
#role ⇒ Object (readonly)
:doc: kod ONIX dla roli - np. ‘A01’ - autor, pełna lista pod adresem github.com/elibri/elibri_onix_dict/blob/master/lib/elibri_onix_dict/onix_3_0/serialized/ProductFormCode.yml
39 40 41 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 39 def role @role end |
#titles_before_names ⇒ Object (readonly)
tytuł naukowy, np. prof.
52 53 54 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 52 def titles_before_names @titles_before_names end |
#to_xml ⇒ Object (readonly)
reprezentacja danych w xml-u
76 77 78 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 76 def to_xml @to_xml end |
#unnamed_persons ⇒ Object (readonly)
:nodoc:
70 71 72 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 70 def unnamed_persons @unnamed_persons end |
Instance Method Details
#inspect_include_fields ⇒ Object
103 104 105 |
# File 'lib/elibri_onix/onix_3_0/contributor.rb', line 103 def inspect_include_fields [:role_name, :person_name] end |