Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter: Refactor XML and JSON de-/serialization methods #165

Closed
wants to merge 13 commits into from

Commits on Nov 14, 2023

  1. Configuration menu
    Copy the full SHA
    fc48262 View commit details
    Browse the repository at this point in the history
  2. adapter.xml: Update XSD of valueDataType and Extension

    This commit remanes `valueDataType_t` from the XSD to
    `valueDataType`.
    Furthermore, it adds a missing `<reference>` tag around
    the `refersTo` References of `Extension`.
    s-heppner committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    d3cdbfe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0c276f7 View commit details
    Browse the repository at this point in the history
  4. adapter.xml: Change order of SubmodelElementList objects

    The current order of the elements in `SubmodelElementList`
    was wrong. This updates the order.
    s-heppner committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    9027a8e View commit details
    Browse the repository at this point in the history
  5. adapter.xml: Remove <aas:kind> from SubmodelElements in XSD

    Version 3.0 of the spec removes the attribute `kind` from
    `SubmodelElement`s.
    While we already implemented this, it was still missing in the
    XSD Schema, as well as the examples. This commit fixes that.
    s-heppner committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    3d80e0c View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. adapter.xml: Fix deserialization for Extension

    Currently, the XML deserialization missed the
    `<aas:refersTo>` wrapper around the single references
    inside `Extension.refers_to`. This commit fixes that.
    s-heppner committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    6071934 View commit details
    Browse the repository at this point in the history
  2. model.Extension: Change refers_to to be of type List[Reference]

    Currently, `Extension.refers_to` is declared as a `Iterable[Reference]`.
    This implies, that we can not necessarily check, whether or not the
    attribute is empty or not.
    This creates a problem with the XML serialization, since the
    `<aas.refersTo>` element should only appear if there is at least
    one `Reference` inside.
    
    This commit changes the `Extension.refers_to` to be a list of
    `Reference`s, as well as adapting a more clear check whether
    or not the attribute is empty in `adapter.xml.xml_serialization`.
    s-heppner committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    58f4597 View commit details
    Browse the repository at this point in the history
  3. Refactor _abstract_classes_to_json

    extract methods
    zrgt committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    a14eed9 View commit details
    Browse the repository at this point in the history
  4. Refactor _amend_abstract_attributes

    extract methods
    zrgt committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    c66a4bd View commit details
    Browse the repository at this point in the history
  5. Refactor _amend_abstract_attributes

    extract methods
    zrgt committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    2a49abd View commit details
    Browse the repository at this point in the history
  6. Refactor dicts with NS_AAS tags

    zrgt committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    05e423d View commit details
    Browse the repository at this point in the history
  7. Refactor read_aas_xml_element

    zrgt committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    3e21ec3 View commit details
    Browse the repository at this point in the history
  8. Refactor abstract_classes_to_xml

    extract methods
    zrgt committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    34a6c51 View commit details
    Browse the repository at this point in the history