Class: FAIRChampionHarvester::MetadataObject
- Inherits:
-
Object
- Object
- FAIRChampionHarvester::MetadataObject
- Defined in:
- lib/metadata.rb
Class Attribute Summary collapse
-
.comments ⇒ Object
readonly
Returns the value of attribute comments.
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#finalURI ⇒ Object
Returns the value of attribute finalURI.
-
#full_response ⇒ Object
Returns the value of attribute full_response.
-
#graph ⇒ Object
Returns the value of attribute graph.
-
#guidtype ⇒ Object
Returns the value of attribute guidtype.
-
#hash ⇒ Object
Returns the value of attribute hash.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MetadataObject
constructor
a hash of metadata a RDF.rb graph of metadata an array of comments the type of GUID that was detected # will be an array of Net::HTTP::Response.
- #merge_hash(hash) ⇒ Object
-
#merge_rdf(triples) ⇒ Object
incoming list of triples.
- #rdf ⇒ Object
Constructor Details
#initialize ⇒ MetadataObject
a hash of metadata a RDF.rb graph of metadata an array of comments the type of GUID that was detected # will be an array of Net::HTTP::Response
10 11 12 13 14 15 16 |
# File 'lib/metadata.rb', line 10 def initialize @hash = {} @graph = RDF::Graph.new @full_response = [] @finalURI = [] @comments = [] end |
Class Attribute Details
.comments ⇒ Object (readonly)
Returns the value of attribute comments.
19 20 21 |
# File 'lib/metadata.rb', line 19 def comments @comments end |
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments.
3 4 5 |
# File 'lib/metadata.rb', line 3 def comments @comments end |
#finalURI ⇒ Object
Returns the value of attribute finalURI.
3 4 5 |
# File 'lib/metadata.rb', line 3 def finalURI @finalURI end |
#full_response ⇒ Object
Returns the value of attribute full_response.
3 4 5 |
# File 'lib/metadata.rb', line 3 def full_response @full_response end |
#graph ⇒ Object
Returns the value of attribute graph.
3 4 5 |
# File 'lib/metadata.rb', line 3 def graph @graph end |
#guidtype ⇒ Object
Returns the value of attribute guidtype.
3 4 5 |
# File 'lib/metadata.rb', line 3 def guidtype @guidtype end |
#hash ⇒ Object
Returns the value of attribute hash.
3 4 5 |
# File 'lib/metadata.rb', line 3 def hash @hash end |
Class Method Details
.clear_comments ⇒ Object
22 23 24 |
# File 'lib/metadata.rb', line 22 def self.clear_comments @comments = [] end |
Instance Method Details
#merge_hash(hash) ⇒ Object
26 27 28 29 |
# File 'lib/metadata.rb', line 26 def merge_hash(hash) # $stderr.puts "\n\n\nIncoming Hash #{hash.inspect}" self.hash = self.hash.merge(hash) end |
#merge_rdf(triples) ⇒ Object
incoming list of triples
31 32 33 34 |
# File 'lib/metadata.rb', line 31 def merge_rdf(triples) # incoming list of triples graph << triples graph end |
#rdf ⇒ Object
36 37 38 |
# File 'lib/metadata.rb', line 36 def rdf graph end |