Class: OpenEHR::RM::Common::Archetyped::Locatable
- Includes:
- LocaterConstants
- Defined in:
- lib/open_ehr/rm/common/archetyped.rb
Direct Known Subclasses
Directory::Folder, DataStructures::DataStructure, DataStructures::ItemStructure::Representation::Item
Constant Summary
Constants included from LocaterConstants
OpenEHR::RM::Common::Archetyped::LocaterConstants::CONTENT_PATH_SEPARATOR, OpenEHR::RM::Common::Archetyped::LocaterConstants::CURRENT_TRANSACTION_ID, OpenEHR::RM::Common::Archetyped::LocaterConstants::FRAGMENT_SEPARATOR, OpenEHR::RM::Common::Archetyped::LocaterConstants::MULTIPART_ID_DELIMITER, OpenEHR::RM::Common::Archetyped::LocaterConstants::ORGANIZER_PATH_SEPARATOR
Instance Attribute Summary collapse
-
#archetype_details ⇒ Object
Returns the value of attribute archetype_details.
-
#archetype_node_id ⇒ Object
Returns the value of attribute archetype_node_id.
-
#feeder_audit ⇒ Object
Returns the value of attribute feeder_audit.
-
#links ⇒ Object
Returns the value of attribute links.
-
#name ⇒ Object
Returns the value of attribute name.
-
#uid ⇒ Object
Returns the value of attribute uid.
Attributes inherited from Pathable
Instance Method Summary collapse
- #concept ⇒ Object
-
#initialize(args = { }) ⇒ Locatable
constructor
A new instance of Locatable.
- #is_archetype_root? ⇒ Boolean
Methods inherited from Pathable
#item_at_path, #items_at_path, #path_exists?, #path_of_item, #path_unique?
Constructor Details
#initialize(args = { }) ⇒ Locatable
Returns a new instance of Locatable.
49 50 51 52 53 54 55 56 57 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 49 def initialize(args = { }) super(args) self.archetype_node_id = args[:archetype_node_id] self.name = args[:name] self.links = args[:links] self.uid = args[:uid] self.archetype_details = args[:archetype_details] self.feeder_audit = args[:feeder_audit] end |
Instance Attribute Details
#archetype_details ⇒ Object
Returns the value of attribute archetype_details.
47 48 49 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 47 def archetype_details @archetype_details end |
#archetype_node_id ⇒ Object
Returns the value of attribute archetype_node_id.
46 47 48 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 46 def archetype_node_id @archetype_node_id end |
#feeder_audit ⇒ Object
Returns the value of attribute feeder_audit.
47 48 49 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 47 def feeder_audit @feeder_audit end |
#links ⇒ Object
Returns the value of attribute links.
46 47 48 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 46 def links @links end |
#name ⇒ Object
Returns the value of attribute name.
46 47 48 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 46 def name @name end |
#uid ⇒ Object
Returns the value of attribute uid.
47 48 49 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 47 def uid @uid end |
Instance Method Details
#concept ⇒ Object
80 81 82 83 84 85 86 87 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 80 def concept if self.is_archetype_root? return DvText.new(:value => @archetype_details.archetype_id.concept_name) else raise ArgumentError, 'this is not root' end end |
#is_archetype_root? ⇒ Boolean
89 90 91 |
# File 'lib/open_ehr/rm/common/archetyped.rb', line 89 def is_archetype_root? !archetype_details.nil? end |