Index: ruby/trunk/models/am/archetype/archetype.rb
===================================================================
--- ruby/trunk/models/am/archetype/archetype.rb	(revision 4)
+++ ruby/trunk/models/am/archetype/archetype.rb	(revision 21)
@@ -9,5 +9,6 @@
         CURRENT_ADL_VERSION = "2.0"
       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
@@ -18,23 +19,24 @@
         attr_accessor :revision_history, :translation
 
-        def initialize(parent_id, concept,
-                       description, revision_history, is_controled,
-                       definition, ontology, adl_version,
-                       id = nil , original_language = nil, translation = nil)
+        def initialize(args = {})
+#         def initialize(parent_id, concept,
+#                        description, revision_history, is_controled,
+#                        definition, ontology, adl_version,
+#                        id = nil , original_language = nil, translation = nil)
 #          raise Exception.new("illegal argument error, id == nil") unless id
 #          raise Exception.new("illegal argument error, originalLanguage == nil") unless origina_language
 
 #          raise Exception.new("illegal argument error, translation == nil") unless translation
-          @adl_version = adl_version
-          @id = id
-          @parent_id = parent_id
-          @concept = concept
-          @original_language = original_language
-          @translation = translation
-          @description = description
-          @revision_history = revision_history
-          @is_controled = is_controled
-          @definition = definition
-          @ontology = ontology
+          @adl_version = args[:adl_version] if args[:adl_version]
+          @id = args[:id] ? args[:id] : nil
+          @parent_id = args[:parent_id] if args[:parent_id]
+          @concept = args[:concept] if args[:concept]
+          @original_language = args[:original_language] ? args[:original_language] : nil
+          @translation = args[:translation] ? args[:translation] : nil
+          @description = args[:description] if args[:description]
+          @revision_history = args[:revision_history] if args[:revision_history]
+          @is_controled = args[:is_controled] if args[:is_controled]
+          @definition = args[:definition] if args[:definition] 
+          @ontology = args[:ontology] if args[:ontology]
  #         loadMaps(definition)
         end
Index: ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb
===================================================================
--- ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb	(revision 4)
+++ ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb	(revision 21)
@@ -4,6 +4,9 @@
     module Archetype
       module Archetype_Description
-        class Archetype_Description
-          attr_accessor :archetype_package_uri, :lifecycle_state, :original_author, :other_contributors, :other_details
+        class ARCHETYPE_DESCRIPTION
+          attr_accessor :archetype_package_uri, :lifecycle_state, :original_author, :other_contributors, :other_details, :details
+          def initialize(args ={ })
+            @details = args[:details] ? args[:details] : []
+          end
         end
 
Index: ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb
===================================================================
--- ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 4)
+++ ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 21)
@@ -4,7 +4,49 @@
     module Archetype
       module Constraint_Model
-        class Archetype_Constraint
+        class ARCHETYPE_CONSTRAINT
           
         end
+
+        class C_OBJECT < ARCHETYPE_CONSTRAINT
+          
+        end
+
+        class C_ATTRIBUTE < ARCHETYPE_CONSTRAINT
+          
+        end
+
+        class C_DEFINED_OBJECT < C_OBJECT
+          
+        end
+
+        class C_PRIMITIVE_OBJECT < C_DEFINED_OBJECT
+          
+        end
+
+        class C_COMPLEX_OBJECT < C_DEFINED_OBJECT
+          attr_accessor :attributes, :attributes_valid
+          
+        end
+
+        class C_DOMAIN_TYPE < C_DEFINED_OBJECT
+          
+        end
+
+        class C_REFERENCE_OBJECT < C_OBJECT
+          
+        end
+
+        class ARCHETYPE_INTERNAL_REF < C_REFERENCE_OBJECT
+          
+        end
+
+        class ARCHETYPE_SLOT < C_REFERENCE_OBJECT
+          
+        end
+
+        class CONSTRAINT_REF < C_REFERENCE_OBJECT
+          
+        end
+
       end
     end
Index: ruby/trunk/models/am/archetype/constraint_model/primitive.rb
===================================================================
--- ruby/trunk/models/am/archetype/constraint_model/primitive.rb	(revision 4)
+++ ruby/trunk/models/am/archetype/constraint_model/primitive.rb	(revision 21)
@@ -3,5 +3,7 @@
     module Archetype
       module Constraint_Model
+
         module Primitive
+
           class C_Primitive
             def assumed_value
@@ -18,4 +20,5 @@
             end
           end
+
           class C_Boolean < C_Primitive
             attr_accessor :assumed_value
@@ -50,5 +53,7 @@
               end              
             end
+
             private 
+
             def binary_consistency(true_valid, false_valid)
               if !true_valid && !false_valid
@@ -57,4 +62,5 @@
             end
           end # of C_Boolean
+
           class C_Integer < C_Primitive
             
