Class: Wings::ActiveFedoraConverter::NestedResource

Inherits:
ActiveTriples::Resource
  • Object
show all
Includes:
Hyrax::BasicMetadata
Defined in:
lib/wings/active_fedora_converter/nested_resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri = RDF::Node.new, _parent = ActiveTriples::Resource.new) ⇒ NestedResource

Returns a new instance of NestedResource.


13
14
15
16
17
18
19
20
# File 'lib/wings/active_fedora_converter/nested_resource.rb', line 13

def initialize(uri = RDF::Node.new, _parent = ActiveTriples::Resource.new)
  uri = if uri.try(:node?)
          RDF::URI("#nested_resource_#{uri.to_s.gsub('_:', '')}")
        elsif uri.to_s.include?('#')
          RDF::URI(uri)
        end
  super
end