Class: RDF::RDFXML::Format
- Defined in:
- vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/format.rb
Overview
RDFXML format specification.
Class Method Summary collapse
-
.detect(sample) ⇒ Boolean
Sample detection to see if it matches RDF/XML (not Microdata or RDFa).
-
.name ⇒ Object
Override name of format.
- .symbols ⇒ Object
Methods inherited from Format
accept_type, accept_types, cli_commands, content_encoding, content_type, content_types, each, file_extension, file_extensions, for, reader, reader_symbols, reader_types, require, to_sym, uri, uris, writer, writer_symbols, writer_types
Class Method Details
.detect(sample) ⇒ Boolean
Sample detection to see if it matches RDF/XML (not Microdata or RDFa)
Use a text sample to detect the format of an input file. Sub-classes implement a matcher sufficient to detect probably format matches, including disambiguating between other similar formats.
40 41 42 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/format.rb', line 40 def self.detect(sample) sample.match(/<(\w+:)?(RDF)/) end |
.name ⇒ Object
Override name of format
45 46 47 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/format.rb', line 45 def self.name "RDF/XML" end |
.symbols ⇒ Object
49 50 51 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-rdfxml-6b89d4c13d63/lib/rdf/rdfxml/format.rb', line 49 def self.symbols [:rdfxml, :rdf, :owl] end |