Change handling of enumerations

Description

In api.base 6 enum classes are currently defined which belong to the MDM application model (ScalarType, SequenceRepresentation, TypeSpecification, AxisType, VersionState, Interpolation). If a new enumeration is created in MDM / ODS, this is not known in Java and the OdsAdapter aborts with an exception when it is started up. Enums can not be created dynamically in Java, so it would be necessary to know all enumerations at compile time. To avoid this, the Java Enum feature should be switched to normal objects. This requires a rebuild in api.base and thus also in all available adapters (for example odsadapter).

Activity

Show:
Angelika Wittek
June 27, 2017, 9:49 AM
Alexander Nehmer
July 21, 2017, 12:42 PM

we also need some code to read and cache the possible enum values in the odsadapter, otherwise we can't really make use of them.

Florian Schmitt
July 21, 2017, 12:47 PM
Edited

Sorry about any confusion, but the above comment is from me, not Alex

Angelika Wittek
September 11, 2017, 6:28 AM

The patch is in, and now also reads custom enumerations in the odsadapter.
The following changes in the API happend:

  • Enumeration, EnumerationValue and EnumRegistry have been introduced in org.eclipse.mdm.model

  • The enumerations in org.eclipse.mdm.model were changed to the class EnumerationValue

  • org.eclipse.mdm.api.base.query.Attribute.getEnumClass has been renamed to Attribute.getEnumObj and returns an object of type enumeration

  • usage of the new classes src/main/java/org/eclipse/mdm/api/dflt/model instead of enums

  • usage of the new classes in org.eclipse.mdm.api.odsadapter instead of enums

No changes to other projects like nucleus were necessary, so the api changes have mostly internal impact to the .api.-packages.

Assignee

Angelika Wittek

Reporter

Hans-Jörg Kremer

Labels

Process Step

Global

Eclipse Project

MDM Business Layer

Status

New

Components

None

User Story Name

Change handling of enumerations

Implementer (Company)

None

Customer (Company)

None

Epic Link

Fix versions

Priority

Major
Configure