Class: REXML::Element
- Inherits:
-
Object
- Object
- REXML::Element
- Defined in:
- lib/sword2ruby/rexml_element.rb
Overview
Overloads for the rdf:Description tag (REXML::Element), used for describing OAI-ORE Sword Statements.
For more information, see the Sword2 specification: section 11.3. “OAI-ORE Serialisation”.
Instance Method Summary collapse
-
#rdf_about ⇒ Object
This method returns the string value of the @rdf:about attribute for the <rdf:Description> element (i.e. for each element in the Sword2Ruby::SwordStatementOAIORE#rdf_descriptions array, usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
-
#sword_deposited_by ⇒ Object
This method returns the string value of the <sword:depositedBy> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
-
#sword_deposited_on ⇒ Object
This method returns the Time value of the <sword:depositedOn> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
-
#sword_deposited_on_behalf_of ⇒ Object
This method returns the string value of the <sword:depositedOnBehalfOf> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
-
#sword_original_deposit ⇒ Object
This method returns the string value of the @rdf:resource attribute for the <sword:originalDepsit> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
-
#sword_packagings ⇒ Object
This method returns an array of the string values of the @rdf:resource attribute for the <sword:packaging> tags (usually contained in the OAI-ORE Sword Statement), or an empty array [ ] if none are defined.
-
#sword_state ⇒ Object
This method returns the string value of the @rdf:resource attribute of the <sword:state> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
-
#sword_state_description ⇒ Object
This method returns the string value of the <sword:stateDescription> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
Instance Method Details
#rdf_about ⇒ Object
This method returns the string value of the @rdf:about attribute for the <rdf:Description> element (i.e. for each element in the Sword2Ruby::SwordStatementOAIORE#rdf_descriptions array, usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.3. “OAI-ORE Serialisation”.
14 15 16 |
# File 'lib/sword2ruby/rexml_element.rb', line 14 def rdf_about self.attributes["rdf:about"] end |
#sword_deposited_by ⇒ Object
This method returns the string value of the <sword:depositedBy> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.1.5. “sword:depositedBy”.
56 57 58 |
# File 'lib/sword2ruby/rexml_element.rb', line 56 def sword_deposited_by Utility.find_element_text(self.elements, "sword:depositedBy") end |
#sword_deposited_on ⇒ Object
This method returns the Time value of the <sword:depositedOn> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.1.4. “sword:depositedOn”.
48 49 50 |
# File 'lib/sword2ruby/rexml_element.rb', line 48 def sword_deposited_on Utility.find_element_time(self.elements, "sword:depositedOn") end |
#sword_deposited_on_behalf_of ⇒ Object
This method returns the string value of the <sword:depositedOnBehalfOf> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.1.6. “sword:depositedOnBehalfOf”.
64 65 66 |
# File 'lib/sword2ruby/rexml_element.rb', line 64 def sword_deposited_on_behalf_of Utility.find_element_text(self.elements, "sword:depositedOnBehalfOf") end |
#sword_original_deposit ⇒ Object
This method returns the string value of the @rdf:resource attribute for the <sword:originalDepsit> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.1.1. “sword:originalDeposit”.
22 23 24 |
# File 'lib/sword2ruby/rexml_element.rb', line 22 def sword_original_deposit Utility.find_element_attribute_value(self.elements, "sword:originalDeposit", "rdf:resource") end |
#sword_packagings ⇒ Object
This method returns an array of the string values of the @rdf:resource attribute for the <sword:packaging> tags (usually contained in the OAI-ORE Sword Statement), or an empty array [ ] if none are defined.
For more information, see the Sword2 specification: section 11.1.3. “sword:packaging”.
40 41 42 |
# File 'lib/sword2ruby/rexml_element.rb', line 40 def sword_packagings Utility.find_elements_attribute_value(self.elements, "sword:packaging", "rdf:resource") end |
#sword_state ⇒ Object
This method returns the string value of the @rdf:resource attribute of the <sword:state> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.1.2. “sword:state”.
30 31 32 |
# File 'lib/sword2ruby/rexml_element.rb', line 30 def sword_state Utility.find_element_attribute_value(self.elements, "sword:state", "rdf:resource") end |
#sword_state_description ⇒ Object
This method returns the string value of the <sword:stateDescription> tag (usually contained in the OAI-ORE Sword Statement), or nil if it is not defined.
For more information, see the Sword2 specification: section 11.1.7. “sword:stateDescription”.
73 74 75 |
# File 'lib/sword2ruby/rexml_element.rb', line 73 def sword_state_description Utility.find_element_text(self.elements, "sword:stateDescription") end |