// Attach the same symbol contributions to the created typical\r
// diagram type as are attached to the model-designated\r
// contribution source diagram type.\r
+ boolean clonedIndexRootContribution = false;\r
for (Resource symbolContributionSource : cloneSymbolContributionsFrom) {\r
for (Resource contribution : graph.getObjects(symbolContributionSource, DIA.HasSymbolContribution)) {\r
graph.claim(diagramType, DIA.HasSymbolContribution, contribution);\r
+ clonedIndexRootContribution |= graph.isInstanceOf(contribution, DIA.IndexRootSymbolContribution);\r
}\r
}\r
\r
- Resource indexContribution = graph.newResource();\r
- graph.claim(indexContribution, L0.InstanceOf, DIA.IndexRootSymbolContribution);\r
- graph.claim(diagramType, DIA.HasSymbolContribution, indexContribution);\r
+ if (!clonedIndexRootContribution) {\r
+ Resource indexContribution = graph.newResource();\r
+ graph.claim(indexContribution, L0.InstanceOf, DIA.IndexRootSymbolContribution);\r
+ graph.claim(diagramType, DIA.HasSymbolContribution, indexContribution);\r
+ }\r
\r
// Add comment to change set.\r
CommentMetadata cm = graph.getMetadata(CommentMetadata.class);\r
// Check hash of transferable graph to know whether to update or not.\r
if (platformBundle.getHashcode() == existingBundle.getHashcode())\r
continue;\r
- System.out.println("Ontology hashcodes does not match! platformBundle" + platformBundle.getName() + ".getHashCode()=" + platformBundle.getHashcode() + " existingBundle" + existingBundle.getName() + ".getHashCode()=" + existingBundle.getHashcode());\r
+ System.out.println("Ontology hashcodes do not match: platform bundle="\r
+ + platformBundle.getVersionedId() + ", hash=" + platformBundle.getHashcode()\r
+ + "; existing bundle=" + existingBundle.getVersionedId() + ", hash=" + existingBundle.getHashcode());\r
reinstallTGs.put(platformBundle, existingBundle);\r
}\r
}\r