- Timestamp:
- Aug 6, 2009, 1:20:05 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5.0/lib/open_ehr/rm/support/identification.rb
r158 r167 2 2 # http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109331021343_528780_2066Report.html 3 3 # Ticket refs #39 4 module OpenE HR4 module OpenEhr 5 5 module RM 6 6 module Support 7 7 module Identification 8 9 class Object_ID 8 class ObjectId 10 9 attr_reader :value 11 10 … … 23 22 end # of ObjectID 24 23 25 class Object _Ref24 class ObjectRef 26 25 attr_reader :namespace, :type, :id 27 26 … … 48 47 end 49 48 50 class Archetype _ID < Object_ID49 class ArchetypeId < ObjectId 51 50 attr_reader :domain_concept, :rm_name, :rm_entity, :rm_originator, :specialisation, :version_id 52 51 … … 91 90 end 92 91 93 class Terminology _ID < Object_ID92 class TerminologyId < ObjectId 94 93 attr_reader :name, :version_id 95 94 … … 130 129 end # of Terminology_ID 131 130 132 class Generic _ID < Object_ID131 class GenericId < ObjectId 133 132 attr_reader :scheme 134 133 … … 144 143 end # of Generic_ID 145 144 146 class Template _ID < Object_ID147 148 end 149 150 class U ID_Based_ID < Object_ID145 class TemplateId < ObjectId 146 147 end 148 149 class UidBasedId < ObjectId 151 150 def initialize(value) 152 151 super(value) … … 174 173 end 175 174 176 class Object _Version_ID < UID_Based_ID175 class ObjectVersionId < UidBasedId 177 176 attr_reader :object_id, :creating_system_id, :version_tree_id 178 177 … … 184 183 super(value) 185 184 if /^(\w+)::(\w+)::((\d|\.)+)$/ =~ value 186 self.object_id = U ID.new($1)187 self.creating_system_id = U ID.new($2)188 self.version_tree_id = Version _Tree_ID.new($3)185 self.object_id = Uid.new($1) 186 self.creating_system_id = Uid.new($2) 187 self.version_tree_id = VersionTreeId.new($3) 189 188 else 190 189 raise ArgumentError, 'invalid format' … … 216 215 end 217 216 218 class Locatable _Ref < Object_Ref217 class LocatableRef < ObjectRef 219 218 attr_reader :namespace, :type, :id, :path 220 219 … … 234 233 end 235 234 236 class Party _Ref < Object_Ref235 class PartyRef < ObjectRef 237 236 238 237 def type=(type) … … 243 242 end 244 243 245 class Access _Group_Ref < Object_Ref244 class AccessGroupRef < ObjectRef 246 245 def type=(type) 247 246 raise ArgumentError, 'type invalid' unless type == 'ACCESS_GROUP' … … 250 249 end 251 250 252 class Hier _Object_ID < UID_Based_ID253 254 end 255 256 class Version _Tree_ID251 class HierObjectId < UidBasedId 252 253 end 254 255 class VersionTreeId 257 256 attr_reader :value, :trunk_version, :branch_number, :branch_version 258 257 … … 303 302 end 304 303 305 class U ID304 class Uid 306 305 attr_reader :value 307 306 … … 316 315 end 317 316 318 class U UID < UID319 320 end 321 322 class Internet _ID <UID317 class Uuid < Uid 318 319 end 320 321 class InternetId <Uid 323 322 324 323 end 325 324 326 class I SO_OID <UID325 class IsoOid <Uid 327 326 328 327 end
Note:
See TracChangeset
for help on using the changeset viewer.