# CDvOrdinal class, quick question about defaultValue and assumedValue.

**URL:** <https://discourse.openehr.org/t/cdvordinal-class-quick-question-about-defaultvalue-and-assumedvalue/15897>\
**Category:** Reference Implementation: Java (archive)\
**Created:** [17 October 2008 14:27 UTC](https://discourse.openehr.org/t/cdvordinal-class-quick-question-about-defaultvalue-and-assumedvalue/15897 "2008-10-17T14:27:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Filip\_Klasson](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/f/8edcca/32.png) [@Filip\_Klasson](https://discourse.openehr.org/u/Filip_Klasson)\
**Post date:** [17 October 2008 14:27 UTC](https://discourse.openehr.org/t/cdvordinal-class-quick-question-about-defaultvalue-and-assumedvalue/15897/1 "2008-10-17T14:27:13Z")

</div>

Hi,

I have a question about the constuctor in the CDvOrdinal class, it looks like this:

public CDvOrdinal(String path, Interval occurrences,  
String nodeID, CAttribute parent, Set list,  
DvOrdinal defaultValue, Ordinal assumedValue) {

super(list == null, path, “DvOrdinal”, occurrences, nodeID, null,  
assumedValue, parent);

if (list != null && list.isEmpty()) {  
throw new IllegalArgumentException(“list is empty”);  
}  
this.list = list == null ? null : new LinkedHashSet(list);  
}

According to AOM 1.0.1 default\_value is defined as “Like assumed\_value” and assumed\_value is defined as “Any”.

But then isnt the constructor in the CDvOrdinal class wrong since defaultValue and assumedValue are of different types? There defaultValue is of type DvOrdinal and assumedValue of type Ordinal.

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [21 October 2008 09:32 UTC](https://discourse.openehr.org/t/cdvordinal-class-quick-question-about-defaultvalue-and-assumedvalue/15897/2 "2008-10-21T09:32:13Z")

</div>

Hi Filip,

I will change the type of defaultValue from CDvOrdinal to Oridinal just to be consistent. The reason to use Ordinal instead of CDvOrdinal is that the text value of CDvOrdinal is not available at the time of parsing. If the text is defined locally, it could be retrieved in the later stage of parsing. But the text could as well come from external terminologies. Ordinal is a mid-way solution which only keeps the essentials from the constraint.

Cheers,  
Rong
