Class: OAI::IdentifyResponse
- Includes:
- XPath
- Defined in:
- lib/oai/client/identify.rb
Instance Attribute Summary collapse
-
#admin_email ⇒ Object
Returns the value of attribute admin_email.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#compression ⇒ Object
Returns the value of attribute compression.
-
#deleted_record ⇒ Object
Returns the value of attribute deleted_record.
-
#earliest_datestamp ⇒ Object
Returns the value of attribute earliest_datestamp.
-
#granularity ⇒ Object
Returns the value of attribute granularity.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#repository_name ⇒ Object
Returns the value of attribute repository_name.
Attributes inherited from Response
Instance Method Summary collapse
-
#descriptions ⇒ Object
returns REXML::Element nodes for each description section if the OAI::Client was configured to use libxml then you will instead get a LibXML::XML::Node object.
-
#initialize(doc) ⇒ IdentifyResponse
constructor
A new instance of IdentifyResponse.
- #to_s ⇒ Object
Methods included from XPath
#get_attribute, #xpath, #xpath_all, #xpath_first
Constructor Details
#initialize(doc) ⇒ IdentifyResponse
Returns a new instance of IdentifyResponse.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/oai/client/identify.rb', line 7 def initialize(doc) super doc @repository_name = xpath(doc, './/Identify/repositoryName') @base_url = xpath(doc, './/Identify/baseURL') @protocol = xpath(doc, './/Identify/protocol') @admin_email = xpath(doc, './/Identify/adminEmail') @earliest_datestamp = xpath(doc, './/Identify/earliestDatestamp') @deleted_record = xpath(doc, './/Identify/deletedRecord') @granularity = xpath(doc, './/Identify/granularity') @compression = xpath(doc, '..//Identify/compression') end |
Instance Attribute Details
#admin_email ⇒ Object
Returns the value of attribute admin_email.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def admin_email @admin_email end |
#base_url ⇒ Object
Returns the value of attribute base_url.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def base_url @base_url end |
#compression ⇒ Object
Returns the value of attribute compression.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def compression @compression end |
#deleted_record ⇒ Object
Returns the value of attribute deleted_record.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def deleted_record @deleted_record end |
#earliest_datestamp ⇒ Object
Returns the value of attribute earliest_datestamp.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def earliest_datestamp @earliest_datestamp end |
#granularity ⇒ Object
Returns the value of attribute granularity.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def granularity @granularity end |
#protocol ⇒ Object
Returns the value of attribute protocol.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def protocol @protocol end |
#repository_name ⇒ Object
Returns the value of attribute repository_name.
4 5 6 |
# File 'lib/oai/client/identify.rb', line 4 def repository_name @repository_name end |
Instance Method Details
#descriptions ⇒ Object
returns REXML::Element nodes for each description section if the OAI::Client was configured to use libxml then you will instead get a LibXML::XML::Node object.
26 27 28 |
# File 'lib/oai/client/identify.rb', line 26 def descriptions return xpath_all(doc, './/Identify/description') end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/oai/client/identify.rb', line 19 def to_s return "#{@repository_name} [#{@base_url}]" end |