Ticket #393 (closed Defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Revise Association Definition model

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.1
Component: DeepaMehta Standard Distribution Version: 4.0.13
Keywords: Cc: dgf, Malte
Complexity: 5 Area:
Module: deepamehta-core

Description

  • The Assoc Def URI is not a true URI. Its not unique and isn't stored (but is derived).
  • The Assoc Def's serialized form has a lot of redundancy.

Meanwhile the Assoc Def model is derived from the Assoc model. The serialized form needs to be cleanup up. The Webclient must be adapted then.

Background: the new storage layer stores and indexes the association URI properly and includes a uniqueness check.

Change History

comment:1 Changed 8 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Jörg Richter

Core: revise association def model (#393).

BREAKING CHANGES

These assoc def fields are dropped from serialized form:

  • assoc_type_uri # the same as assoc's "type_uri"
  • whole_type_uri # can be get from assoc's roles
  • part_type_uri # can be get from assoc's roles
  • whole_role_type_uri # fixed: "dm4.core.whole"
  • part_role_type_uri # fixed: "dm4.core.part"

AssociationModel?:

  • AssociationModel?(long id, String typeUri) constructor is dropped
  • AssociationModel?(long id, String typeUri, RoleModel? roleModel1, RoleModel? roleModel2) constructor has additional "uri" argument (String) behind "id"
  • setRoleModel1() and setRoleModel2() methods are dropped

See ticket 393.

comment:3 Changed 8 years ago by Jörg Richter

Core: fix bidirectional assoc index (#389, #393).

For the first time the server can start with the new storage layer.
Use the "assoc-index" branch.
(Try multiple if "bundle not found" is thrown, see 2) below.)

Pending:

1) Adapt the Webclient to the changed assod def format (#393).
2) Provide storage implementation as OSGi service.
3) Update assoc metadata index on delete and retype.

BREAKING CHANGES

The semantics of the Association Definition URI has changed. Now this is straight the URI as derived from the underling Association. So, it does *not* reflect the assoc def's part type URI (= "child type") anymore, but is usually empty (see #393).

When operating on an assoc def you must replace

    assocDef.getUri()

by

    assocDef.getPartTypeUri()

This is in particular important for genric operations on composite values, e.g.:

    composite.put(assocDef.getPartTypeUri(), childTopic.getModel());

See ticket 389.
See ticket 393.

comment:4 Changed 8 years ago by Jörg Richter

Core: revise association def model (#393).

BREAKING CHANGES

These assoc def fields are dropped from serialized form:

  • assoc_type_uri # the same as assoc's "type_uri"
  • whole_type_uri # can be get from assoc's roles
  • part_type_uri # can be get from assoc's roles
  • whole_role_type_uri # fixed: "dm4.core.whole"
  • part_role_type_uri # fixed: "dm4.core.part"

AssociationModel?:

  • AssociationModel?(long id, String typeUri) constructor is dropped
  • AssociationModel?(long id, String typeUri, RoleModel? roleModel1, RoleModel? roleModel2) constructor has additional "uri" argument (String) behind "id"
  • setRoleModel1() and setRoleModel2() methods are dropped

See ticket 393.

comment:5 Changed 8 years ago by Jörg Richter

Core: fix bidirectional assoc index (#389, #393).

For the first time the server can start with the new storage layer.
Use the "assoc-index" branch.
(Try multiple if "bundle not found" is thrown, see 2) below.)

Pending:

1) Adapt the Webclient to the changed assod def format (#393).
2) Provide storage implementation as OSGi service.
3) Update assoc metadata index on delete and retype.

BREAKING CHANGES

The semantics of the Association Definition URI has changed. Now this is straight the URI as derived from the underling Association. So, it does *not* reflect the assoc def's part type URI (= "child type") anymore, but is usually empty (see #393).

When operating on an assoc def you must replace

    assocDef.getUri()

by

    assocDef.getPartTypeUri()

This is in particular important for genric operations on composite values, e.g.:

    composite.put(assocDef.getPartTypeUri(), childTopic.getModel());

See ticket 389.
See ticket 393.

comment:6 Changed 8 years ago by Jörg Richter

Webclient: adapt to new assoc def format (#393).

Webclient API:

  • Association.prototype.get_role = function(role_type_uri) is new convenience function

BREAKING CHANGES

When working on an assoc def on client-side you must replace

    assoc_def.uri                   ->  assoc_def.part_type_uri
    assoc_def.assoc_type_uri        ->  assoc_def.type_uri
    assoc_def.whole_role_type_uri   ->  "dm4.core.whole"
    assoc_def.part_role_type_uri    ->  "dm4.core.part"

See ticket 393.

comment:7 Changed 8 years ago by Jörg Richter

Core: revise association def model (#393).

BREAKING CHANGES

These assoc def fields are dropped from serialized form:

  • assoc_type_uri # the same as assoc's "type_uri"
  • whole_type_uri # can be get from assoc's roles
  • part_type_uri # can be get from assoc's roles
  • whole_role_type_uri # fixed: "dm4.core.whole"
  • part_role_type_uri # fixed: "dm4.core.part"

AssociationModel?:

  • AssociationModel?(long id, String typeUri) constructor is dropped
  • AssociationModel?(long id, String typeUri, RoleModel? roleModel1, RoleModel? roleModel2) constructor has additional "uri" argument (String) behind "id"
  • setRoleModel1() and setRoleModel2() methods are dropped

See ticket 393.

comment:8 Changed 8 years ago by Jörg Richter

Core: fix bidirectional assoc index (#389, #393).

For the first time the server can start with the new storage layer.
Use the "assoc-index" branch.
(Try multiple if "bundle not found" is thrown, see 2) below.)

Pending:

1) Adapt the Webclient to the changed assod def format (#393).
2) Provide storage implementation as OSGi service.
3) Update assoc metadata index on delete and retype.

BREAKING CHANGES

The semantics of the Association Definition URI has changed. Now this is straight the URI as derived from the underling Association. So, it does *not* reflect the assoc def's part type URI (= "child type") anymore, but is usually empty (see #393).

When operating on an assoc def you must replace

    assocDef.getUri()

by

    assocDef.getPartTypeUri()

This is in particular important for genric operations on composite values, e.g.:

    composite.put(assocDef.getPartTypeUri(), childTopic.getModel());

See ticket 389.
See ticket 393.

comment:9 Changed 8 years ago by Jörg Richter

Webclient: adapt to new assoc def format (#393).

Webclient API:

  • Association.prototype.get_role = function(role_type_uri) is new convenience function

BREAKING CHANGES

When working on an assoc def on client-side you must replace

    assoc_def.uri                   ->  assoc_def.part_type_uri
    assoc_def.assoc_type_uri        ->  assoc_def.type_uri
    assoc_def.whole_role_type_uri   ->  "dm4.core.whole"
    assoc_def.part_role_type_uri    ->  "dm4.core.part"

See ticket 393.

comment:10 Changed 8 years ago by Jörg Richter

  • Status changed from accepted to closed
  • Resolution set to fixed

Core: drop 2 AssociationDefinition? methods (#393).

BREAKING CHANGES

2 methods are dropped from AssociationDefinition? and AssociationDefinitionModel?:

  • getWholeRoleTypeUri()
  • getPartRoleTypeUri()

=> Use the "dm4.core.whole" and "dm4.core.part" constants instead.

Close ticket 393.

Furthermore: "Jörn Weißenborn" is listed as a contributor in "About DeepaMehta".

Note: See TracTickets for help on using tickets.