CDvOrdinal class, quick question about defaultValue and assumedValue.

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

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