Class: RTM::TMQL::TMQL4JEngine
Instance Attribute Summary collapse
-
#topic_maps ⇒ Object
Returns the value of attribute topic_maps.
Instance Method Summary collapse
- #enable_materialize_meta_model(materialize) ⇒ Object
- #enable_updates(enabled) ⇒ Object
- #execute(query) ⇒ Object
-
#initialize(params) ⇒ TMQL4JEngine
constructor
A new instance of TMQL4JEngine.
- #properties ⇒ Object
- #runtime ⇒ Object
- #set_topic_map ⇒ Object
Methods inherited from Engine
Constructor Details
#initialize(params) ⇒ TMQL4JEngine
Returns a new instance of TMQL4JEngine.
6 7 8 9 10 11 12 |
# File 'lib/rtm/tmql/tmql4j.rb', line 6 def initialize(params) super @topic_maps = [] set_topic_map @new_tms = @topic_maps.first.engine.tmsf.newTopicMapSystem end |
Instance Attribute Details
#topic_maps ⇒ Object
Returns the value of attribute topic_maps.
4 5 6 |
# File 'lib/rtm/tmql/tmql4j.rb', line 4 def topic_maps @topic_maps end |
Instance Method Details
#enable_materialize_meta_model(materialize) ⇒ Object
30 31 32 |
# File 'lib/rtm/tmql/tmql4j.rb', line 30 def (materialize) properties.enableMaterializeMetaModel(materialize) end |
#enable_updates(enabled) ⇒ Object
34 35 36 |
# File 'lib/rtm/tmql/tmql4j.rb', line 34 def enable_updates(enabled) properties.enableLanguageExtensionTmqlUl(enabled) end |
#execute(query) ⇒ Object
38 39 40 41 |
# File 'lib/rtm/tmql/tmql4j.rb', line 38 def execute(query) q = runtime.run(query) q.results end |
#properties ⇒ Object
26 27 28 |
# File 'lib/rtm/tmql/tmql4j.rb', line 26 def properties runtime.properties end |
#runtime ⇒ Object
22 23 24 |
# File 'lib/rtm/tmql/tmql4j.rb', line 22 def runtime @runtime ||= Java::DeTopicmapslabTmql4jCommonCoreProcess::TMQLRuntimeFactory.newFactory.newRuntime(@new_tms, @topic_maps) end |
#set_topic_map ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rtm/tmql/tmql4j.rb', line 14 def set_topic_map if construct = @params[:construct] @topic_maps << construct.topic_map || construct # because tm.topic_map is nil elsif topic_map = @params[:topic_map] @topic_maps << topic_map end end |