You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseJsonLdError::InvalidTypeMapping,"unknown mapping for '@type': #{type.inspect}"
419
+
raiseJsonLdError::InvalidTypeMapping,"unknown mapping for '@type': #{type.inspect} on term #{term.inspect}"
420
420
end
421
421
debug(""){"type_mapping: #{type.inspect}"}
422
422
definition.type_mapping=type
423
423
end
424
424
425
425
ifvalue.has_key?('@reverse')
426
-
raiseJsonLdError::InvalidReverseProperty,"unexpected key in #{value.inspect}"if
426
+
raiseJsonLdError::InvalidReverseProperty,"unexpected key in #{value.inspect} on term #{term.inspect}"if
427
427
value.keys.any?{|k| %w(@id).include?(k)}
428
-
raiseJsonLdError::InvalidIRIMapping,"expected value of @reverse to be a string: #{value['@reverse'].inspect}"unless
428
+
raiseJsonLdError::InvalidIRIMapping,"expected value of @reverse to be a string: #{value['@reverse'].inspect} on term #{term.inspect}"unless
429
429
value['@reverse'].is_a?(String)
430
430
431
431
# Otherwise, set the IRI mapping of definition to the result of using the IRI Expansion algorithm, passing active context, the value associated with the @reverse key for value, true for vocab, true for document relative, local context, and defined. If the result is not an absolute IRI, i.e., it contains no colon (:), an invalid IRI mapping error has been detected and processing is aborted.
# If value contains an @container member, set the container mapping of definition to its value; if its value is neither @set, nor @index, nor null, an invalid reverse property error has been detected (reverse properties only support set- and index-containers) and processing is aborted.
441
-
if(container=value['@container'])
441
+
if(container=value.fetch('@container',false))
442
442
raiseJsonLdError::InvalidReverseProperty,
443
-
"unknown mapping for '@container' to #{container.inspect}"unless
443
+
"unknown mapping for '@container' to #{container.inspect} on term #{term.inspect}"unless
444
444
['@set','@index',nil].include?(container)
445
445
definition.container_mapping=container
446
446
end
447
447
definition.reverse_property=true
448
448
elsifvalue.has_key?('@id') && value['@id'] != term
449
-
raiseJsonLdError::InvalidIRIMapping,"expected value of @id to be a string: #{value['@id'].inspect}"unless
449
+
raiseJsonLdError::InvalidIRIMapping,"expected value of @id to be a string: #{value['@id'].inspect} on term #{term.inspect}"unless
450
450
value['@id'].is_a?(String)
451
451
definition.id=expand_iri(value['@id'],
452
452
:vocab=>true,
453
453
:documentRelative=>true,
454
454
:local_context=>local_context,
455
455
:defined=>defined)
456
-
raiseJsonLdError::InvalidKeywordAlias,"expected value of @id to not be @context"if
456
+
raiseJsonLdError::InvalidKeywordAlias,"expected value of @id to not be @context on term #{term.inspect}"if
457
457
definition.id == '@context'
458
458
elsifterm.include?(':')
459
459
# If term is a compact IRI with a prefix that is a key in local context then a dependency has been found. Use this algorithm recursively passing active context, local context, the prefix as term, and defined.
# Otherwise, active context must have a vocabulary mapping, otherwise an invalid value has been detected, which is an error. Set the IRI mapping for definition to the result of concatenating the value associated with the vocabulary mapping and term.
473
-
raiseJsonLdError::InvalidIRIMapping,"relative term definition without vocab: #{term}"unlessvocab
473
+
raiseJsonLdError::InvalidIRIMapping,"relative term definition without vocab: #{term} on term #{term.inspect}"unlessvocab
raiseJsonLdError::InvalidContainerMapping,"unknown mapping for '@container' to #{container.inspect}"unless%w(@list@set@language@index).include?(container)
482
+
raiseJsonLdError::InvalidContainerMapping,"unknown mapping for '@container' to #{container.inspect} on term #{term.inspect}"unless%w(@list@set@language@index).include?(container)
raiseJsonLdError::InvalidLanguageMapping,"language must be null or a string, was #{language.inspect}}"unlesslanguage.nil? || (language || "").is_a?(String)
489
+
raiseJsonLdError::InvalidLanguageMapping,"language must be null or a string, was #{language.inspect}} on term #{term.inspect}"unlesslanguage.nil? || (language || "").is_a?(String)
0 commit comments