diff options
Diffstat (limited to 'lib/environment.rb')
-rw-r--r-- | lib/environment.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/environment.rb b/lib/environment.rb index b16b62f..d66b062 100644 --- a/lib/environment.rb +++ b/lib/environment.rb @@ -61,3 +61,32 @@ FALSE_REGEXP = /^(false|inactive|0|0.0)$/i # Task durations DEFAULT_TASK_MAX_DURATION = 36000 EXTERNAL_TASK_MAX_DURATION = 36000 + +# OWL Namespaces +class OwlNamespace + + 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#' + |