Class: XDS::Author
Constant Summary collapse
- CLASSIFICATION_SCHEME =
'urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d'
Instance Attribute Summary collapse
-
#institution ⇒ Object
Returns the value of attribute institution.
-
#person ⇒ Object
Returns the value of attribute person.
-
#role ⇒ Object
Returns the value of attribute role.
-
#specialty ⇒ Object
Returns the value of attribute specialty.
Instance Method Summary collapse
- #from_extrinsic_object(eo_node) ⇒ Object
-
#initialize(institution = "", person = "", role = "", specialty = "") ⇒ Author
constructor
A new instance of Author.
- #to_soap(builder, object_id) ⇒ Object
Methods included from Helper
#create_classification, #create_external_identifier, #create_extrinsic_object, #create_localized_string, #create_name, #create_slot, #get_external_identifier_value, #get_slot_value, #get_slot_values, #with_classification
Constructor Details
#initialize(institution = "", person = "", role = "", specialty = "") ⇒ Author
Returns a new instance of Author.
8 9 10 11 12 13 |
# File 'lib/xds/author.rb', line 8 def initialize(institution="",person="", role="",specialty="") @institution = institution @person = person @role=role @specialty=specialty end |
Instance Attribute Details
#institution ⇒ Object
Returns the value of attribute institution.
6 7 8 |
# File 'lib/xds/author.rb', line 6 def institution @institution end |
#person ⇒ Object
Returns the value of attribute person.
6 7 8 |
# File 'lib/xds/author.rb', line 6 def person @person end |
#role ⇒ Object
Returns the value of attribute role.
6 7 8 |
# File 'lib/xds/author.rb', line 6 def role @role end |
#specialty ⇒ Object
Returns the value of attribute specialty.
6 7 8 |
# File 'lib/xds/author.rb', line 6 def specialty @specialty end |
Instance Method Details
#from_extrinsic_object(eo_node) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/xds/author.rb', line 24 def from_extrinsic_object(eo_node) with_classification(eo_node, CLASSIFICATION_SCHEME) do |classification| @institution = get_slot_value(classification, 'authorInstitution') @person = get_slot_value(classification, 'authorPerson') @role = get_slot_value(classification, 'authorRole') @specialty = get_slot_value(classification, 'authorSpecialty') end end |
#to_soap(builder, object_id) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/xds/author.rb', line 15 def to_soap(builder, object_id) create_classification(builder,CLASSIFICATION_SCHEME,object_id,"") do |build| create_slot(builder,'authorInstitution', [@institution]) create_slot(builder,'authorPerson', @person) create_slot(builder,'authorRole', @role) create_slot(builder,'authorSpecialty', @specialty) end end |