Ruby RDF package with contextual graphs, memory and persistent datastores and compliant RDF/XML, RDFa and N3 parsers. (Deprecated, please see RDF.rb https://github.org/gkellogg/rdf and my other related gems)
24
stars
5
forks
source link
Can't print a Triple pattern, e.g. when debugging #2
A Triple with one or more nulls is a Triple pattern. I found that I couldn't print a pattern, e.g. using puts during debugging, because inspect calls to_n3 which checks for any nil values in s, p or o. The error I get is:
RdfContext::RdfException: Can't serialize pattern triple
'RdfContext::URIRef[<http://example.org/foo>, ns=nil],
RdfContext::URIRef[<http://example.org/p>, ns=nil], nil'
from /var/lib/gems/1.9.1/gems/rdf_context-0.5.5/lib/rdf_context/triple.rb:41:in `to_n3'
from /var/lib/gems/1.9.1/gems/rdf_context-0.5.5/lib/rdf_context/triple.rb:49:in `inspect'
A Triple with one or more nulls is a Triple pattern. I found that I couldn't print a pattern, e.g. using puts during debugging, because inspect calls to_n3 which checks for any nil values in s, p or o. The error I get is:
Ian