Class: Marc2LinkedData::OclcWork

Inherits:
OclcResource show all
Defined in:
lib/marc2linkeddata/oclc_work.rb

Constant Summary collapse

PREFIX =

OCLC is inconsistent with use of ‘www’ in URIs PREFIX = ‘www.worldcat.org/entity/work/id/’

'http://worldcat.org/entity/work/id/'

Instance Attribute Summary

Attributes inherited from Resource

#iri

Instance Method Summary collapse

Methods inherited from OclcResource

#about, #book?, #contributor?, #contributors, #creator?, #creators, #editor?, #editors, #initialize, #isbns, #media_object?, #publishers, #rdf

Methods inherited from Resource

#get_rdf, #id, #initialize, #iri_types, #rdf, #rdf_find_object, #rdf_find_subject, #rdf_uri, #rdf_valid?, #resolve_external_auth, #same_as, #same_as_array

Constructor Details

This class inherits a constructor from Marc2LinkedData::OclcResource

Instance Method Details

#example_worksObject



11
12
13
14
# File 'lib/marc2linkeddata/oclc_work.rb', line 11

def example_works
  q = SPARQL.parse("SELECT * WHERE { <#{@iri}> <http://schema.org/workExample> ?o }")
  rdf.query(q).collect {|s| s[:o] }
end