Class: CPEE::Transformation::Source::PTML
- Inherits:
-
Object
- Object
- CPEE::Transformation::Source::PTML
- Defined in:
- lib/cpee/transformation/ptml.rb
Instance Attribute Summary collapse
-
#dataelements ⇒ Object
readonly
Returns the value of attribute dataelements.
-
#endpoints ⇒ Object
readonly
Returns the value of attribute endpoints.
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#traces ⇒ Object
readonly
Returns the value of attribute traces.
-
#tree ⇒ Object
readonly
Returns the value of attribute tree.
Instance Method Summary collapse
-
#extract_nodelink(doc) ⇒ Object
}}}.
-
#initialize(xml) ⇒ PTML
constructor
{{{.
Constructor Details
#initialize(xml) ⇒ PTML
{{{
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/cpee/transformation/ptml.rb', line 31 def initialize(xml) #{{{ Node.class_variable_set(:@@niceid, {}) @tree = Tree.new @start = nil doc = XML::Smart.string(xml) @graph = Graph.new extract_nodelink(doc) if @start.nil? @traces = Traces.new [[]] else @traces = Traces.new [[@start]] end end |
Instance Attribute Details
#dataelements ⇒ Object (readonly)
Returns the value of attribute dataelements.
29 30 31 |
# File 'lib/cpee/transformation/ptml.rb', line 29 def dataelements @dataelements end |
#endpoints ⇒ Object (readonly)
Returns the value of attribute endpoints.
29 30 31 |
# File 'lib/cpee/transformation/ptml.rb', line 29 def endpoints @endpoints end |
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
29 30 31 |
# File 'lib/cpee/transformation/ptml.rb', line 29 def graph @graph end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
29 30 31 |
# File 'lib/cpee/transformation/ptml.rb', line 29 def start @start end |
#traces ⇒ Object (readonly)
Returns the value of attribute traces.
29 30 31 |
# File 'lib/cpee/transformation/ptml.rb', line 29 def traces @traces end |
#tree ⇒ Object (readonly)
Returns the value of attribute tree.
29 30 31 |
# File 'lib/cpee/transformation/ptml.rb', line 29 def tree @tree end |
Instance Method Details
#extract_nodelink(doc) ⇒ Object
}}}
124 125 126 127 128 129 130 131 |
# File 'lib/cpee/transformation/ptml.rb', line 124 def extract_nodelink(doc) #{{{ #extract nodes sid = doc.find("//processTree/@root").first.value @last = 0 iterate_ptml(sid,doc) pp @last pp @graph end |