Hi,
In using the ADL Parser, I just want to be sure I got this right:
CComplexObject myNode = <get a node within a parsed archetype from somewhere>;
Interval<Integer> myOccurrences = myNode.getOccurrences();
Now, if the occurrence is mandatory (1..1), myOccurrences will be null as mandatory is the default. For easier handling I therefore want to set the following in my code before proceeding:
if (myOccurrence == null) myOccurrence = new Interval<Integer>(1,1);
This should be semantically exactly the same I believe?
Regards
Sebastian
Dr Sebastian Garde
Dr. sc. hum., Dipl.-Inform. Med, FACHI
Faculty of Business and Informatics, Central Queensland University
Austin Centre for Applied Clinical Informatics, Austin Health
Heidelberg Vic 3084, Australia
s.garde@cqu.edu.au
Ph: +61 (0)3 9496 4040
Fax: +61 (0)3 9496 4224
http://healthinformatics.cqu.edu.au
http://www.acaci.org.au
Visit the new open access electronic Journal of Health Informatics (eJHI): http://ejhi.net