Class: FourStore::Namespace
- Inherits:
-
Object
- Object
- FourStore::Namespace
- Defined in:
- lib/four_store/namespace.rb
Class Method Summary collapse
Class Method Details
.add(short, long) ⇒ Object
23 24 25 |
# File 'lib/four_store/namespace.rb', line 23 def self.add(short, long) @namespaces[short] = long end |
.get(short) ⇒ Object
27 28 29 |
# File 'lib/four_store/namespace.rb', line 27 def self.get(short) @namespaces[short] end |
.to_sparql ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/four_store/namespace.rb', line 31 def self.to_sparql() sparql = "" @namespaces.keys.each do |short| sparql += "PREFIX #{short}: <#{@namespaces[short]}>\n" end sparql end |
.to_turtle ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/four_store/namespace.rb', line 39 def self.to_turtle() turtle = "" @namespaces.keys.each do |short| turtle += "@prefix #{short}: <#{@namespaces[short]}>.\n" end turtle end |