|
From: Christian H. <ha...@in...> - 2009-11-03 12:51:49
|
Hi all,
i tried to merge two topic maps and received an IdentityConstraintException
because the same identifier was added to two different topics which in my
opinion is correct behaviour according to the TMDM.
So I wrote the following test program where I added the same subject
identifier to two different topics which should be merged by the engine. The
result was the same exception. Am I missing something?
TopicMapSystemFactory factory = TopicMapSystemFactory.newInstance();
TopicMapSystem system = factory.newTopicMapSystem();
TopicMap testMap = system.createTopicMap("test:test");
String test_locator = "http://my.test";
Topic topic1 =
testMap.createTopicBySubjectIdentifier(testMap.createLocator(test_locator));
topic1.createName("Test1");
Topic topic2 = testMap.createTopic();
topic2.createName("Test2");
topic2.addSubjectIdentifier(testMap.createLocator(test_locator));
Best, Christian
--
Christian Haß, Msc.
Abteilung Automatische Sprachverarbeitung
Institut für Informatik | Universität Leipzig
Johannisgasse 26 | Raum 00-18 | 04103 Leipzig
phone: 0049 - 341 - 97 - 32298
fax: 0049 - 341 - 97 - 32299
mail: ha...@in...
======================================
Topic Maps Lab
http://www.topicmapslab.de
======================================
|