kozchris / tmapix

Automatically exported from code.google.com/p/tmapix
0 stars 0 forks source link

TMAPIMapHandler / OntopiaMapHandler: Handle duplicate iids / reifiers #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Neither TMAPIMapHandler nor OntopiaMapHandler detect duplicates and handle
duplicate iids / reifier assignments correctly.

Original issue reported on code.google.com by lars.he...@gmail.com on 17 Aug 2009 at 12:35

GoogleCodeExporter commented 8 years ago
Fixed for TMAPIMapHandler

Original comment by lars.he...@gmail.com on 19 Aug 2009 at 12:29

GoogleCodeExporter commented 8 years ago
Ontopia 5.0.1 generates the following errors. IIRC Ontopia 5.0.0 accepted these
tests. Needs further investigation.

Testcase: association-duplicate-reified.xtm took 0,031 sec
    Caused an ERROR
Cannot merge topic with itself!
java.lang.IllegalArgumentException: Cannot merge topic with itself!
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:90)
    at net.ontopia.topicmaps.utils.MergeUtils.moveReifier(MergeUtils.java:1140)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:323)
    at
net.ontopia.topicmaps.utils.DuplicateSuppressionUtils.removeDuplicateAssociation
s(DuplicateSuppressionUtils.java:210)
    at
net.ontopia.topicmaps.utils.DuplicateSuppressionUtils.removeDuplicates(Duplicate
SuppressionUtils.java:62)
    at net.ontopia.topicmaps.xml.CanonicalXTMWriter.write(CanonicalXTMWriter.java:122)
    at com.semagia.tmapix.io.CXTMWriterFactory$OntopiaCXTMWriter.write(Unknown Source)
    at com.semagia.tmapix.io.AbstractCXTMTestCase.runTest(Unknown Source)

Original comment by lars.he...@gmail.com on 19 Aug 2009 at 3:40

GoogleCodeExporter commented 8 years ago
Strange, that the CXTMWriter causes the error. The CXTMWriter is invoked after 
the
topic map has been parsed successfully. 

Original comment by lars.he...@gmail.com on 19 Aug 2009 at 3:43

GoogleCodeExporter commented 8 years ago
OntopiaMapHandler with 5.0.1 snapshot down to two errors:

(1)
Testcase: role-duplicate-reified4.xtm took 0,031 sec
    Caused an ERROR
Cannot merge topic with itself!
java.lang.IllegalArgumentException: Cannot merge topic with itself!
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:90)
    at net.ontopia.topicmaps.utils.MergeUtils.moveReifier(MergeUtils.java:1140)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeIntoChecked(MergeUtils.java:371)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:364)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:403)
    at com.semagia.tmapix.io.OntopiaMapHandler._merge(OntopiaMapHandler.java:434)
    at com.semagia.tmapix.io.OntopiaMapHandler._applyReifier(OntopiaMapHandler.java:405)
    at com.semagia.tmapix.io.OntopiaMapHandler.createAssociation(OntopiaMapHandler.java:105)
    at com.semagia.tmapix.io.OntopiaMapHandler.createAssociation(OntopiaMapHandler.java:51)
    at
com.semagia.tmapix.io.AbstractHamsterMapHandler.endAssociation(AbstractHamsterMa
pHandler.java:143)
[...]

(2)
Testcase: role-duplicate-reified2.xtm took 0,016 sec
    Caused an ERROR
Cannot merge topic with itself!
java.lang.IllegalArgumentException: Cannot merge topic with itself!
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:90)
    at net.ontopia.topicmaps.utils.MergeUtils.moveReifier(MergeUtils.java:1140)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeIntoChecked(MergeUtils.java:371)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:364)
    at net.ontopia.topicmaps.utils.MergeUtils.mergeInto(MergeUtils.java:403)
    at com.semagia.tmapix.io.OntopiaMapHandler._merge(OntopiaMapHandler.java:434)
    at com.semagia.tmapix.io.OntopiaMapHandler._applyReifier(OntopiaMapHandler.java:405)
    at com.semagia.tmapix.io.OntopiaMapHandler.createAssociation(OntopiaMapHandler.java:105)
    at com.semagia.tmapix.io.OntopiaMapHandler.createAssociation(OntopiaMapHandler.java:51)
[...]

Original comment by lars.he...@gmail.com on 20 Aug 2009 at 1:16

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r97.

Original comment by lars.he...@gmail.com on 23 Aug 2009 at 11:55