Module: RDF::NTriples
- Included in:
- NQuads
- Defined in:
- vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples/format.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples/reader.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples/writer.rb
Overview
Quoted Triples (Deprecated)
Supports statements as resources using <<s p o>>
.
Installation
This is the only RDF serialization format that is directly supported by RDF.rb. Support for other formats is available in the form of add-on gems, e.g. 'rdf-xml' or 'rdf-json'.
Documentation
Defined Under Namespace
Classes: Format, Reader, Writer
Class Method Summary collapse
- .escape(string) ⇒ String
-
.serialize(value) ⇒ String
Returns the serialized N-Triples representation of the given RDF value.
- .unescape(string) ⇒ String
-
.unserialize(data) ⇒ RDF::Value
Reconstructs an RDF value from its serialized N-Triples representation.
Class Method Details
.escape(string) ⇒ String
88 89 90 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples.rb', line 88 def self.escape(string) Writer.escape(string) end |
.serialize(value) ⇒ String
Returns the serialized N-Triples representation of the given RDF value.
70 71 72 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples.rb', line 70 def self.serialize(value) Writer.for(:ntriples).serialize(value) end |
.unescape(string) ⇒ String
79 80 81 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples.rb', line 79 def self.unescape(string) Reader.unescape(string) end |
.unserialize(data) ⇒ RDF::Value
Reconstructs an RDF value from its serialized N-Triples representation.
58 59 60 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-884e3ef78084/lib/rdf/ntriples.rb', line 58 def self.unserialize(data) Reader.unserialize(data) end |