Sha256: 58f4cbe6b5ebd7741ef95e9f04c8335ab45418d7e4d0c67f678d3e1313bdb537

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

module RDF::N3
  ##
  # RDFa format specification.
  #
  # @example Obtaining an Notation3 format class
  #     RDF::Format.for(:n3)            #=> RDF::N3::Format
  #     RDF::Format.for("etc/foaf.n3")
  #     RDF::Format.for(file_name:      "etc/foaf.n3")
  #     RDF::Format.for(file_extension: "n3")
  #     RDF::Format.for(content_type:   "text/n3")
  #
  # @example Obtaining serialization format MIME types
  #     RDF::Format.content_types      #=> {"text/n3")" => [RDF::N3::Format]}
  #
  # @example Obtaining serialization format file extension mappings
  #     RDF::Format.file_extensions    #=> {n3: "text/n3"}
  #
  # @see http://www.w3.org/TR/rdf-testcases/#ntriples
  class Format < RDF::Format
    content_type     'text/n3',             extension: :n3, aliases: %w(text/rdf+n3 application/rdf+n3)
    content_encoding 'utf-8'

    reader { RDF::N3::Reader }
    writer { RDF::N3::Writer }

    # Symbols which may be used to lookup this format
    def self.symbols
      [:n3, :notation3]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rdf-n3-2.0.0 lib/rdf/n3/format.rb
rdf-n3-2.0.0.beta1 lib/rdf/n3/format.rb