Class: FAIRChampionHarvester::MetadataObject

Inherits:
Object
  • Object
show all
Defined in:
lib/metadata.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMetadataObject

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

.commentsObject (readonly)

Returns the value of attribute comments.



19
20
21
# File 'lib/metadata.rb', line 19

def comments
  @comments
end

Instance Attribute Details

#commentsObject

Returns the value of attribute comments.



3
4
5
# File 'lib/metadata.rb', line 3

def comments
  @comments
end

#finalURIObject

Returns the value of attribute finalURI.



3
4
5
# File 'lib/metadata.rb', line 3

def finalURI
  @finalURI
end

#full_responseObject

Returns the value of attribute full_response.



3
4
5
# File 'lib/metadata.rb', line 3

def full_response
  @full_response
end

#graphObject

Returns the value of attribute graph.



3
4
5
# File 'lib/metadata.rb', line 3

def graph
  @graph
end

#guidtypeObject

Returns the value of attribute guidtype.



3
4
5
# File 'lib/metadata.rb', line 3

def guidtype
  @guidtype
end

#hashObject

Returns the value of attribute hash.



3
4
5
# File 'lib/metadata.rb', line 3

def hash
  @hash
end

Class Method Details

.clear_commentsObject



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

#rdfObject



36
37
38
# File 'lib/metadata.rb', line 36

def rdf
  graph
end