Class: LD4L::WorksRDF::PopulateRepositoryFromGraph
- Inherits:
-
Object
- Object
- LD4L::WorksRDF::PopulateRepositoryFromGraph
- Defined in:
- lib/ld4l/works_rdf/services/repository_services/populate_repository_from_graph.rb
Class Method Summary collapse
-
.call(graph) ⇒ Object
Create an RDF::Repository populated from an RDF::Graph.
Class Method Details
.call(graph) ⇒ Object
Create an RDF::Repository populated from an RDF::Graph.
11 12 13 14 15 16 17 18 19 |
# File 'lib/ld4l/works_rdf/services/repository_services/populate_repository_from_graph.rb', line 11 def self.call( graph ) raise ArgumentError, 'graph argument must an instance of RDF::Graph' unless graph.kind_of?(RDF::Graph) repo_name = SecureRandom.uuid.to_sym # r = RDF::Repository.new r = ActiveTriples::Repositories.add_repository repo_name, RDF::Repository.new r << graph end |