Module: BEL::Translator::Plugins::Turtle
- Defined in:
- lib/bel/translator/plugins/turtle.rb
Constant Summary collapse
- ID =
:turtle
- NAME =
'Turtle RDF Translator'
- DESCRIPTION =
'A translator that can read/write BEL nanopubs to RDF Turtle.'
- MEDIA_TYPES =
%i(application/turtle application/x-turtle)
- EXTENSIONS =
%i(ttl)
Class Method Summary collapse
- .create_translator(options = {}) ⇒ Object
- .description ⇒ Object
- .file_extensions ⇒ Object
- .id ⇒ Object
- .media_types ⇒ Object
- .name ⇒ Object
Class Method Details
.create_translator(options = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/bel/translator/plugins/turtle.rb', line 11 def self.create_translator( = {}) require 'rdf' require 'rdf/turtle' require_relative 'rdf2/translator' BEL::BELRDF::Translator.new(ID, [:write_schema]) end |
.description ⇒ Object
26 27 28 |
# File 'lib/bel/translator/plugins/turtle.rb', line 26 def self.description DESCRIPTION end |
.file_extensions ⇒ Object
34 35 36 |
# File 'lib/bel/translator/plugins/turtle.rb', line 34 def self.file_extensions EXTENSIONS end |
.id ⇒ Object
18 19 20 |
# File 'lib/bel/translator/plugins/turtle.rb', line 18 def self.id ID end |
.media_types ⇒ Object
30 31 32 |
# File 'lib/bel/translator/plugins/turtle.rb', line 30 def self.media_types MEDIA_TYPES end |
.name ⇒ Object
22 23 24 |
# File 'lib/bel/translator/plugins/turtle.rb', line 22 def self.name NAME end |