Comment 2 for bug 686116

Revision history for this message
Mathieu Bastian (mathieu.bastian) wrote :

Mainly for modularity reasons, you know that graph and attributes are separated in gephi. You may also know that you can write attribute values only if the column exists; and has therefore been created somehow.

The pushFrom method fails here because the columns haven't been created in the new workspace. Its a pity it doesn't take this classic issue in account and raise a proper exception.

Anyway, do that to duplicate the attribute model in the new workspace:

AttributeModel sourceAttributeModel = attributeController.getModel(currentWorkspace);
AttributeModel destAttributeModel = attributeController.getModel(newWorkspace);
destAttributeModel.mergeModel(sourceAttributeModel);