Method: RdfContext::RecursiveSerializer#get_qname
- Defined in:
- lib/rdf_context/serializer/recursive_serializer.rb
#get_qname(uri) ⇒ Object (protected)
Return a QName for the URI, or nil. Adds namespace of QName to defined namespaces
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/rdf_context/serializer/recursive_serializer.rb', line 67 def get_qname(uri) if uri.is_a?(URIRef) qn = @graph.qname(uri) # Local parts with . will mess up serialization return false if qn.nil? || qn.index('.') add_namespace(uri.namespace) qn end end |