Index: ruby/trunk/lib/models/rm/common/change_control.rb
===================================================================
--- ruby/trunk/lib/models/rm/common/change_control.rb	(revision 119)
+++ ruby/trunk/lib/models/rm/common/change_control.rb	(revision 158)
@@ -9,4 +9,5 @@
         class Contribution
           attr_reader :uid, :versions, :audit
+
           def initialize(uid, versions, audit)
             self.uid = uid
@@ -14,4 +15,5 @@
             self.audit = audit
           end
+
           def uid=(uid)
             if uid.nil?
@@ -20,4 +22,5 @@
             @uid = uid
           end
+
           def versions=(versions)
             unless versions.nil?
@@ -28,4 +31,5 @@
             @versions = versions
           end
+
           def audit=(audit)
             if audit.nil?
@@ -43,31 +47,61 @@
 
         class Version
-          attr_reader :uid, :contribution, :commit_audit, :signature
-          attr_reader :attestations, :data
-          def initialize(uid, contribution, commit_audit, signature=nil, attestations=nil, data=nil)
-            self.uid = uid
-            self.contribution = contribution          
-            self.commit_audit = commit_audit
-          end
-          def canonical_form
-            raise NotImplementedError, 'canonical form not implemented'
+          attr_reader :uid, :preceding_version_uid, :lifecycle_state,
+                      :commit_audit, :contribution
+          attr_accessor :data, :signature
+
+          def initialize(args = { })
+            self.uid = args[:uid]
+            self.preceding_version_uid = args[:preceding_version_uid]
+            self.data = args[:data]
+            self.lifcycle_state = args[:lifecycle_state]
+            self.commit_audit = args[:commit_audit]
+            self.contribution = args[:contribution]
+            self.signature = args[:signature]
           end
 
           def uid=(uid)
             raise ArgumentError, "uid should not be nil" if uid.nil?
+            @uid = uid
+          end
+
+          def preceding_version_uid=(preceding_version_uid)
+            if (!preceding_version_uid.nil?) ==  @uid.version_tree_id.is_first?
+              raise ArgumentError, 'preceding version is invalid'
+            end
+            @preceding_version_uid = preceding_version_uid
+          end
+
+          def lifcycle_state=(lifecycle_state)
+            if lifecycle_state.nil? ||
+                !%w[532 553 523].include?(
+                              lifecycle_state.defining_code.code_string)
+              raise ArgumentError, 'invalid lifecycle_state'
+            end
+            @lifecycle_state = lifecycle_state
+          end
+
+          def commit_audit=(commit_audit)
+            if commit_audit.nil?
+              raise ArgumentError,'commit_audit is mandatory'
+            end
+            @commit_audit = commit_audit
           end
 
           def contribution=(contribution)
-            raise ArgumentError, "contribution should not be nil" if contribution.nil? or contribution.type == ''
+            raise ArgumentError, "contribution should not be nil" if contribution.nil? or contribution.type.empty?
             @contribution = contribution
           end
 
-          def commit_audit=(commit_audit)
-            raise ArgumentError, "commit_audit should not be nil" if commit_audit.nil?
-            @commit_audit = commit_audit
+          def owner_id
+            return Hier_Object_ID.new(@uid.object_id.value)
           end
 
           def is_branch?
-            raise NotImplementedError, 'is_branch not implemented'
+            return @uid.is_branch?
+          end
+
+          def canonical_form
+            raise NotImplementedError, 'canonical form not implemented'
           end
         end
@@ -77,6 +111,30 @@
 
         class Original_Version < Version
+          attr_reader :attestations
+
+          def initialize(args = { })
+            super(args)
+            self.attestations = args[:attestations]
+            self.other_input_version_uids = args[:other_input_version_uids]
+          end
+
+          def attestations=(attestations)
+            if attestations.nil? || attestations.empty?
+              raise ArgumentError, 'attestations is mandatory'
+            end
+            @attestations = attestations
+          end
+
+          def other_input_version_uids=(other_input_version_uids)
+            if !other_input_version_uids.nil? && other_input_version_uids.empty?
+              raise ArgumentError, 'invaild other_input_version_uids'
+            end
+            @other_input_version_uids = other_input_version_uids
+          end
+
+          def is_merged?
+
+          end
         end
-
       end # of Change_Control
     end # of Common
