Skip to Navigation | Skip to Content

Ref_impl_Java mailing list archives

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: Wrong assumed value for DvBoolean in Java


Hi Rong,

hasAssumedValue work fine if I do something like: cPrimitiveObject.item.hasAssumedValue()
but if I do: cPrimitiveObject.hasAssumedValue() it always return true, I think if the item of the CPrimitiveObject
don't have an asssumed value, cPrimitiveObject.hasAssumedValue() must return false, is it correct?

Thanks!

Pablo.




Date: Tue, 20 Oct 2009 10:29:44 +0200
Subject: Re: Wrong assumed value for DvBoolean in Java
From: rong.acode@gmail.com
To: ref_impl_java@openehr.org

2009/10/17 pablo pazos <pazospablo@hotmail.com>
Hi,

I have another problem with assumedValue of the DvBoolean, may be you can help me out.

If I've this (I mean "no assumed value"):


DV_BOOLEAN matches {
     value matches {True, False}
}

The assumed value of this node in the AOM instance is "false" and I think it must be a "null" assumed value.

Is it the spected behavior?
Is correct to have a null assumed value for a CBoolean constraint?
Any ideas?


Thanks a lot,
Pablo Pazos Gutiérrez.





Hi Pablo,

The assumedValue attribute of CBoolean is a primitive boolean so it can't return null. In the case you provided, it's better to check if hasAssumedValue returns true before proceed to take assumedValue.

By the way, please in the future try not to reply to lengthy posts directly since the response mail can be too big to pass the list server.

Cheers,
Rong

 


Keep your friends updated— even when you’re not signed in.