Class: RDF::Raptor::RDFXML::Format

Inherits:
Format
  • Object
show all
Extended by:
Format
Defined in:
lib/rdf/raptor/rdfxml.rb

Overview

RDF/XML format specification.

Examples:

Obtaining an RDF/XML format class

RDF::Format.for(:rdfxml)       #=> RDF::Raptor::RDFXML::Format
RDF::Format.for("input.rdf")
RDF::Format.for(file_name:      "input.rdf")
RDF::Format.for(file_extension: "rdf")
RDF::Format.for(content_type:   "application/rdf+xml")

Class Method Summary collapse

Methods included from Format

detect, rapper_format

Class Method Details

.detect(sample) ⇒ Object



44
45
46
47
# File 'lib/rdf/raptor/rdfxml.rb', line 44

def self.detect(sample)
  # Raptor guess is not fully supported
  sample.match(/<(\w+:)?(RDF)/)
end

.symbolsObject



49
50
51
# File 'lib/rdf/raptor/rdfxml.rb', line 49

def self.symbols
  [:rdfxml, :rdf]
end