opereffa ArchetypeWrapper and unit types

2011-01-12 Thread Seref Arikan
Hi Pariya,
An archetype may introduce a constraint so that during the recording of
data, you may use a quantity and one of the allowed units.
Just think about the difference between Fahrenheit and Celsius degrees
(Thomas Beale's example).
Wrappers do have access to ADL, but in these kind of situations, ADL
provides more than one option, so the wrapper can't know which unit it is
going to use. If there is only one option, the wrapper should automatically
use that. I don't think I've added that convenience, so that is probably
what got you confused.

Kind regards
Seref


On Tue, Jan 11, 2011 at 5:16 PM, Pariya Kashfi hajar.kashfi at 
chalmers.sewrote:

 Hello,

 As far as I understand, in opereffa,  *unit* of an item is not retreived
 from the ADL file and should be set manually like :
 pArchetypeWrapper.getElementAtNode(path).setUnitOfQuantity();

 Am I missing something here, or is it the way it works?
 I think since the unit and type of each item is already stored in the ADL
 file, while parsing the ADL file to the ArchetypeWrapper, these types of
 information should be set automatically in ElementWrappers in
 that ArchetypeWrapper.


 Best Regards
 Pariya

 MSc; PhD Candidate
 Department of Computing  Science and Engineering
 Chalmers University of Technology
 http://www.ait.gu.se/kontaktaoss/personal/hajar-kashfi/








 ___
 openEHR-technical mailing list
 openEHR-technical at openehr.org
 http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20110112/71a4660c/attachment.html


opereffa ArchetypeWrapper and unit types

2011-01-11 Thread Pariya Kashfi
Hello,

As far as I understand, in opereffa,  unit of an item is not retreived from the 
ADL file and should be set manually like :
pArchetypeWrapper.getElementAtNode(path).setUnitOfQuantity();

Am I missing something here, or is it the way it works?
I think since the unit and type of each item is already stored in the ADL file, 
while parsing the ADL file to the ArchetypeWrapper, these types of information 
should be set automatically in ElementWrappers in that ArchetypeWrapper.


Best Regards
Pariya

MSc; PhD Candidate
Department of Computing  Science and Engineering 
Chalmers University of Technology
http://www.ait.gu.se/kontaktaoss/personal/hajar-kashfi/







-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20110111/fd553196/attachment.html