Class: Datagraph::Command::Export

Inherits:
Datagraph::Command show all
Defined in:
lib/datagraph/command/export.rb

Overview

Exports data from a repository in N-Triples format.

Instance Method Summary (collapse)

Methods inherited from Datagraph::Command

#basename, #parse_repository_specs, #parse_resource_specs, #validate_repository_specs, #validate_resource_specs

Methods included from Datagraph::Client

rpc

Instance Method Details

- execute(*resource_specs)

This method returns an undefined value.

Parameters:

  • (Array<String>) resource_specs


9
10
11
12
13
14
15
16
17
# File 'lib/datagraph/command/export.rb', line 9

def execute(*resource_specs)
  repositories = validate_repository_specs(resource_specs)
  # FIXME
  RDF::NTriples::Writer.new($stdout) do |writer|
    repositories.each do |repository|
      repository.to_rdf.each { |statement| writer << statement }
    end
  end
end