Class: RDF::RDFXML::Format
- Inherits:
-
Format
- Object
- Format
- RDF::RDFXML::Format
- Defined in:
- 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
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.
38 39 40 |
# File 'lib/rdf/rdfxml/format.rb', line 38 def self.detect(sample) sample.match(/<(\w+:)?(RDF)/) end |
.name ⇒ Object
Override name of format
43 44 45 |
# File 'lib/rdf/rdfxml/format.rb', line 43 def self.name "RDF/XML" end |
.symbols ⇒ Object
47 48 49 |
# File 'lib/rdf/rdfxml/format.rb', line 47 def self.symbols [:rdfxml, :rdf, :owl] end |