Class: OpenEHR::RM::DataStructures::ItemStructure::ItemTree
- Inherits:
-
ItemStructure
- Object
- Common::Archetyped::Pathable
- Common::Archetyped::Locatable
- DataStructure
- ItemStructure
- OpenEHR::RM::DataStructures::ItemStructure::ItemTree
- Defined in:
- lib/openehr/rm/data_structures/item_structure.rb
Constant Summary
Constants included from Common::Archetyped::LocaterConstants
Common::Archetyped::LocaterConstants::CONTENT_PATH_SEPARATOR, Common::Archetyped::LocaterConstants::CURRENT_TRANSACTION_ID, Common::Archetyped::LocaterConstants::FRAGMENT_SEPARATOR, Common::Archetyped::LocaterConstants::MULTIPART_ID_DELIMITER, Common::Archetyped::LocaterConstants::ORGANIZER_PATH_SEPARATOR
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Attributes inherited from Common::Archetyped::Locatable
#archetype_details, #archetype_node_id, #feeder_audit, #links, #name, #uid
Attributes inherited from Common::Archetyped::Pathable
Instance Method Summary collapse
- #as_hierarchy ⇒ Object
- #element_at_path(path) ⇒ Object
- #has_element_path?(path) ⇒ Boolean
-
#initialize(args = { }) ⇒ ItemTree
constructor
A new instance of ItemTree.
Methods inherited from Common::Archetyped::Locatable
Methods inherited from Common::Archetyped::Pathable
#item_at_path, #items_at_path, normalize_path, path_attribute, path_attributes, #path_children, #path_exists?, #path_of_item, #path_unique?, select_by_predicate
Constructor Details
#initialize(args = { }) ⇒ ItemTree
Returns a new instance of ItemTree.
195 196 197 198 |
# File 'lib/openehr/rm/data_structures/item_structure.rb', line 195 def initialize(args ={ }) super(args) self.items = args[:items] end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
192 193 194 |
# File 'lib/openehr/rm/data_structures/item_structure.rb', line 192 def items @items end |
Instance Method Details
#as_hierarchy ⇒ Object
208 209 210 211 212 |
# File 'lib/openehr/rm/data_structures/item_structure.rb', line 208 def as_hierarchy return Cluster.new(:name => @name, :archetype_node_id => @archetype_node_id, :items => @items) end |
#element_at_path(path) ⇒ Object
204 205 206 |
# File 'lib/openehr/rm/data_structures/item_structure.rb', line 204 def element_at_path(path) item_at_path(normalize_element_path(path)) end |
#has_element_path?(path) ⇒ Boolean
200 201 202 |
# File 'lib/openehr/rm/data_structures/item_structure.rb', line 200 def has_element_path?(path) path_exists?(normalize_element_path(path)) end |