def register_reference(given_reference, factory, context)
      reference = Reference.new(given_reference)
      ReferenceResolver.new(
        reference, factory, context
      ).tap do |resolver|
        next if resolver.in_root_source?
        reference_register.register(resolver.reference_factory)
      end
    end
def register_reference(given_reference, factory, context)
      reference = Reference.new(given_reference)
      ReferenceResolver.new(
        reference, factory, context
      ).tap do |resolver|
        next if resolver.in_root_source?
        reference_register.register(resolver.reference_factory)
      end
    end
Used to register a reference with the underlying document and return a
 reference resolver to access the object referenced

 @param  [String]        given_reference   The reference as text
 @param  [NodeFactory]   factory           Factory class for the expected
                                           eventual resource
 @param  [Context]       context           The context of the object
                                           calling this reference
 @return [ReferenceResolver]