Class: Wings::Valkyrie::MetadataAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/wings/valkyrie/metadata_adapter.rb

Instance Method Summary collapse

Instance Method Details

#idValkyrie::ID

Returns Identifier for this metadata adapter.

Returns:

  • (Valkyrie::ID)

    Identifier for this metadata adapter.


16
17
18
19
20
21
# File 'lib/wings/valkyrie/metadata_adapter.rb', line 16

def id
  @id ||= begin
    to_hash = "active_fedora"
    ::Valkyrie::ID.new(Digest::MD5.hexdigest(to_hash))
  end
end

#persisterObject


6
7
8
# File 'lib/wings/valkyrie/metadata_adapter.rb', line 6

def persister
  @persister ||= Wings::Valkyrie::Persister.new(adapter: self)
end

#query_serviceClass

Returns Valkyrie::Persistence::Postgres::QueryService.

Returns:

  • (Class)

    Valkyrie::Persistence::Postgres::QueryService


11
12
13
# File 'lib/wings/valkyrie/metadata_adapter.rb', line 11

def query_service
  @query_service ||= Wings::Valkyrie::QueryService.new(adapter: self)
end

#resource_factoryClass

Returns Valkyrie::Persistence::Postgres::ResourceFactory.

Returns:

  • (Class)

    Valkyrie::Persistence::Postgres::ResourceFactory


24
25
26
# File 'lib/wings/valkyrie/metadata_adapter.rb', line 24

def resource_factory
  @resource_factory ||= Wings::Valkyrie::ResourceFactory.new(adapter: self)
end