Skip to content

Action plan

Martin Miksik edited this page Sep 4, 2019 · 20 revisions

1. Stage - model parser

  1. Separate EDM classes and parser. Reimplement current parser to use visitor pattern. I propose to extract all static methods from_etree to ODataV2Visitor and rename methods to parse. V2Visitor should follow this name scheme _from_etree. e. g. schema_from_etree. Overload get attribute to raise PyModelException(unsupported tag in this version?) when unimplemented parse is called. This way we can either catch the exception and skip given tag or terminate parser.

Reimplement class Types to accept visitors on methods from_name and parse_type_name. This way we will be able to separate EDM and OData versions.

This is a UML diagram depicting current classes representing EDM tags: UML - EDM

yet, ValueHelperParameter and AssociationSet are missing. Why? (Same for AssociarionSetRole and so on) And also what does method parse on Identifier(line 156, value.split('.'))

Let's create mixin EtreeMixin which will generate a correct call for classes that implements it.

aaa aa

Also, I suggest moving model.py outside V2 folder and add a new file named ODataV2Visitor. This way, EDM and ODATA parsing will be clearly separated.

  1. Implement V4 parser. Shared parser implementation with V2 can be moved to mixins. This includes:
  • Function, Action and ActionImports
  • Alias attribute on all tags
  • Include -> which can contain new metadata
  • Add support for new types and remove deprecated ones -> see Types table I also suggest to include this table in documentation.
  • Notable changes will be done to Associations
  • Do not forget about EntityType -> BaseType attribute
  • Add navigation property to complex type -> To existing class or create a new one for v4?
  • let's not do annotations for now

Stage 2. - service for V4

  1. reimplement
Clone this wiki locally