Index: ruby/trunk/lib/models/am/archetype/archetype.rb
===================================================================
--- ruby/trunk/lib/models/am/archetype/archetype.rb	(revision 162)
+++ ruby/trunk/lib/models/am/archetype/archetype.rb	(revision 163)
@@ -10,5 +10,5 @@
       end
 
-      class ARCHETYPE < OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE
+      class ARCHETYPE < OpenEHR::RM::Common::Resource::Authored_Resource
         include ADL_Definition
         attr_accessor :archetype_id, :concept_code, :is_controlled, :original_language, :parent_archtype_id, :uid
Index: ruby/trunk/lib/models/rm/common/resource.rb
===================================================================
--- ruby/trunk/lib/models/rm/common/resource.rb	(revision 162)
+++ ruby/trunk/lib/models/rm/common/resource.rb	(revision 163)
@@ -4,22 +4,27 @@
     module Common
       module Resource
-        class AUTHORED_RESOURCE
-          attr_reader :is_controled,:revision_history, :translations
-          attr_accessor :description, :original_language
+        class Authored_Resource
+          attr_reader  :original_language, :translations
+          attr_accessor :description, :revision_history
 
           def initialize(args = { })
-            @original_language = args[:original_language] if args[:original_language]
-            @translations = args[:translations] if args[:translations]
-            @revision_history = args[:revision_history] ? args[:revision_history] : nil
+            self.original_language = args[:original_language]
+            self.translations = args[:translations]
+            self.revision_history = args[:revision_history]
+            self.description = args[:description]
+          end
 
-            unless @revision_history
-              @is_controled = false
-            else
-              @is_controled = true
+          def original_language=(original_language)
+            if original_language.nil?
+              raise ArgumentError, 'original language is mandatory'
             end
+            @original_language = original_language
+          end
 
-            @original_language = args[:original_language] if args[:original_language]
-            @translations = args[:translations] if args[:translations]
-            @description = args[:description] if args[:description]
+          def translations=(translations)
+            if !translations.nil? && translations.empty?
+              raise ArgumentError, 'translation is empty'
+            end
+            @translations = translations
           end
 
@@ -28,27 +33,121 @@
           end
 
-          def language_available
-            languages = Set.new
-            if @translations != nil
-              languages << @translations.keys
-            end
-            languages << @original_language.code_string
+          def languages_available
+            return Set.new(@translations.keys)
+          end
+
+          def is_controlled?
+            return !@revision_history.nil?
           end
         end
 
-        class TRANSLATION_DETAILS
-          attr_accessor :language, :author, :accreditation
-          attr_accessor :other_details, :terminology_service
+        class Translation_Details
+          attr_reader :language, :author
+          attr_accessor :accreditation, :other_details
 
-          def initialize(language, author, accreditation, other_details,
-                         terminology_service)
+          def initialize(args = {})
+            self.language = args[:language]
+            self.author = args[:author]
+            self.accreditation = args[:accreditation]
+            self.other_details = args[:other_details]
+          end
+
+          def language=(language)
+            raise ArgumentError, 'language is mandatory' if language.nil?
             @language = language
+          end
+
+          def author=(author)
+            raise ArgumentError, 'author is mandatory' if author.nil?
             @author = author
-            @accreditation = accreditation
-            @other_details = other_details
-            @terminology_service = terminology_service
           end
         end
-      end
+
+        class Resource_Description
+          attr_reader :original_author, :lifecycle_state, :details
+          attr_accessor :other_contributors, :resource_package_uri,
+                        :other_details, :parent_resource
+
+          def initialize(args = {})
+            self.original_author = args[:original_author]
+            self.lifecycle_state = args[:lifecycle_state]
+            self.details = args[:details]
+            self.other_contributors = args[:other_contributors]
+            self.resource_package_uri = args[:resource_package_uri]
+            self.other_details = args[:other_details]
+            self.parent_resource = args[:parent_resource]
+          end
+
+          def original_author=(original_author)
+            if original_author.nil? || original_author.empty?
+              raise ArgumentError, 'original_author is mandatory'
+            end
+            @original_author = original_author
+          end
+
+          def lifecycle_state=(lifecycle_state)
+            if lifecycle_state.nil? || lifecycle_state.empty?
+              raise ArgumentError, 'lifecycle_state is malformatted'
+            end
+            @lifecycle_state = lifecycle_state
+          end
+
+          def details=(details)
+            if details.nil? || details.empty?
+              raise ArgumentError, 'nil or empty details'
+            end
+            @details = details
+          end
+        end
+
+        class Resource_Description_Item
+          attr_reader :language, :purpose, :use, :misuse, :copyright
+          attr_accessor :keywords, :original_resource_uri, :other_details
+
+          def initialize(args = { })
+            self.language = args[:language]
+            self.purpose = args[:purpose]
+            self.keywords = args[:keywords]
+            self.use = args[:use]
+            self.misuse = args[:misuse]
+            self.copyright = args[:copyright]
+            self.original_resource_uri = args[:original_resource_uri]
+            self.other_details = args[:other_details]
+          end
+
+          def language=(language)
+            raise ArgumentError, 'language is mandatory' if language.nil?
+            @language = language
+          end
+
+          def purpose=(purpose)
+            if purpose.nil? || purpose.empty?
+              raise ArgumentError, 'purpose is mandatory'
+            end
+            @purpose = purpose
+          end
+
+          def use=(use)
+            if !use.nil? && use.empty?
+              raise ArgumentError, 'use is invalid'
+            end
+            @use = use
+          end
+
+          def misuse=(misuse)
+            if !misuse.nil? && misuse.empty?
+              raise ArgumentError, 'misuse is invalid'
+            end
+            @misuse = misuse
+          end
+
+          def copyright=(copyright)
+            if !copyright.nil? && copyright.empty?
+              raise ArgumentError, 'copyright is invalid'
+            end
+            @copyright = copyright
+          end
+        end
+      end # end of Resouce
     end # end of module Common
   end # end of module RM
Index: ruby/trunk/lib/models/tests/rm/test_common.rb
===================================================================
--- ruby/trunk/lib/models/tests/rm/test_common.rb	(revision 162)
+++ ruby/trunk/lib/models/tests/rm/test_common.rb	(revision 163)
@@ -16,16 +16,68 @@
 class RM_Common_Resource_Test < Test::Unit::TestCase
   def setup
-    @authored_resource = OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
-                                                                              :translations => "en",
-                                                                              :description => "test")
-    @translation_details = OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
-  end
+    terminology_id = Terminology_ID.new('openehr')
+    code_phrase = Code_Phrase.new('ja', terminology_id)    
+    @translation_details = OpenEHR::RM::Common::Resource::Translation_Details.new(:language => code_phrase, :author => {'KOBAYASHI, Shinji', 'Ehime Univ'},
+  :accreditation => 'jp', :other_details => {'ruby', 'test'})
+    @authored_resource = OpenEHR::RM::Common::Resource::Authored_Resource.new(:original_language => code_phrase, :translations => {'ja', @translation_details}, :description => "test")
+    @resource_description_item = OpenEHR::RM::Common::Resource::Resource_Description_Item.new(:language => code_phrase,
+              :purpose => 'test',
+              :keywords => %w[test ruby],
+              :use => 'unit test',
+              :misuse => 'real use',
+              :copyright => 'openEHR.jp',
+              :original_resource_uri => {'issuer', 'http://openehr.jp/'},
+              :other_details => {'samos', 'icicth7'})
+    @resource_description = OpenEHR::RM::Common::Resource::Resource_Description.new(:original_author => {'KOBAYASHI, Shinji' => 'Ehime University'},
+    :lifecycle_state => 'experimental',
+    :details => {'ja', @resource_description_item},
+    :other_contributors => %w[aki tim hugh],
+    :resource_package_uri => 'http://openehr.jp/svn/ruby',
+    :other_details => {'ja', 'shikoku'},
+    :parent_resource => @authored_resource)
+    @authored_resource = OpenEHR::RM::Common::Resource::Authored_Resource.new(:original_language => code_phrase, :translations => {'ja', @translation_details}, :description => @resource_description)
+  end
+
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
-    assert_instance_of OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
+    assert_instance_of OpenEHR::RM::Common::Resource::Authored_Resource, @authored_resource
+    assert_instance_of OpenEHR::RM::Common::Resource::Translation_Details, @translation_details
+    assert_instance_of OpenEHR::RM::Common::Resource::Resource_Description_Item, @resource_description_item
+    assert_instance_of OpenEHR::RM::Common::Resource::Resource_Description, @resource_description
+  end
+
+  def test_translation_details
+    assert_equal 'ja', @translation_details.language.code_string
+    assert_equal 'Ehime Univ', @translation_details.author['KOBAYASHI, Shinji']
+    assert_equal 'jp', @translation_details.accreditation
+    assert_equal 'test', @translation_details.other_details['ruby']
   end
 
   def test_authoured_resource
-    assert_equal 'ja', @authored_resource.original_language
+    assert_equal 'ja', @authored_resource.original_language.code_string
+    assert_equal @translation_details, @authored_resource.translations['ja']
+    assert_equal 'experimental', @authored_resource.description.lifecycle_state
+    assert !@authored_resource.is_controlled?
+    assert_equal(Set['ja'], @authored_resource.languages_available)
+  end
+
+  def test_resource_description_item
+    assert_equal 'ja', @resource_description_item.language.code_string
+    assert_equal 'test', @resource_description_item.purpose
+    assert_equal %w[test ruby], @resource_description_item.keywords
+    assert_equal 'unit test', @resource_description_item.use
+    assert_equal 'real use', @resource_description_item.misuse
+    assert_equal 'openEHR.jp', @resource_description_item.copyright
+    assert_equal 'http://openehr.jp/', @resource_description_item.original_resource_uri['issuer']
+    assert_equal 'icicth7', @resource_description_item.other_details['samos']
+  end
+
+  def test_resource_description
+    assert_equal 'Ehime University', @resource_description.original_author['KOBAYASHI, Shinji']
+    assert_equal 'experimental', @resource_description.lifecycle_state
+    assert_equal 'test', @resource_description.details['ja'].purpose
+    assert_equal %w[aki tim hugh], @resource_description.other_contributors
+    assert_equal 'http://openehr.jp/svn/ruby', @resource_description.resource_package_uri
+    assert_equal 'shikoku', @resource_description.other_details['ja']
+    assert_equal 'ja', @resource_description.parent_resource.original_language.code_string
   end
 end
