module RDF::NTriples

## 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

@example Requiring the ‘RDF::NTriples` module explicitly

require 'rdf/ntriples'

@see www.w3.org/TR/n-triples/ @see en.wikipedia.org/wiki/N-Triples

@author [Arto Bendiken](ar.to/)

Public Class Methods

escape(string) click to toggle source

@param [String] string @return [String] @see RDF::NTriples::Writer.escape @since 0.2.2

# File lib/rdf/ntriples.rb, line 88
def self.escape(string)
  Writer.escape(string)
end
serialize(value) click to toggle source

Returns the serialized N-Triples representation of the given RDF value.

@param [RDF::Value] value @return [String] @see RDF::NTriples::Writer.serialize @since 0.1.5

# File lib/rdf/ntriples.rb, line 70
def self.serialize(value)
  Writer.for(:ntriples).serialize(value)
end
unescape(string) click to toggle source

@param [String] string @return [String] @see RDF::NTriples::Reader.unescape @since 0.2.2

# File lib/rdf/ntriples.rb, line 79
def self.unescape(string)
  Reader.unescape(string)
end
unserialize(data) click to toggle source

Reconstructs an RDF value from its serialized N-Triples representation.

@param [String] data @return [RDF::Value] @see RDF::NTriples::Reader.unserialize @since 0.1.5

# File lib/rdf/ntriples.rb, line 58
def self.unserialize(data)
  Reader.unserialize(data)
end