Skip to content

Save Correspondence Model Delta-Based #590

Description

@h4uges

#585 delta-based peristence of the models contained in the ResourceRepositoryImpl was introduced. As next step also the PersistableCorrespondenceModel should be persisted delta-based.

Tasks/Hints:

  • in PersistableCorrespondenceModelImpl use a delta-based correspondenceResource (use a ResourceSet that uses DeltaBasedResources) (see [1])
  • the current implementation loads the CorrenspondenceModel and resolves its references later with the loaded models (loadSerializedCorrespondences). As the corrensondence-model shall be saved delta-based the implementation attempts to resolve the references during the application of the deltas. This leads to errors, as the references are unknown. Therefore a different mechanism is needed. Possible approaches:
    • store external references as proxies ("LazyIdResolver") and allow Proxies during application of changes ("LazyResolveAndApply")
    • use a common ResourceSet for models and correspondence model
    • ...

[1]

private static ResourceSet createDeltaBasedResourceSet() {
	ResourceSet resourceSet = withGlobalFactories(new ResourceSetImpl());
	resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new DeltaBasedResourceFactory());
	return resourceSet;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions