Class: Hyrax::ListSourceExporter

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/list_source_exporter.rb

Overview

Retrieves the graph for an object with the internal triples removed and the uris translated to external uris.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, request, parent_url) ⇒ ListSourceExporter

Returns a new instance of ListSourceExporter.

Parameters:

  • id (String)
  • request (ActionDispatch::Request)

    the http request context

  • parent_url (String)


8
9
10
11
12
# File 'app/services/hyrax/list_source_exporter.rb', line 8

def initialize(id, request, parent_url)
  @id = id
  @request = request
  @parent_url = parent_url
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



14
15
16
# File 'app/services/hyrax/list_source_exporter.rb', line 14

def id
  @id
end

#parent_urlObject (readonly)

Returns the value of attribute parent_url.



14
15
16
# File 'app/services/hyrax/list_source_exporter.rb', line 14

def parent_url
  @parent_url
end

#requestObject (readonly)

Returns the value of attribute request.



14
15
16
# File 'app/services/hyrax/list_source_exporter.rb', line 14

def request
  @request
end

Instance Method Details

#fetchRDF::Graph

Returns:

  • (RDF::Graph)


17
18
19
# File 'app/services/hyrax/list_source_exporter.rb', line 17

def fetch
  clean_graph_repository.find(id)
end