Class: Lbp::Article

Inherits:
Resource show all
Defined in:
lib/lbp/article.rb

Instance Attribute Summary

Attributes inherited from Resource

#identifier, #results

Instance Method Summary collapse

Methods inherited from Resource

create, #description, find, #has_parts, #initialize, #is_part_of, #title, #type, #value, #values

Constructor Details

This class inherits a constructor from Lbp::Resource

Instance Method Details

#article_typeObject



14
15
16
17
# File 'lib/lbp/article.rb', line 14

def article_type
	type = self.results.dup.filter(:p => RDF::URI("http://scta.info/property/articleType")).first[:o].to_s
	type.downcase
end

#article_type_shortIdObject



18
19
20
# File 'lib/lbp/article.rb', line 18

def article_type_shortId
	self.article_type.split("/").last
end

#file_pathObject

initionalization handled by Resource Class



11
12
13
# File 'lib/lbp/article.rb', line 11

def file_path
	file_path = self.results.dup.filter(:p => RDF::URI("http://scta.info/property/hasXML")).first[:o].to_s
end