Skip to content

Refactor schema/model classes to improve construction and validation usability, and access performance #2384

@chrisspre

Description

@chrisspre

The model classes are well designed to separate the consumption (via the IEdmXYZ interfaces) and the classed to construct a model.
But there are a few problems

  • we have two implementations of concrete classes for almost all IEdmXYZ interfaces (e.g. IEdmComplexType via CsdlSemanticsComplexTypeDefinition , EdmComplexType )
  • manual construction of models is quite different code compared to reading from CSDL
  • quite easy to construct invalid models
  • models read from file can not be modified
  • we spend quite a bit of time to improve model querying/navigation
  • the "FindXYZ" methods (like FindProperty on IEdmComplexType) are designed to work on valid models but are also implemented on invalid models (see the case insensitive issue a while ago)

I am proposing to restructure this on a high level.

  • a hierarchy of classes that can be used to easily construct a model
    • the same classes are used to construct the model read from CSDL
    • model elements can be annotated with an abstract location (abstracted from CSDL file location)
  • a step that builds a read only model. During this step,
    • validation will happen
    • users can specify the level of conformance to the standard (e.g. case sensitivity)
    • users can use/inject standard schemas and vocabulary schemas
    • sub-elements (like properties of types, elements of namespace) are indexed for predictable and fast read access

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions