diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-01-11 21:00:20 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-01-11 21:00:20 +0100 |
commit | e84a1b439e63ae3ed3b4bc3bc78261f95daf9ab7 (patch) | |
tree | f8b7e156e91802d74ce0c78c1cdf0813b71df00b /lib/parser.rb | |
parent | 442aa6f6647756d10d57cd7869cb3d27c87b24a8 (diff) |
basic rest post get delete test working
Diffstat (limited to 'lib/parser.rb')
-rw-r--r-- | lib/parser.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/parser.rb b/lib/parser.rb index 580f6f7..7475d6d 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -1,6 +1,35 @@ #require 'spreadsheet' #require 'roo' +# OWL Namespaces +class OwlNamespace + + attr_accessor :uri + def initialize(uri) + @uri = uri + end + + def [](property) + @uri+property.to_s + end + + def type # for RDF.type + "#{@uri}type" + end + + def method_missing(property) + @uri+property.to_s + end + +end + +RDF = OwlNamespace.new 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' +OWL = OwlNamespace.new 'http://www.w3.org/2002/07/owl#' +DC = OwlNamespace.new 'http://purl.org/dc/elements/1.1/' +OT = OwlNamespace.new 'http://www.opentox.org/api/1.1#' +OTA = OwlNamespace.new 'http://www.opentox.org/algorithmTypes.owl#' +XSD = OwlNamespace.new 'http://www.w3.org/2001/XMLSchema#' + class String # Split RDF statement into triples |