|
From: <lh...@us...> - 2010-01-11 14:49:26
|
Revision: 362
http://tinytim.svn.sourceforge.net/tinytim/?rev=362&view=rev
Author: lheuer
Date: 2010-01-11 12:42:35 +0000 (Mon, 11 Jan 2010)
Log Message:
-----------
Fixes issue #2926983
Modified Paths:
--------------
tinytim/trunk/CHANGES.txt
tinytim/trunk/src/main/java/org/tinytim/internal/utils/CopyUtils.java
Modified: tinytim/trunk/CHANGES.txt
===================================================================
--- tinytim/trunk/CHANGES.txt 2009-11-04 18:29:23 UTC (rev 361)
+++ tinytim/trunk/CHANGES.txt 2010-01-11 12:42:35 UTC (rev 362)
@@ -2,12 +2,16 @@
Changes Log
===========
-2.0.0 a6 (xx.yy.2009)
+2.0.0 a6 (2010-01-xx)
---------------------
* Added support to convert XTM 1.0 class-instance relationships
to TMDM type-instance relationships
* Added support to convert XTM 1.0 PSIs to TMDM PSIs
+Bugfixes:
+---------
+* Bug #2926983 -- Merging of associations fails
+ reported by Sven Krosse
2.0.0 a5 (23.07.2009)
Modified: tinytim/trunk/src/main/java/org/tinytim/internal/utils/CopyUtils.java
===================================================================
--- tinytim/trunk/src/main/java/org/tinytim/internal/utils/CopyUtils.java 2009-11-04 18:29:23 UTC (rev 361)
+++ tinytim/trunk/src/main/java/org/tinytim/internal/utils/CopyUtils.java 2010-01-11 12:42:35 UTC (rev 362)
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Lars Heuer (heuer[at]semagia.com)
+ * Copyright 2008 - 2010 Lars Heuer (heuer[at]semagia.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -336,12 +336,20 @@
Association existing = null;
ITopic type = null;
IScope scope = null;
+ ITopic roleType = null;
+ ITopic player = null;
+ Topic sourcePlayer = null;
for (Association assoc: source.getAssociations()) {
type = _copyType(assoc, target, mergeMap);
scope = _copyScope(assoc, target, mergeMap);
Association targetAssoc = target.createAssociation(type, scope);
for (Role role: assoc.getRoles()) {
- Role targetRole = targetAssoc.createRole(role.getType(), role.getPlayer());
+ roleType = _copyType(role, target, mergeMap);
+ sourcePlayer = role.getPlayer();
+ player = mergeMap.containsKey(sourcePlayer)
+ ? (ITopic) mergeMap.get(sourcePlayer)
+ : _copyTopic(sourcePlayer, target, mergeMap);
+ Role targetRole = targetAssoc.createRole(roleType, player);
_copyItemIdentifiers(role, targetRole);
_copyReifier(role, targetRole, mergeMap);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|