You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(29) |
Sep
(4) |
Oct
|
Nov
(12) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(1) |
Feb
(4) |
Mar
(4) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(10) |
Nov
|
Dec
|
2010 |
Jan
(12) |
Feb
(20) |
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
From: <lh...@us...> - 2009-07-22 17:01:33
|
Revision: 116 http://tmapi.svn.sourceforge.net/tmapi/?rev=116&view=rev Author: lheuer Date: 2009-07-22 17:01:23 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Changed float -> int test Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java Modified: trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java =================================================================== --- trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java 2009-07-08 11:52:00 UTC (rev 115) +++ trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java 2009-07-22 17:01:23 UTC (rev 116) @@ -219,9 +219,9 @@ assertEquals(strValue, dt.getValue()); assertEquals(_xsdFloat, dt.getDatatype()); assertEquals(new BigDecimal(strValue), dt.decimalValue()); - assertFailInteger(dt); - assertFailLong(dt); - assertFailInt(dt); + assertEquals(new BigInteger("1976"), dt.integerValue()); + assertEquals(1976L, dt.longValue()); + assertEquals(1976, dt.intValue()); assertEquals(value, dt.floatValue()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <la...@us...> - 2009-07-08 11:52:01
|
Revision: 115 http://tmapi.svn.sourceforge.net/tmapi/?rev=115&view=rev Author: larsga Date: 2009-07-08 11:52:00 +0000 (Wed, 08 Jul 2009) Log Message: ----------- Simplified test running by using org.tmapi.AllTests. Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-07-08 11:40:58 UTC (rev 114) +++ trunk/build.xml 2009-07-08 11:52:00 UTC (rev 115) @@ -198,21 +198,9 @@ <pathelement location="${dir.build.tests}"/> </classpath> <formatter type="brief" usefile="false"/> - <test name="org.tmapi.core.AllCoreTests"/> + <test name="org.tmapi.AllTests"/> </junit> <fail message="Tests failed. Check test output." if="test.failed"/> - - <junit printsummary="true" showoutput="false" - errorProperty="test.failed" failureProperty="test.failed" - fork="true"> - <classpath> - <pathelement location="${dir.build.classes}"/> - <pathelement location="${dir.build.tests}"/> - </classpath> - <formatter type="brief" usefile="false"/> - <test name="org.tmapi.index.AllIndexTests"/> - </junit> - <fail message="Tests failed. Check test output." if="test.failed"/> </target> <!-- =================================================================== --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-07-08 11:41:10
|
Revision: 114 http://tmapi.svn.sourceforge.net/tmapi/?rev=114&view=rev Author: lheuer Date: 2009-07-08 11:40:58 +0000 (Wed, 08 Jul 2009) Log Message: ----------- Better error reporting for the tests (includes line no) Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-07-07 18:17:54 UTC (rev 113) +++ trunk/build.xml 2009-07-08 11:40:58 UTC (rev 114) @@ -79,8 +79,8 @@ <target name="test" depends="compile"> <mkdir dir="${dir.build.tests}"/> <javac destdir="${dir.build.tests}" - debug="${debug}" - optimize="${optimize}" + debug="on" + optimize="off" target="1.5"> <classpath> <pathelement location="${dir.build.classes}"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <la...@us...> - 2009-07-07 18:17:55
|
Revision: 113 http://tmapi.svn.sourceforge.net/tmapi/?rev=113&view=rev Author: larsga Date: 2009-07-07 18:17:54 +0000 (Tue, 07 Jul 2009) Log Message: ----------- Added a main class for the -tests .jar and made it runnable. Modified Paths: -------------- trunk/build.xml Added Paths: ----------- trunk/src/test/java/org/tmapi/AllTests.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-07-07 18:04:58 UTC (rev 112) +++ trunk/build.xml 2009-07-07 18:17:54 UTC (rev 113) @@ -181,6 +181,7 @@ <attribute name="Implementation-Title" value="TMAPI Tests"/> <attribute name="Implementation-Version" value="${dist.version}"/> <attribute name="Implementation-URL" value="http://www.tmapi.org/"/> + <attribute name="Main-Class" value="org.tmapi.AllTests"/> </manifest> </jar> </target> Added: trunk/src/test/java/org/tmapi/AllTests.java =================================================================== --- trunk/src/test/java/org/tmapi/AllTests.java (rev 0) +++ trunk/src/test/java/org/tmapi/AllTests.java 2009-07-07 18:17:54 UTC (rev 113) @@ -0,0 +1,41 @@ +/* + * The Topic Maps API (TMAPI) was created collectively by + * the membership of the tmapi-discuss mailing list + * <http://lists.sourceforge.net/mailman/listinfo/tmapi-discuss>, + * is hereby released into the public domain; and comes with + * NO WARRANTY. + * + * No one owns TMAPI: you may use it freely in both commercial and + * non-commercial applications, bundle it with your software + * distribution, include it on a CD-ROM, list the source code in a + * book, mirror the documentation at your own web site, or use it in + * any other way you see fit. + */ +package org.tmapi; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.tmapi.core.AllCoreTests; +import org.tmapi.index.AllIndexTests; + +/** + * Provides a test suite which contains all test cases for TMAPI 2.0. + * + * @author <a href="http://tmapi.org/">The TMAPI Project</a> + * @author Lars Marius Garshol (larsga[at]garshol.priv.no) <a href="http:/www.garshol.priv.no/">LMG</a> + * @version $Rev: 109 $ - $Date: 2009-06-30 15:53:17 +0200 (Tue, 30 Jun 2009) $ + */ +public class AllTests extends TestSuite { + + public static void main(String[] args) { + junit.textui.TestRunner.run(suite()); + } + + public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(AllCoreTests.suite()); + suite.addTest(AllIndexTests.suite()); + return suite; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <la...@us...> - 2009-07-07 18:05:10
|
Revision: 112 http://tmapi.svn.sourceforge.net/tmapi/?rev=112&view=rev Author: larsga Date: 2009-07-07 18:04:58 +0000 (Tue, 07 Jul 2009) Log Message: ----------- Added the runtests target for running the tests. Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-07-04 17:52:31 UTC (rev 111) +++ trunk/build.xml 2009-07-07 18:04:58 UTC (rev 112) @@ -36,6 +36,7 @@ <echo message=" test.jar Creates the test suite jar (.index and .core)"/> <echo message=" doc Creates the API documentation"/> <echo message=" release Creates the jar and a distributable file"/> + <echo message=" runtests Runs all the JUnit test cases"/> </target> <target name="init"> @@ -185,6 +186,35 @@ </target> <!-- =================================================================== --> + <!-- Runs all the tests --> + <!-- =================================================================== --> + <target name="runtests" depends="init"> + <junit printsummary="true" showoutput="false" + errorProperty="test.failed" failureProperty="test.failed" + fork="true"> + <classpath> + <pathelement location="${dir.build.classes}"/> + <pathelement location="${dir.build.tests}"/> + </classpath> + <formatter type="brief" usefile="false"/> + <test name="org.tmapi.core.AllCoreTests"/> + </junit> + <fail message="Tests failed. Check test output." if="test.failed"/> + + <junit printsummary="true" showoutput="false" + errorProperty="test.failed" failureProperty="test.failed" + fork="true"> + <classpath> + <pathelement location="${dir.build.classes}"/> + <pathelement location="${dir.build.tests}"/> + </classpath> + <formatter type="brief" usefile="false"/> + <test name="org.tmapi.index.AllIndexTests"/> + </junit> + <fail message="Tests failed. Check test output." if="test.failed"/> + </target> + + <!-- =================================================================== --> <!-- Prepares a distribution --> <!-- =================================================================== --> <target name="dist" depends="jar, test.jar, doc"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-07-04 17:52:34
|
Revision: 111 http://tmapi.svn.sourceforge.net/tmapi/?rev=111&view=rev Author: lheuer Date: 2009-07-04 17:52:31 +0000 (Sat, 04 Jul 2009) Log Message: ----------- Added TestRFC3986 to test RFC 3986 compatibility Commented out two tests in the TestLocator Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/TestLocator.java Added Paths: ----------- trunk/src/test/java/org/tmapi/core/TestRFC3986.java Modified: trunk/src/test/java/org/tmapi/core/TestLocator.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestLocator.java 2009-06-30 16:18:20 UTC (rev 110) +++ trunk/src/test/java/org/tmapi/core/TestLocator.java 2009-07-04 17:52:31 UTC (rev 111) @@ -17,7 +17,6 @@ * Tests against the {@link Locator} interface. * * @author <a href="http://tmapi.org/">The TMAPI Project</a> - * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ public class TestLocator extends TMAPITestCase { @@ -73,7 +72,8 @@ // Original: //g -> http://g // Changed to avoid problems with trailing slash normailzations {"//g/x", "http://g/x"}, - {"?y", "http://a/b/c/d;p?y"}, + // Moved to TestRFC3986: + // {"?y", "http://a/b/c/d;p?y"}, {"g?y", "http://a/b/c/g?y"}, {"#s", "http://a/b/c/d;p?q#s"}, {"g#s", "http://a/b/c/g#s"}, @@ -81,7 +81,8 @@ {";x", "http://a/b/c/;x"}, {"g;x", "http://a/b/c/g;x"}, {"g;x?y#s", "http://a/b/c/g;x?y#s"}, - {"", "http://a/b/c/d;p?q"}, + // Moved to TestRFC3986: + // {"", "http://a/b/c/d;p?q"}, {".", "http://a/b/c/"}, {"./", "http://a/b/c/"}, {"..", "http://a/b/"}, Added: trunk/src/test/java/org/tmapi/core/TestRFC3986.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestRFC3986.java (rev 0) +++ trunk/src/test/java/org/tmapi/core/TestRFC3986.java 2009-07-04 17:52:31 UTC (rev 111) @@ -0,0 +1,68 @@ +/* + * The Topic Maps API (TMAPI) was created collectively by + * the membership of the tmapi-discuss mailing list + * <http://lists.sourceforge.net/mailman/listinfo/tmapi-discuss>, + * is hereby released into the public domain; and comes with + * NO WARRANTY. + * + * No one owns TMAPI: you may use it freely in both commercial and + * non-commercial applications, bundle it with your software + * distribution, include it on a CD-ROM, list the source code in a + * book, mirror the documentation at your own web site, or use it in + * any other way you see fit. + */ +package org.tmapi.core; + +/** + * Tests against the {@link Locator} interface if the implementation is RFC 3986 compatible. + * <p> See <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a></p>. + * + * @author <a href="http://tmapi.org/">The TMAPI Project</a> + * @version $Rev$ - $Date$ + */ +public class TestRFC3986 extends TMAPITestCase { + + public TestRFC3986(String name) { + super(name); + } + + /** + * Tests the examples from RFC 3986 -- 5.4.1. Normal Examples. + */ + public void test_RFC_3986__5_4_1_Normal_Examples() { + String[][] IRIS = new String[][] { + {"g:h", "g:h"}, + {"g", "http://a/b/c/g"}, + {"./g", "http://a/b/c/g"}, + {"/g", "http://a/g"}, + // Original: //g -> http://g + // Changed to avoid problems with trailing slash normailzations + {"//g/x", "http://g/x"}, + {"?y", "http://a/b/c/d;p?y"}, + {"g?y", "http://a/b/c/g?y"}, + {"#s", "http://a/b/c/d;p?q#s"}, + {"g#s", "http://a/b/c/g#s"}, + {"g?y#s", "http://a/b/c/g?y#s"}, + {";x", "http://a/b/c/;x"}, + {"g;x", "http://a/b/c/g;x"}, + {"g;x?y#s", "http://a/b/c/g;x?y#s"}, + {"", "http://a/b/c/d;p?q"}, + {".", "http://a/b/c/"}, + {"./", "http://a/b/c/"}, + {"..", "http://a/b/"}, + {"../", "http://a/b/"}, + {"../g", "http://a/b/g"}, + {"../..", "http://a/"}, + {"../../", "http://a/"}, + {"../../g", "http://a/g"} + }; + final String reference = "http://a/b/c/d;p?q"; + final Locator base = _tm.createLocator(reference); + assertEquals(reference, base.toExternalForm()); + for (int i=0; i<IRIS.length; i++) { + assertEquals("Unexpected result for " + IRIS[i][0], + IRIS[i][1], base.resolve(IRIS[i][0]).toExternalForm()); + } + } + +} Property changes on: trunk/src/test/java/org/tmapi/core/TestRFC3986.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-06-30 16:18:22
|
Revision: 110 http://tmapi.svn.sourceforge.net/tmapi/?rev=110&view=rev Author: lheuer Date: 2009-06-30 16:18:20 +0000 (Tue, 30 Jun 2009) Log Message: ----------- Added check for topic.addType Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java Modified: trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java 2009-06-30 13:53:17 UTC (rev 109) +++ trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java 2009-06-30 16:18:20 UTC (rev 110) @@ -249,4 +249,14 @@ public void testVariantIllegalReifier() { _testIllegalReifier(createVariant()); } + + public void testIllegalTopicType() { + try { + createTopic().addType(_tm2.createTopic()); + fail("The type is not from the same topic map. Disallowed."); + } + catch (ModelConstraintException ex) { + // noop. + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-06-30 14:14:41
|
Revision: 109 http://tmapi.svn.sourceforge.net/tmapi/?rev=109&view=rev Author: lheuer Date: 2009-06-30 13:53:17 +0000 (Tue, 30 Jun 2009) Log Message: ----------- Added same topic map constraint test cases Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/AllCoreTests.java Added Paths: ----------- trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java Modified: trunk/src/test/java/org/tmapi/core/AllCoreTests.java =================================================================== --- trunk/src/test/java/org/tmapi/core/AllCoreTests.java 2009-06-19 12:09:27 UTC (rev 108) +++ trunk/src/test/java/org/tmapi/core/AllCoreTests.java 2009-06-30 13:53:17 UTC (rev 109) @@ -47,6 +47,7 @@ suite.addTestSuite(TestTopicMap.class); suite.addTestSuite(TestTopic.class); suite.addTestSuite(TestAssociation.class); + suite.addTestSuite(TestSameTopicMap.class); suite.addTestSuite(TestRole.class); suite.addTestSuite(TestOccurrence.class); suite.addTestSuite(TestName.class); Added: trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java (rev 0) +++ trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java 2009-06-30 13:53:17 UTC (rev 109) @@ -0,0 +1,252 @@ +/* + * The Topic Maps API (TMAPI) was created collectively by + * the membership of the tmapi-discuss mailing list + * <http://lists.sourceforge.net/mailman/listinfo/tmapi-discuss>, + * is hereby released into the public domain; and comes with + * NO WARRANTY. + * + * No one owns TMAPI: you may use it freely in both commercial and + * non-commercial applications, bundle it with your software + * distribution, include it on a CD-ROM, list the source code in a + * book, mirror the documentation at your own web site, or use it in + * any other way you see fit. + */ +package org.tmapi.core; + +import java.util.Arrays; + +import org.tmapi.core.ModelConstraintException; +import org.tmapi.core.Reifiable; +import org.tmapi.core.Scoped; +import org.tmapi.core.TopicMap; +import org.tmapi.core.Typed; + +/** + * Checks the "same topic map" constraint. + * + * @author <a href="http://tmapi.org/">The TMAPI Project</a> + * @version $Rev$ - $Date$ + */ +public class TestSameTopicMap extends TMAPITestCase { + + private TopicMap _tm2; + + public TestSameTopicMap(String name) { + super(name); + } + + /* (non-Javadoc) + * @see org.tinytim.core.TinyTimTestCase#setUp() + */ + @Override + protected void setUp() throws Exception { + super.setUp(); + _tm2 = _sys.createTopicMap("http://www.tmapi.org/same-topicmap"); + } + + public void testAssociationCreationIllegalType() { + try { + _tm.createAssociation(_tm2.createTopic()); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testAssociationCreationIllegalScopeArray() { + try { + _tm.createAssociation(createTopic(), createTopic(), _tm2.createTopic()); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testAssociationCreationIllegalScopeCollection() { + try { + _tm.createAssociation(createTopic(), Arrays.asList(createTopic(), _tm2.createTopic())); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testNameCreationIllegalType() { + try { + createTopic().createName(_tm2.createTopic(), "value"); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testNameCreationIllegalScopeArray() { + try { + createTopic().createName(createTopic(), "value", createTopic(), _tm2.createTopic()); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testNameCreationIllegalScopeCollection() { + try { + createTopic().createName(createTopic(), "value", Arrays.asList(createTopic(), _tm2.createTopic())); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testOccurrenceCreationIllegalType() { + try { + createTopic().createOccurrence(_tm2.createTopic(), "value"); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testOccurrenceCreationIllegalScopeArray() { + try { + createTopic().createOccurrence(createTopic(), "value", createTopic(), _tm2.createTopic()); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testOccurrenceCreationIllegalScopeCollection() { + try { + createTopic().createOccurrence(createTopic(), "value", Arrays.asList(createTopic(), _tm2.createTopic())); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testRoleCreationIllegalType() { + try { + createAssociation().createRole(_tm2.createTopic(), createTopic()); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testRoleCreationIllegalPlayer() { + try { + createAssociation().createRole(createTopic(), _tm2.createTopic()); + fail("Expected a model contraint violation"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + private void _testIllegalTheme(Scoped scoped) { + try { + scoped.addTheme(_tm2.createTopic()); + fail("Adding a theme from another topic map shouldn't be allowed"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testAssociationIllegalTheme() { + _testIllegalTheme(createAssociation()); + } + + public void testOccurrenceIllegalTheme() { + _testIllegalTheme(createOccurrence()); + } + + public void testNameIllegalTheme() { + _testIllegalTheme(createName()); + } + + public void testVariantIllegalTheme() { + _testIllegalTheme(createVariant()); + } + + private void _testIllegalType(Typed typed) { + try { + typed.setType(_tm2.createTopic()); + fail("Setting the type to a topic from another topic map shouldn't be allowed"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testAssociationIllegalType() { + _testIllegalType(createAssociation()); + } + + public void testRoleIllegalType() { + _testIllegalType(createRole()); + } + + public void testOccurrenceIllegalType() { + _testIllegalType(createOccurrence()); + } + + public void testNameIllegalType() { + _testIllegalType(createName()); + } + + public void testRoleIllegalPlayer() { + try { + createRole().setPlayer(_tm2.createTopic()); + fail("Setting the player to a topic of another topic map shouldn't be allowed."); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + private void _testIllegalReifier(Reifiable reifiable) { + try { + reifiable.setReifier(_tm2.createTopic()); + fail("Setting the reifier to a topic of another topic map shouldn't be allowed"); + } + catch (ModelConstraintException ex) { + // noop. + } + } + + public void testTopicMapIllegalReifier() { + _testIllegalReifier(_tm); + } + + public void testAssociationIllegalReifier() { + _testIllegalReifier(createAssociation()); + } + + public void testRoleIllegalReifier() { + _testIllegalReifier(createRole()); + } + + public void testOccurrenceIllegalReifier() { + _testIllegalReifier(createOccurrence()); + } + + public void testNameIllegalReifier() { + _testIllegalReifier(createName()); + } + + public void testVariantIllegalReifier() { + _testIllegalReifier(createVariant()); + } +} Property changes on: trunk/src/test/java/org/tmapi/core/TestSameTopicMap.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-06-19 12:09:33
|
Revision: 108 http://tmapi.svn.sourceforge.net/tmapi/?rev=108&view=rev Author: lheuer Date: 2009-06-19 12:09:27 +0000 (Fri, 19 Jun 2009) Log Message: ----------- Fixed path separator, reported and fixed by Hannes Niederhausen Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/TestTopicMapSystemFactory.java Modified: trunk/src/test/java/org/tmapi/core/TestTopicMapSystemFactory.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestTopicMapSystemFactory.java 2009-06-18 18:42:06 UTC (rev 107) +++ trunk/src/test/java/org/tmapi/core/TestTopicMapSystemFactory.java 2009-06-19 12:09:27 UTC (rev 108) @@ -56,7 +56,7 @@ File javaHome = new File(System.getProperty("java.home")); File propsFile = new File(javaHome, "lib" + File.separator + "tmapi.properties"); - File tmpPropsFile = new File(javaHome, "lib" + File.pathSeparator + File tmpPropsFile = new File(javaHome, "lib" + File.separator + "tmapi.properties.tmp"); boolean restoreProps = false; if (propsFile.exists()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-06-18 18:42:08
|
Revision: 107 http://tmapi.svn.sourceforge.net/tmapi/?rev=107&view=rev Author: lheuer Date: 2009-06-18 18:42:06 +0000 (Thu, 18 Jun 2009) Log Message: ----------- Fixed Association getParent() test Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/TestAssociation.java Modified: trunk/src/test/java/org/tmapi/core/TestAssociation.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestAssociation.java 2009-05-22 13:54:19 UTC (rev 106) +++ trunk/src/test/java/org/tmapi/core/TestAssociation.java 2009-06-18 18:42:06 UTC (rev 107) @@ -34,7 +34,7 @@ final TopicMap parent = createTopicMap("http://www.tmapi.org/test/assoc/parent"); assertTrue("Expected new topic maps to be created with no associations", parent.getAssociations().isEmpty()); - final Association assoc = parent.createAssociation(createTopic()); + final Association assoc = parent.createAssociation(parent.createTopic()); assertEquals("Unexpected association parent after creation", parent, assoc.getParent()); assertEquals("Expected association set size to increment for topic map", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-05-22 14:22:19
|
Revision: 106 http://tmapi.svn.sourceforge.net/tmapi/?rev=106&view=rev Author: lheuer Date: 2009-05-22 13:54:19 +0000 (Fri, 22 May 2009) Log Message: ----------- Removed an erroneous slash from the RFC 3986 tests Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/TestLocator.java Modified: trunk/src/test/java/org/tmapi/core/TestLocator.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestLocator.java 2009-05-08 14:43:04 UTC (rev 105) +++ trunk/src/test/java/org/tmapi/core/TestLocator.java 2009-05-22 13:54:19 UTC (rev 106) @@ -72,7 +72,7 @@ {"/g", "http://a/g"}, // Original: //g -> http://g // Changed to avoid problems with trailing slash normailzations - {"//g/x", "http://g//x"}, + {"//g/x", "http://g/x"}, {"?y", "http://a/b/c/d;p?y"}, {"g?y", "http://a/b/c/g?y"}, {"#s", "http://a/b/c/d;p?q#s"}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-05-08 14:43:16
|
Revision: 105 http://tmapi.svn.sourceforge.net/tmapi/?rev=105&view=rev Author: lheuer Date: 2009-05-08 14:43:04 +0000 (Fri, 08 May 2009) Log Message: ----------- Fixed JavaDoc: Scope parameter is never null, an empty collection may represent the UCS, never null Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/Topic.java Modified: trunk/src/main/java/org/tmapi/core/Topic.java =================================================================== --- trunk/src/main/java/org/tmapi/core/Topic.java 2009-03-27 10:32:43 UTC (rev 104) +++ trunk/src/main/java/org/tmapi/core/Topic.java 2009-05-08 14:43:04 UTC (rev 105) @@ -171,8 +171,8 @@ * * @param type The name type; MUST NOT be <tt>null</tt>. * @param value The string value of the name; MUST NOT be <tt>null</tt>. - * @param scope A collection of themes or <tt>null</tt> if the name should - * be in the unconstrained scope. + * @param scope A collection of themes. The collection may be empty if the name + * should be in the unconstrained scope. * @return The newly created {@link Name}. * @throws ModelConstraintException If either the <tt>type</tt>, the * <tt>value</tt>, or <tt>scope</tt> is <tt>null</tt>. @@ -208,8 +208,8 @@ * </p> * * @param value The string value of the name; MUST NOT be <tt>null</tt>. - * @param scope A collection of themes or <tt>null</tt> if the name should - * be in the unconstrained scope. + * @param scope A collection of themes. The collection may be empty if the name + * should be in the unconstrained scope. * @return The newly created {@link Name}. * @throws ModelConstraintException If either the <tt>value</tt>, or * <tt>scope</tt> is <tt>null</tt>. @@ -278,7 +278,7 @@ * * @param type The occurrence type; MUST NOT be <tt>null</tt>. * @param value The string value of the occurrence. - * @param scope A collection of themes or <tt>null</tt> if the occurrence + * @param scope A collection of themes. The collection may be empty if the occurrence * should be in the unconstrained scope. * @return The newly created {@link Occurrence}. * @throws ModelConstraintException If either the <tt>type</tt>, the @@ -317,7 +317,7 @@ * * @param type The occurrence type; MUST NOT be <tt>null</tt>. * @param value A locator which represents an IRI. - * @param scope A collection of themes or <tt>null</tt> if the occurrence + * @param scope A collection of themes. The collection may be empty if the occurrence * should be in the unconstrained scope. * @return The newly created {@link Occurrence}. * @throws ModelConstraintException If either the <tt>type</tt>, the @@ -359,7 +359,7 @@ * @param type The occurrence type; MUST NOT be <tt>null</tt>. * @param value A lexical string representation of the value. * @param datatype A locator indicating the datatype of the <tt>value</tt>. - * @param scope A collection of themes or <tt>null</tt> if the occurrence + * @param scope A collection of themes. The collection may be empty if the occurrence * should be in the unconstrained scope. * @return The newly created {@link Occurrence}. * @throws ModelConstraintException If either the <tt>type</tt>, the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-03-27 10:32:50
|
Revision: 104 http://tmapi.svn.sourceforge.net/tmapi/?rev=104&view=rev Author: lheuer Date: 2009-03-27 10:32:43 +0000 (Fri, 27 Mar 2009) Log Message: ----------- Added more locator tests Modified Paths: -------------- trunk/src/test/java/org/tmapi/core/TestLocator.java Modified: trunk/src/test/java/org/tmapi/core/TestLocator.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestLocator.java 2009-03-18 21:45:46 UTC (rev 103) +++ trunk/src/test/java/org/tmapi/core/TestLocator.java 2009-03-27 10:32:43 UTC (rev 104) @@ -41,4 +41,74 @@ assertEquals(loc, loc3); } + public void testIllegalLocatorAddresses() { + final String[] ILLEGAL = {"", "#fragment"}; + for (String addr: ILLEGAL) { + try { + _tm.createLocator(addr); + fail("Expected an error TopicMap#createLocator() with the input '" + addr + "'"); + } + catch (MalformedIRIException ex) { + // noop. + } + try { + _sys.createLocator(addr); + fail("Expected an error TopicMapSystem#createLocator() with the input '" + addr + "'"); + } + catch (MalformedIRIException ex) { + // noop. + } + } + } + + /** + * Tests the examples from RFC 3986 -- 5.4.1. Normal Examples. + */ + public void test_RFC_3986__5_4_1_Normal_Examples() { + String[][] IRIS = new String[][] { + {"g:h", "g:h"}, + {"g", "http://a/b/c/g"}, + {"./g", "http://a/b/c/g"}, + {"/g", "http://a/g"}, + // Original: //g -> http://g + // Changed to avoid problems with trailing slash normailzations + {"//g/x", "http://g//x"}, + {"?y", "http://a/b/c/d;p?y"}, + {"g?y", "http://a/b/c/g?y"}, + {"#s", "http://a/b/c/d;p?q#s"}, + {"g#s", "http://a/b/c/g#s"}, + {"g?y#s", "http://a/b/c/g?y#s"}, + {";x", "http://a/b/c/;x"}, + {"g;x", "http://a/b/c/g;x"}, + {"g;x?y#s", "http://a/b/c/g;x?y#s"}, + {"", "http://a/b/c/d;p?q"}, + {".", "http://a/b/c/"}, + {"./", "http://a/b/c/"}, + {"..", "http://a/b/"}, + {"../", "http://a/b/"}, + {"../g", "http://a/b/g"}, + {"../..", "http://a/"}, + {"../../", "http://a/"}, + {"../../g", "http://a/g"} + }; + final String reference = "http://a/b/c/d;p?q"; + final Locator base = _tm.createLocator(reference); + assertEquals(reference, base.toExternalForm()); + for (int i=0; i<IRIS.length; i++) { + assertEquals("Unexpected result for " + IRIS[i][0], + IRIS[i][1], base.resolve(IRIS[i][0]).toExternalForm()); + } + } + + /** + * According to RFC 3986 an empty fragment / query has to be kept and + * must not be stripped away from the address. + */ + public void testNormizationPreserveEmpty() { + String ref = "http://www.semagia.com/x?"; + assertEquals("http://www.semagia.com/x?", _tm.createLocator(ref).toExternalForm()); + ref = "http://www.semagia.com/x#"; + assertEquals("http://www.semagia.com/x#", _tm.createLocator(ref).toExternalForm()); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2009-03-18 21:45:56
|
Revision: 103 http://tmapi.svn.sourceforge.net/tmapi/?rev=103&view=rev Author: joschmidt Date: 2009-03-18 21:45:46 +0000 (Wed, 18 Mar 2009) Log Message: ----------- Fixed TMDM link in the comments section of mergeIn(). Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/TopicMap.java Modified: trunk/src/main/java/org/tmapi/core/TopicMap.java =================================================================== --- trunk/src/main/java/org/tmapi/core/TopicMap.java 2009-03-16 21:41:32 UTC (rev 102) +++ trunk/src/main/java/org/tmapi/core/TopicMap.java 2009-03-18 21:45:46 UTC (rev 103) @@ -231,7 +231,7 @@ * <p> * All information items in <tt>other</tt> will be merged into this * topic map as defined by the - * <a href="http://www.isotopicmaps.org/sam/sam-model/#d0e1862">Topic Maps - Data Model (TMDM) merging rules</a>. + * <a href="http://www.isotopicmaps.org/sam/sam-model/#sect-merging">Topic Maps - Data Model (TMDM) merging rules</a>. * </p> * <p> * The merge process will not modify <tt>other</tt> in any way. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2009-03-16 21:41:51
|
Revision: 102 http://tmapi.svn.sourceforge.net/tmapi/?rev=102&view=rev Author: joschmidt Date: 2009-03-16 21:41:32 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Fixed typo in comments section of setPlayer(). Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/Role.java Modified: trunk/src/main/java/org/tmapi/core/Role.java =================================================================== --- trunk/src/main/java/org/tmapi/core/Role.java 2009-03-16 20:57:15 UTC (rev 101) +++ trunk/src/main/java/org/tmapi/core/Role.java 2009-03-16 21:41:32 UTC (rev 102) @@ -41,7 +41,7 @@ /** * Sets the role player. * - * Any previous role player will be overriden by <tt>player</tt>. + * Any previous role player will be overridden by <tt>player</tt>. * * @param player The topic which should play this role. * @throws ModelConstraintException If the <tt>player</tt> is <tt>null</tt>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2009-03-16 20:57:31
|
Revision: 101 http://tmapi.svn.sourceforge.net/tmapi/?rev=101&view=rev Author: joschmidt Date: 2009-03-16 20:57:15 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Fixed typo in comments section of getTopicMap(). Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/Construct.java Modified: trunk/src/main/java/org/tmapi/core/Construct.java =================================================================== --- trunk/src/main/java/org/tmapi/core/Construct.java 2009-02-07 10:36:48 UTC (rev 100) +++ trunk/src/main/java/org/tmapi/core/Construct.java 2009-03-16 20:57:15 UTC (rev 101) @@ -40,7 +40,7 @@ * * A {@link TopicMap} instance returns itself. * - * @return The topic map instance to which this constructs belongs. + * @return The topic map instance to which this construct belongs. */ public TopicMap getTopicMap(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-02-07 10:36:54
|
Revision: 100 http://tmapi.svn.sourceforge.net/tmapi/?rev=100&view=rev Author: lheuer Date: 2009-02-07 10:36:48 +0000 (Sat, 07 Feb 2009) Log Message: ----------- Updated build scripts Modified Paths: -------------- trunk/build.properties trunk/build.xml Modified: trunk/build.properties =================================================================== --- trunk/build.properties 2009-02-06 16:33:02 UTC (rev 99) +++ trunk/build.properties 2009-02-07 10:36:48 UTC (rev 100) @@ -1,5 +1,5 @@ version=2.0 -version_suffix=a1 +version_suffix=a2 debug=off optimize=on Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-02-06 16:33:02 UTC (rev 99) +++ trunk/build.xml 2009-02-07 10:36:48 UTC (rev 100) @@ -23,7 +23,7 @@ <property name="dir.test" value="${basedir}/src/test/java"/> <property name="dir.lib" value="${basedir}/lib"/> - <property name="lib.junit" value="${dir.lib}/junit-4.4.jar"/> + <property name="lib.junit" value="${dir.lib}/junit-4.5.jar"/> <target name="help"> <echo message="--------------------"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-02-06 16:33:07
|
Revision: 99 http://tmapi.svn.sourceforge.net/tmapi/?rev=99&view=rev Author: lheuer Date: 2009-02-06 16:33:02 +0000 (Fri, 06 Feb 2009) Log Message: ----------- CHANGES mentions JavaDoc updates Modified Paths: -------------- trunk/CHANGES.txt Modified: trunk/CHANGES.txt =================================================================== --- trunk/CHANGES.txt 2009-02-06 16:31:49 UTC (rev 98) +++ trunk/CHANGES.txt 2009-02-06 16:33:02 UTC (rev 99) @@ -7,6 +7,7 @@ * Introduced MalformedIRIException * Renamed ModelConstraintException.getSender() to getReporter() * More test cases +* Improved Java Docs TMAPI 2.0 alpha1 - 2008-08-26 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-02-06 16:31:53
|
Revision: 98 http://tmapi.svn.sourceforge.net/tmapi/?rev=98&view=rev Author: lheuer Date: 2009-02-06 16:31:49 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Updated CHANGES.txt Modified Paths: -------------- trunk/CHANGES.txt Modified: trunk/CHANGES.txt =================================================================== --- trunk/CHANGES.txt 2009-02-06 16:25:36 UTC (rev 97) +++ trunk/CHANGES.txt 2009-02-06 16:31:49 UTC (rev 98) @@ -2,6 +2,13 @@ TMAPI Changes ============= +TMAPI 2.0 alpha2 - 2009-02-xx +----------------------------- +* Introduced MalformedIRIException +* Renamed ModelConstraintException.getSender() to getReporter() +* More test cases + + TMAPI 2.0 alpha1 - 2008-08-26 ----------------------------- * Initial release with the new code base This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2009-02-06 16:25:42
|
Revision: 97 http://tmapi.svn.sourceforge.net/tmapi/?rev=97&view=rev Author: lheuer Date: 2009-02-06 16:25:36 +0000 (Fri, 06 Feb 2009) Log Message: ----------- - Added MalformedIRIException (acc. to vote November 2008) - Changed ModelConstraintException and IdentityConstraintException: getSender() -> getReporter(), disallow null - Updated test cases Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/IdentityConstraintException.java trunk/src/main/java/org/tmapi/core/ModelConstraintException.java trunk/src/main/java/org/tmapi/core/TopicInUseException.java trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java trunk/src/test/java/org/tmapi/core/TestItemIdentifierConstraint.java trunk/src/test/java/org/tmapi/core/TestReifiable.java trunk/src/test/java/org/tmapi/core/TestTopicRemovableConstraint.java Added Paths: ----------- trunk/src/main/java/org/tmapi/core/MalformedIRIException.java Modified: trunk/src/main/java/org/tmapi/core/IdentityConstraintException.java =================================================================== --- trunk/src/main/java/org/tmapi/core/IdentityConstraintException.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/main/java/org/tmapi/core/IdentityConstraintException.java 2009-02-06 16:25:36 UTC (rev 97) @@ -34,21 +34,23 @@ * Creates a new <tt>IdentityConstraintException</tt> with the specified * message. * - * @param sender The construct to which the identity should have been assigned to. + * @param reporter The construct to which the identity should have been + * assigned to. In case a factory method has thrown this + * exception, the construct which provides the factory method. * @param existing The construct which has the same identity. * @param locator The locator representing the identity. * @param msg The detail message. */ - public IdentityConstraintException(Construct sender, Construct existing, + public IdentityConstraintException(Construct reporter, Construct existing, Locator locator, String msg) { - super(sender, msg); + super(reporter, msg); _existing = existing; _locator = locator; } /** - * Returns the {@link Construct} which existed already with the - * same identity. + * Returns the {@link Construct} which already has the identity represented + * by the locator {@link #getLocator()}. * * @return The existing construct. */ @@ -57,9 +59,9 @@ } /** - * Returns the locator that caused the exception. + * Returns the locator representing the identity that caused the exception. * - * @return The locator. + * @return A locator representing the identity which has caused the exception. */ public Locator getLocator() { return _locator; Added: trunk/src/main/java/org/tmapi/core/MalformedIRIException.java =================================================================== --- trunk/src/main/java/org/tmapi/core/MalformedIRIException.java (rev 0) +++ trunk/src/main/java/org/tmapi/core/MalformedIRIException.java 2009-02-06 16:25:36 UTC (rev 97) @@ -0,0 +1,36 @@ +/* + * The Topic Maps API (TMAPI) was created collectively by + * the membership of the tmapi-discuss mailing list + * <http://lists.sourceforge.net/mailman/listinfo/tmapi-discuss>, + * is hereby released into the public domain; and comes with + * NO WARRANTY. + * + * No one owns TMAPI: you may use it freely in both commercial and + * non-commercial applications, bundle it with your software + * distribution, include it on a CD-ROM, list the source code in a + * book, mirror the documentation at your own web site, or use it in + * any other way you see fit. + */ +package org.tmapi.core; + +/** + * Thrown to indicate that a malformed IRI has occurred. + * + * @author TMAPI <a href="http://www.tmapi.org">tmapi.org</a> + * @version $Rev:$ - $Date:$ + */ +public class MalformedIRIException extends TMAPIRuntimeException { + + private static final long serialVersionUID = 2126925008251115110L; + + /** + * Constructs a <tt>MalformedIRIException</tt> with the specified detail + * message. + * + * @param message The detail message. + */ + public MalformedIRIException(String message) { + super(message); + } + +} Property changes on: trunk/src/main/java/org/tmapi/core/MalformedIRIException.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Modified: trunk/src/main/java/org/tmapi/core/ModelConstraintException.java =================================================================== --- trunk/src/main/java/org/tmapi/core/ModelConstraintException.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/main/java/org/tmapi/core/ModelConstraintException.java 2009-02-06 16:25:36 UTC (rev 97) @@ -23,31 +23,29 @@ */ public class ModelConstraintException extends TMAPIRuntimeException { - private static final long serialVersionUID = -7515653646384503071L; + private static final long serialVersionUID = 7038106692343162395L; - private final Construct _sender; + private final Construct _reporter; /** * Creates a new <tt>ModelConstraintException</tt> with the specified * message. * - * @param sender The construct which should have been modified. + * @param reporter The construct which has thrown this exception. * @param msg The detail message. */ - public ModelConstraintException(Construct sender, String msg) { + public ModelConstraintException(Construct reporter, String msg) { super(msg); - _sender = sender; + _reporter = reporter; } /** * Returns the {@link Construct} which has thrown the exception. * - * @return The construct which has thrown the exception or <tt>null</tt> - * if no appropriate construct is available (i.e. in the factory - * methods). + * @return The construct which has thrown the exception. */ - public Construct getSender() { - return _sender; + public Construct getReporter() { + return _reporter; } } Modified: trunk/src/main/java/org/tmapi/core/TopicInUseException.java =================================================================== --- trunk/src/main/java/org/tmapi/core/TopicInUseException.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/main/java/org/tmapi/core/TopicInUseException.java 2009-02-06 16:25:36 UTC (rev 97) @@ -22,26 +22,25 @@ */ public class TopicInUseException extends ModelConstraintException { - private static final long serialVersionUID = 6118893892630188394L; + private static final long serialVersionUID = 486617548358575845L; - /** * Creates a new <tt>TopicInUseException</tt> with the specified * message. * - * @param sender The topic which is not removable. + * @param topic The topic which is not removable. * @param msg The detail message. */ - public TopicInUseException(Topic sender, String msg) { - super(sender, msg); + public TopicInUseException(Topic topic, String msg) { + super(topic, msg); } /* (non-Javadoc) - * @see org.tmapi.core.ModelConstraintException#getSender() + * @see org.tmapi.core.ModelConstraintException#getReporter() */ @Override - public Topic getSender() { - return (Topic) super.getSender(); + public Topic getReporter() { + return (Topic) super.getReporter(); } } Modified: trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java =================================================================== --- trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/test/java/org/tmapi/core/AbstractTestDatatypeAware.java 2009-02-06 16:25:36 UTC (rev 97) @@ -155,9 +155,8 @@ final DatatypeAware dt = getDatatypeAware(); dt.setValue(value); final String val = dt.getValue(); - if (!"10".equals(val) && !"10.0".equals(val)) { - fail("Expected either '10' or the canonical representation '10.0'"); - } + assertTrue("Expected either '10' or the canonical representation '10.0'", + "10".equals(val) || "10.0".equals(val)); assertEquals(_xsdDecimal, dt.getDatatype()); assertEquals(value, dt.decimalValue()); assertEquals(BigInteger.TEN, dt.integerValue()); @@ -171,9 +170,8 @@ final DatatypeAware dt = getDatatypeAware(); dt.setValue(value.toString(), _xsdDecimal); final String val = dt.getValue(); - if (!"10".equals(val) && !"10.0".equals(val)) { - fail("Expected either '10' or the canonical representation '10.0'"); - } + assertTrue("Expected either '10' or the canonical representation '10.0'", + "10".equals(val) || "10.0".equals(val)); assertEquals(_xsdDecimal, dt.getDatatype()); if (!value.equals(dt.decimalValue()) && !new BigDecimal("10.0").equals(dt.decimalValue())) { Modified: trunk/src/test/java/org/tmapi/core/TestItemIdentifierConstraint.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestItemIdentifierConstraint.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/test/java/org/tmapi/core/TestItemIdentifierConstraint.java 2009-02-06 16:25:36 UTC (rev 97) @@ -25,7 +25,7 @@ * * @author <a href="http://tmapi.org/">The TMAPI Project</a> * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev:$ - $Date:$ + * @version $Rev$ - $Date$ */ public class TestItemIdentifierConstraint extends TMAPITestCase { @@ -50,7 +50,9 @@ fail("Topic Maps constructs with the same item identifier are not allowed"); } catch (IdentityConstraintException ex) { - // noop + assertEquals(tmo, ex.getReporter()); + assertEquals(assoc, ex.getExisting()); + assertEquals(iid, ex.getLocator()); } tmo.addItemIdentifier(iid2); assertTrue(tmo.getItemIdentifiers().contains(iid2)); @@ -87,7 +89,9 @@ topic2.addItemIdentifier(iid); } catch (IdentityConstraintException ex) { - // noop. + assertEquals(topic2, ex.getReporter()); + assertEquals(topic, ex.getExisting()); + assertEquals(iid, ex.getLocator()); } topic.removeItemIdentifier(iid); assertFalse(topic.getItemIdentifiers().contains(iid)); Modified: trunk/src/test/java/org/tmapi/core/TestReifiable.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestReifiable.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/test/java/org/tmapi/core/TestReifiable.java 2009-02-06 16:25:36 UTC (rev 97) @@ -73,7 +73,7 @@ fail("The reifier reifies already another construct"); } catch (ModelConstraintException ex) { - assertEquals(reifiable, ex.getSender()); + assertEquals(reifiable, ex.getReporter()); } otherReifiable.setReifier(null); assertNull("Reifier property should be null", otherReifiable.getReifier()); Modified: trunk/src/test/java/org/tmapi/core/TestTopicRemovableConstraint.java =================================================================== --- trunk/src/test/java/org/tmapi/core/TestTopicRemovableConstraint.java 2009-01-11 20:30:19 UTC (rev 96) +++ trunk/src/test/java/org/tmapi/core/TestTopicRemovableConstraint.java 2009-02-06 16:25:36 UTC (rev 97) @@ -45,7 +45,7 @@ fail("The topic is used as type"); } catch (TopicInUseException ex) { - assertEquals(topic, ex.getSender()); + assertEquals(topic, ex.getReporter()); } assertEquals(topicCount+1, _tm.getTopics().size()); typed.setType(oldType); @@ -69,7 +69,7 @@ fail("The topic is used as theme"); } catch (TopicInUseException ex) { - assertEquals(topic, ex.getSender()); + assertEquals(topic, ex.getReporter()); } assertEquals(topicCount+1, _tm.getTopics().size()); scoped.removeTheme(topic); @@ -94,7 +94,7 @@ fail("The topic is used as reifier"); } catch (TopicInUseException ex) { - assertEquals(topic, ex.getSender()); + assertEquals(topic, ex.getReporter()); } assertEquals(topicCount+1, _tm.getTopics().size()); reifiable.setReifier(null); @@ -214,7 +214,7 @@ fail("The topic is used as topic type"); } catch (TopicInUseException ex) { - assertEquals(topic, ex.getSender()); + assertEquals(topic, ex.getReporter()); } assertEquals(2, _tm.getTopics().size()); topic2.removeType(topic); @@ -242,7 +242,7 @@ fail("The topic is used as player"); } catch (TopicInUseException ex) { - assertEquals(topic, ex.getSender()); + assertEquals(topic, ex.getReporter()); } role.setPlayer(createTopic()); assertEquals(4, _tm.getTopics().size()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2009-01-11 20:30:24
|
Revision: 96 http://tmapi.svn.sourceforge.net/tmapi/?rev=96&view=rev Author: joschmidt Date: 2009-01-11 20:30:19 +0000 (Sun, 11 Jan 2009) Log Message: ----------- getSender(): fixed typo in comments Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/ModelConstraintException.java Modified: trunk/src/main/java/org/tmapi/core/ModelConstraintException.java =================================================================== --- trunk/src/main/java/org/tmapi/core/ModelConstraintException.java 2008-12-05 20:50:13 UTC (rev 95) +++ trunk/src/main/java/org/tmapi/core/ModelConstraintException.java 2009-01-11 20:30:19 UTC (rev 96) @@ -43,7 +43,7 @@ * Returns the {@link Construct} which has thrown the exception. * * @return The construct which has thrown the exception or <tt>null</tt> - * if no appropiate construct is available (i.e. in the factory + * if no appropriate construct is available (i.e. in the factory * methods). */ public Construct getSender() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2008-12-05 20:50:25
|
Revision: 95 http://tmapi.svn.sourceforge.net/tmapi/?rev=95&view=rev Author: joschmidt Date: 2008-12-05 20:50:13 +0000 (Fri, 05 Dec 2008) Log Message: ----------- createLocator(): reduced docs to @see org.tmapi.core.TopicMap#createLocator(String reference) Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/TopicMapSystem.java Modified: trunk/src/main/java/org/tmapi/core/TopicMapSystem.java =================================================================== --- trunk/src/main/java/org/tmapi/core/TopicMapSystem.java 2008-11-25 20:23:11 UTC (rev 94) +++ trunk/src/main/java/org/tmapi/core/TopicMapSystem.java 2008-12-05 20:50:13 UTC (rev 95) @@ -75,14 +75,7 @@ public Set<Locator> getLocators(); /** - * Returns a {@link Locator} instance representing the specified IRI - * <tt>reference</tt>. - * - * The specified IRI <tt>reference</tt> is assumed to be absolute. - * - * @param reference A string which uses the IRI notation. - * @return A {@link Locator} representing the IRI <tt>reference</tt>. - * @throws IllegalArgumentException If <tt>reference</tt> is <tt>null</tt>. + * @see org.tmapi.core.TopicMap#createLocator(String reference) */ public Locator createLocator(String reference); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2008-11-25 20:23:15
|
Revision: 94 http://tmapi.svn.sourceforge.net/tmapi/?rev=94&view=rev Author: joschmidt Date: 2008-11-25 20:23:11 +0000 (Tue, 25 Nov 2008) Log Message: ----------- Updated docs section regarding NULL handling in createLocator() Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/TopicMapSystem.java Modified: trunk/src/main/java/org/tmapi/core/TopicMapSystem.java =================================================================== --- trunk/src/main/java/org/tmapi/core/TopicMapSystem.java 2008-11-25 20:21:44 UTC (rev 93) +++ trunk/src/main/java/org/tmapi/core/TopicMapSystem.java 2008-11-25 20:23:11 UTC (rev 94) @@ -82,6 +82,7 @@ * * @param reference A string which uses the IRI notation. * @return A {@link Locator} representing the IRI <tt>reference</tt>. + * @throws IllegalArgumentException If <tt>reference</tt> is <tt>null</tt>. */ public Locator createLocator(String reference); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2008-11-25 20:21:50
|
Revision: 93 http://tmapi.svn.sourceforge.net/tmapi/?rev=93&view=rev Author: joschmidt Date: 2008-11-25 20:21:44 +0000 (Tue, 25 Nov 2008) Log Message: ----------- Updated docs section regarding NULL handling in mergeIn() and createLocator() Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/TopicMap.java Modified: trunk/src/main/java/org/tmapi/core/TopicMap.java =================================================================== --- trunk/src/main/java/org/tmapi/core/TopicMap.java 2008-11-25 20:20:14 UTC (rev 92) +++ trunk/src/main/java/org/tmapi/core/TopicMap.java 2008-11-25 20:21:44 UTC (rev 93) @@ -104,6 +104,7 @@ * * @param reference A string which uses the IRI notation. * @return A {@link Locator} representing the IRI <tt>reference</tt>. + * @throws IllegalArgumentException If <tt>reference</tt> is <tt>null</tt>. */ public Locator createLocator(String reference); @@ -239,7 +240,9 @@ * If <tt>this.equals(other)</tt> no changes are made to the topic map. * </p> * - * @param other The topic map to be merged with this topic map instance. + * @param other The topic map to be merged with this topic map instance; + * must not be <tt>null</tt>. + * @throws ModelConstraintException If <tt>other</tt> is <tt>null</tt>. */ public void mergeIn(TopicMap other); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jos...@us...> - 2008-11-25 20:20:20
|
Revision: 92 http://tmapi.svn.sourceforge.net/tmapi/?rev=92&view=rev Author: joschmidt Date: 2008-11-25 20:20:14 +0000 (Tue, 25 Nov 2008) Log Message: ----------- Updated docs section regarding NULL handling in addSubjectIdentifier(), addSubjectLocator(), addType(), mergeIn(), removeSubjectIdentifier(), removeSubjectLocator(), and removeType() Modified Paths: -------------- trunk/src/main/java/org/tmapi/core/Topic.java Modified: trunk/src/main/java/org/tmapi/core/Topic.java =================================================================== --- trunk/src/main/java/org/tmapi/core/Topic.java 2008-11-25 20:16:45 UTC (rev 91) +++ trunk/src/main/java/org/tmapi/core/Topic.java 2008-11-25 20:20:14 UTC (rev 92) @@ -70,13 +70,15 @@ * @throws IdentityConstraintException If the feature "automerge" is * disabled and adding the subject identifier would make this * topic represent the same subject as another topic. + * @throws ModelConstraintException If the subject identifier is <tt>null</tt>. */ public void addSubjectIdentifier(Locator subjectIdentifier); /** * Removes a subject identifier from this topic. * - * @param subjectIdentifier The subject identifier to be removed. + * @param subjectIdentifier The subject identifier to be removed from this topic, + * if present (<tt>null</tt> is ignored). */ public void removeSubjectIdentifier(Locator subjectIdentifier); @@ -103,13 +105,15 @@ * @throws IdentityConstraintException If the feature "automerge" is * disabled and adding the subject locator would make this * topic represent the same subject as another topic. + * @throws ModelConstraintException If the subject locator is <tt>null</tt>. */ public void addSubjectLocator(Locator subjectLocator); /** * Removes a subject locator from this topic. * - * @param subjectLocator The subject locator to be removed. + * @param subjectLocator The subject locator to be removed from this topic, + * if present (<tt>null</tt> is ignored). */ public void removeSubjectLocator(Locator subjectLocator); @@ -450,14 +454,15 @@ * * @param type The type of which this topic should become an instance of; * must not be <tt>null</tt>. - * @throws ModelConstraintException If the <tt>type</tt> is <tt>null</tt>. + * @throws ModelConstraintException If the type is <tt>null</tt>. */ public void addType(Topic type); /** * Removes a type from this topic. * - * @param type The type to remove. + * @param type The type to be removed from this topic, if present + * (<tt>null</tt> is ignored). */ public void removeType(Topic type); @@ -486,7 +491,8 @@ * as this topic! * </p> * - * @param other The topic to be merged into this topic. + * @param other The topic to be merged into this topic; must not be <tt>null</tt>. + * @throws ModelConstraintException If <tt>other</tt> is <tt>null</tt>. */ public void mergeIn(Topic other); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |