Sha256: 206b959c0da4bbc4c57030d0ae711e07a30f469d67c713e0696bd12be5ca401d
Contents?: true
Size: 857 Bytes
Versions: 20
Compression:
Stored size: 857 Bytes
Contents
module Krikri ## # Implements SPARQL queries for finding RDF Resources by their PROV-O history. module ProvenanceQueryClient SPARQL_CLIENT = Repository.query_client module_function ## # Finds all entities generated or revised by the activity whose URI is # given. # # @param activity_uri [#to_uri] the URI of the activity to search # # @return [RDF::SPARQL::Query] a query object that, when executed, will # give solutions containing the URIs for the resources in `#record`. def find_by_activity(activity_uri) raise ArgumentError, 'activity_uri must be an RDF::URI' unless activity_uri.respond_to? :to_uri SPARQL_CLIENT.select(:record) .where([:record, [RDF::PROV.wasGeneratedBy, '|', RDF::DPLA.wasRevisedBy], activity_uri]) end end end
Version data entries
20 entries across 20 versions & 1 rubygems