> 1. How is the constraint type bound to the information model type? Where does it happen? (i.e. how does the constraint type ACCOUNT get bound to the Java class org.openvpms.test.Account)
During the parsing phase, the type information is saved within CObject as a string. What could be improved in the parser is to including a validation logic to verify the class name and attributes. This would require access to the classes which implements information model. The binding occurs during the object creation phase, more specifically in RMObjectBuilder.construct() method. Currently only information model classes in the kernel can be used since all of them are pre-loaded (to solve the mapping between class name and full classpath) into RMObjectBuilder. It should be possible to extend this by allowing classes like your ACCOUNT to be included in the builder as well. But you might not want to do this for interoperability reason. Also your class should use the same annotations as the rest of the reference model for this to work. The reason to use the new annotation feature from jdk1.5 was to enable passing parameter type, name information into the builder by java reflection - the java reflection on ordinary constructor doesn't provide those information. > 2. Once we have an Archetype instance in memory, we can make a call to buildRMObject. Can you describe the parameters to method call? Yes, a call to Archetype.buildRMObject() with right input parameters will give you a newly created instance of information model which constrained by the archetype. The parameters description are at http://www.acode.se/release/kernel/apidocs/org/openehr/am/archetype/Archetype.html#buildRMObject(java.util.Map,%20java.util.Map,%20java.util.Map) (generated from now improved javadoc in the source ;) > 3. This question has to do with terminology. Can you confirm (to ensure that we are on the right track) that if our terminology is stored in a DBMS we need to implement a DBMSTerminologyService for our system? Yes, that's true. Since the term "at0000" is already defined in your example archetype, you don't need any terminology service to instantiate the term. It is required if you define terms to be queried at runtime. But you will need a terminology service to access some openehr terms used by the information model anyway. Cheers, Rong - If you have any questions about using this list, please send a message to d.lloyd at openehr.org

