Module: RTM

Defined in:
rtm/lib/rtm/psi.rb,
rtm/lib/rtm.rb,
rtm/lib/rtm/axes.rb,
rtm/lib/rtm/engine.rb,
rtm/lib/rtm/version.rb,
rtm/lib/rtm/topology.rb,
rtm/lib/rtm/extensions.rb,
rtm/lib/rtm/validation.rb,
rtm/lib/rtm/navigation.rb,
rtm/lib/rtm/connection.rb,
rtm/spec/rtm/tmapi_spec.rb,
rtm/lib/rtm/helpers/uri.rb,
rtm/spec/rtm/engine_spec.rb,
rtm/spec/rtm/javatmapi_spec.rb,
rtm/lib/rtm/helpers/locator.rb,
rtm/lib/rtm/io/from_xtm2_libxml.rb,
rtm-javatmapi/lib/rtm/javatmapi.rb,
rtm/lib/rtm/navigation/topic/items.rb,
rtm/lib/rtm/navigation/topic/types.rb,
rtm/lib/rtm/navigation/name/atomify.rb,
rtm/lib/rtm/navigation/topic/players.rb,
rtm/lib/rtm/navigation/topic/locators.rb,
rtm/lib/rtm/navigation/topic/traverse.rb,
rtm/lib/rtm/navigation/topic/indicators.rb,
rtm/lib/rtm/navigation/topic/supertypes.rb,
rtm/lib/rtm/navigation/occurrence/atomify.rb,
rtm/lib/rtm/navigation/association/players.rb,
rtm/lib/rtm/navigation/name/characteristics.rb,
rtm/lib/rtm/navigation/topic/characteristics.rb,
rtm/lib/rtm/navigation/occurrence/characteristics.rb

Overview

Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. License: Apache License, Version 2.0

Defined Under Namespace

Modules: Association, Axes, AxesExtension, Connections, Construct, DatatypeAware, Extendable, IO, ItemIdentifier, Locator, LocatorHelpers, Name, Navigation, Occurrence, Reifiable, Role, Scoped, SubjectIdentifier, SubjectLocator, Sugar, Topic, TopicMap, TopicMapSystem, Typed, VERSION, Validation, Variant, XML Classes: Engine, JavaTMAPI, TMAPI, Topology

Constant Summary

PSI =
{}
PSI1 =
{}
PREFIX =
{}

Class Method Summary

Instance Method Summary

Class Method Details

+ (Object) from_xtm2lx(*args)



5
6
7
# File 'rtm/lib/rtm/io/from_xtm2_libxml.rb', line 5

def self.from_xtm2lx(*args)
  RTM::IO::FROMXTM2LX.from_xtm2(*args)
end

+ (Object) register_extension(module_with_modules)

Register a module as extension to RTM.

Example: module MyExtension

  module Topic
    def my_new_function_for_all_topics
       # ...
     end
  end
  RTM.register_extension(self)

end



17
18
19
20
21
22
# File 'rtm/lib/rtm/extensions.rb', line 17

def self.register_extension(module_with_modules)
  # puts "[RTMEXT] registering extension #{module_with_modules}"
  module_with_modules.constants.each do |sub_module|
    self.const_get(sub_module).register_extension(module_with_modules.const_get(sub_module)) if self.const_defined?(sub_module)
  end
end

Instance Method Details

- (Boolean) is_uri?(test)

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
# File 'rtm/lib/rtm/helpers/uri.rb', line 5

def is_uri?(test)
 begin
  URI(test)
  rescue Exception => e
 end

 e ? false : true
end