You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
(48) |
May
(21) |
Jun
(3) |
Jul
(10) |
Aug
(66) |
Sep
(11) |
Oct
(7) |
Nov
(73) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(3) |
Feb
(17) |
Mar
(19) |
Apr
(1) |
May
(4) |
Jun
|
Jul
(43) |
Aug
(18) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
|
2010 |
Jan
(3) |
Feb
(7) |
Mar
(21) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(6) |
Aug
(6) |
Sep
(7) |
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <lh...@us...> - 2008-10-21 16:49:51
|
Revision: 169 http://tinytim.svn.sourceforge.net/tinytim/?rev=169&view=rev Author: lheuer Date: 2008-10-21 16:49:49 +0000 (Tue, 21 Oct 2008) Log Message: ----------- - Next try to commit the Console.java - DOES NOT work with tinyTiM trunk Modified Paths: -------------- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java Modified: tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-10 12:31:22 UTC (rev 168) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-21 16:49:49 UTC (rev 169) @@ -269,4 +269,35 @@ private class ReadCommand extends AbstractCommand { public ReadCommand() { - super("read <source: \ No newline at end of file + super("read <source:url> into <target:url> [using <syntax:identifier>]", + "Reads the content from a source into a local topic map"); + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#execute(java.lang.String[], java.io.PrintStream) + */ + public void execute(String[] args) { + _println("Not implemented yet. Sorry."); + } + + } + + /** + * Serializes a topic map. + */ + private class WriteCommand extends AbstractCommand { + + public WriteCommand() { + super("write <source:url> to <target:url> [<syntax:identifier>]", + "Exports a topic map"); + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#execute(java.lang.String[]) + */ + public void execute(String[] args) { + _println("Not implemented yet. Sorry."); + } + + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-10-10 12:31:31
|
Revision: 168 http://tinytim.svn.sourceforge.net/tinytim/?rev=168&view=rev Author: lheuer Date: 2008-10-10 12:31:22 +0000 (Fri, 10 Oct 2008) Log Message: ----------- - Removed APPENDIX from Apache License - Changed CHANGES.txt date to a more realistic one :( Modified Paths: -------------- tinytim/trunk/CHANGES.txt tinytim/trunk/LICENSE.txt tinytim-mio/trunk/CHANGES.txt tinytim-mio/trunk/LICENSE.txt Added Paths: ----------- tinytim-console/trunk/LICENSE.txt Modified: tinytim/trunk/CHANGES.txt =================================================================== --- tinytim/trunk/CHANGES.txt 2008-10-07 12:59:36 UTC (rev 167) +++ tinytim/trunk/CHANGES.txt 2008-10-10 12:31:22 UTC (rev 168) @@ -2,7 +2,7 @@ Changes Log =========== -2.0.0 a3 (xx.09.2008) +2.0.0 a3 (xx.10.2008) --------------------- * Moved to Apache License 2.0 Modified: tinytim/trunk/LICENSE.txt =================================================================== --- tinytim/trunk/LICENSE.txt 2008-10-07 12:59:36 UTC (rev 167) +++ tinytim/trunk/LICENSE.txt 2008-10-10 12:31:22 UTC (rev 168) @@ -175,28 +175,3 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. Added: tinytim-console/trunk/LICENSE.txt =================================================================== --- tinytim-console/trunk/LICENSE.txt (rev 0) +++ tinytim-console/trunk/LICENSE.txt 2008-10-10 12:31:22 UTC (rev 168) @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS Modified: tinytim-mio/trunk/CHANGES.txt =================================================================== --- tinytim-mio/trunk/CHANGES.txt 2008-10-07 12:59:36 UTC (rev 167) +++ tinytim-mio/trunk/CHANGES.txt 2008-10-10 12:31:22 UTC (rev 168) @@ -2,7 +2,7 @@ Changes Log =========== -2.0.0 a1 (xx.09.2008) +2.0.0 a1 (xx.10.2008) ------------------------- * Adapted MIO to tinyTiM 2.0.0 * Changed license to Apache License 2.0 Modified: tinytim-mio/trunk/LICENSE.txt =================================================================== --- tinytim-mio/trunk/LICENSE.txt 2008-10-07 12:59:36 UTC (rev 167) +++ tinytim-mio/trunk/LICENSE.txt 2008-10-10 12:31:22 UTC (rev 168) @@ -175,28 +175,3 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Markus U. <mar...@gm...> - 2008-10-09 22:38:20
|
Hi, It seems that you forgot to brand the Apache License 2.0 template (this also applies to the copy for tinytim-mio). The files mentioned below were taken from the respective repositories/homepage: $ diff -b LICENSE.log4j LICENSE.tinytim20 190c190 < Copyright 1999-2005 The Apache Software Foundation --- > Copyright [yyyy] [name of copyright owner] Ad astra, Markus 2008/9/18 <lh...@us...> > Revision: 161 > http://tinytim.svn.sourceforge.net/tinytim/?rev=161&view=rev > Author: lheuer > Date: 2008-09-18 13:02:34 +0000 (Thu, 18 Sep 2008) > > Log Message: > ----------- > - Moved to Apache License 2.0 [...] |
From: <lh...@us...> - 2008-10-07 12:59:44
|
Revision: 167 http://tinytim.svn.sourceforge.net/tinytim/?rev=167&view=rev Author: lheuer Date: 2008-10-07 12:59:36 +0000 (Tue, 07 Oct 2008) Log Message: ----------- Small mods, still unusable with the current tinyTiM trunk Modified Paths: -------------- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java Modified: tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-06 15:12:42 UTC (rev 166) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-07 12:59:36 UTC (rev 167) @@ -39,9 +39,9 @@ /** * Console to issue commands against a {@link org.tmapi.core.TopicMapSystem}. * <p> - * Even if the implementation tries to use TMAPI as much as possible, the console - * needs tinyTiM and is not compatible to other TMAPI implementations. Adapting the code - * to pure TMAPI should be possible with some effort, though. + * Even if the implementation tries to use TMAPI as much as possible, the + * console needs tinyTiM and is not compatible to other TMAPI implementations. + * Adapting the code to pure TMAPI should be possible with some effort, though. * </p> * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> @@ -88,10 +88,10 @@ } private void _registerCommands() { - ICommand cmd = new CreateCommand(); - _registerCommand(cmd); - cmd = new ShowCommand(); - _registerCommand(cmd); + _registerCommand(new CreateCommand()); + _registerCommand(new ShowCommand()); + _registerCommand(new ReadCommand()); + _registerCommand(new WriteCommand()); } private void _registerCommand(ICommand cmd) { @@ -110,6 +110,7 @@ exit = _executeCommand(command); } _println("Thanks for using tinyTiM."); + _println(); _println("Bye."); } @@ -169,8 +170,8 @@ _print(_VERSION); _print(" using tinyTiM v"); _println(Version.RELEASE); - _println("Commands end with a '.'"); - _println("Type 'help.' for more information"); + _println("Commands end with a '.'."); + _println("Type 'help.' for more information. Use 'exit.' to leave the console."); } private void _print(String s) { @@ -219,12 +220,16 @@ _printError("Too many arguments"); return; } + else if (args.length < 2) { + _printError("No IRI specified"); + return; + } String iri = args[1]; try { _tmSys.createTopicMap(iri); } catch (TopicMapExistsException ex) { - _printError("Topic map exists"); + _printError("A topic map with the IRI <" + iri + "> exists"); return; } _println("<" + iri + "> created."); @@ -232,26 +237,6 @@ } /** - * Deserializes a topic map and adds the content to a local topic map. - */ - private class ReadCommand extends AbstractCommand { - - public ReadCommand() { - super("read <source:url> into <target:url> [using <syntax:identifier>]", - "Reads the content from a source into a local topic map"); - } - - /* (non-Javadoc) - * @see org.tinytim.console.ICommand#execute(java.lang.String[], java.io.PrintStream) - */ - public void execute(String[] args) { - // TODO Auto-generated method stub - - } - - } - - /** * Shows an overview about the topic maps available in the system. */ private class ShowCommand extends AbstractCommand { @@ -279,22 +264,9 @@ } /** - * Serializes a topic map. + * Deserializes a topic map and adds the content to a local topic map. */ - private class WriteCommand extends AbstractCommand { + private class ReadCommand extends AbstractCommand { - public WriteCommand() { - super("write <source:url> to <target:url> [<syntax:identifier>]", - "Exports a topic map"); - } - - /* (non-Javadoc) - * @see org.tinytim.console.ICommand#execute(java.lang.String[]) - */ - public void execute(String[] args) { - // TODO Auto-generated method stub - - } - - } -} + public ReadCommand() { + super("read <source: \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-10-06 15:13:48
|
Revision: 166 http://tinytim.svn.sourceforge.net/tinytim/?rev=166&view=rev Author: lheuer Date: 2008-10-06 15:12:42 +0000 (Mon, 06 Oct 2008) Log Message: ----------- JavaDocs Modified Paths: -------------- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java Modified: tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-06 13:12:10 UTC (rev 165) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-06 15:12:42 UTC (rev 166) @@ -37,10 +37,15 @@ import org.tmapi.core.TopicMapSystemFactory; /** + * Console to issue commands against a {@link org.tmapi.core.TopicMapSystem}. + * <p> + * Even if the implementation tries to use TMAPI as much as possible, the console + * needs tinyTiM and is not compatible to other TMAPI implementations. Adapting the code + * to pure TMAPI should be possible with some effort, though. + * </p> * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev:$ - $Date:$ + * @version $Rev$ - $Date$ */ public class Console { @@ -143,7 +148,6 @@ _print(">>> "); String line = _reader.readLine(); if (line == null) { - // EOF return null; } StringBuilder buf = new StringBuilder(256); @@ -154,7 +158,7 @@ buf.append('\n') .append(line); } - // Remove closing dot + // Remove command delimiter buf.setLength(buf.length() - 1); return buf.toString().trim(); } @@ -200,6 +204,9 @@ } + /** + * Creates a new topic map with the specified locator + */ private class CreateCommand extends AbstractCommand { public CreateCommand() { @@ -224,9 +231,11 @@ } } + /** + * Deserializes a topic map and adds the content to a local topic map. + */ + private class ReadCommand extends AbstractCommand { - public class ReadCommand extends AbstractCommand { - public ReadCommand() { super("read <source:url> into <target:url> [using <syntax:identifier>]", "Reads the content from a source into a local topic map"); @@ -242,7 +251,10 @@ } - public class ShowCommand extends AbstractCommand { + /** + * Shows an overview about the topic maps available in the system. + */ + private class ShowCommand extends AbstractCommand { public ShowCommand() { super("show", "Returns a list of topic maps"); @@ -266,6 +278,9 @@ } } + /** + * Serializes a topic map. + */ private class WriteCommand extends AbstractCommand { public WriteCommand() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-10-06 14:33:13
|
Revision: 165 http://tinytim.svn.sourceforge.net/tinytim/?rev=165&view=rev Author: lheuer Date: 2008-10-06 13:12:10 +0000 (Mon, 06 Oct 2008) Log Message: ----------- Project layout for the NP Atom-based protocol to exchange topic maps. Added Paths: ----------- tinytim-ws-atomico/ tinytim-ws-atomico/branches/ tinytim-ws-atomico/tags/ tinytim-ws-atomico/trunk/ tinytim-ws-atomico/trunk/src/ tinytim-ws-atomico/trunk/src/main/ tinytim-ws-atomico/trunk/src/main/java/ tinytim-ws-atomico/trunk/src/main/java/org/ tinytim-ws-atomico/trunk/src/main/java/org/tinytim/ tinytim-ws-atomico/trunk/src/main/java/org/tinytim/ws/ tinytim-ws-atomico/trunk/src/main/java/org/tinytim/ws/atomico/ tinytim-ws-atomico/trunk/src/test/ tinytim-ws-atomico/trunk/src/test/java/ tinytim-ws-atomico/trunk/src/test/java/org/ tinytim-ws-atomico/trunk/src/test/java/org/tinytim/ tinytim-ws-atomico/trunk/src/test/java/org/tinytim/ws/ tinytim-ws-atomico/trunk/src/test/java/org/tinytim/ws/atomico/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-10-06 13:03:24
|
Revision: 164 http://tinytim.svn.sourceforge.net/tinytim/?rev=164&view=rev Author: lheuer Date: 2008-10-06 13:00:41 +0000 (Mon, 06 Oct 2008) Log Message: ----------- Initial import of the console (does not work, though) Added Paths: ----------- tinytim-console/ tinytim-console/branches/ tinytim-console/tags/ tinytim-console/trunk/ tinytim-console/trunk/src/ tinytim-console/trunk/src/main/ tinytim-console/trunk/src/main/java/ tinytim-console/trunk/src/main/java/org/ tinytim-console/trunk/src/main/java/org/tinytim/ tinytim-console/trunk/src/main/java/org/tinytim/console/ tinytim-console/trunk/src/main/java/org/tinytim/console/AbstractCommand.java tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java tinytim-console/trunk/src/main/java/org/tinytim/console/ICommand.java Added: tinytim-console/trunk/src/main/java/org/tinytim/console/AbstractCommand.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/AbstractCommand.java (rev 0) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/AbstractCommand.java 2008-10-06 13:00:41 UTC (rev 164) @@ -0,0 +1,63 @@ +/* + * Copyright 2008 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.tinytim.console; + + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +abstract class AbstractCommand implements ICommand { + + protected final String _syntax; + protected final String _name; + protected final String _help; + + protected AbstractCommand(String syntax) { + this(syntax, null); + } + + protected AbstractCommand(String syntax, String help) { + _syntax = syntax; + String[] tmp = syntax.split(" "); + _name = tmp[0]; + _help = help == null ? "" : help; + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#getHelp() + */ + public String getHelp() { + return _help; + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#getName() + */ + public String getName() { + return _name; + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#getSytax() + */ + public String getSytax() { + return _syntax; + } + +} Property changes on: tinytim-console/trunk/src/main/java/org/tinytim/console/AbstractCommand.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java (rev 0) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java 2008-10-06 13:00:41 UTC (rev 164) @@ -0,0 +1,285 @@ +/* + * Copyright 2008 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.tinytim.console; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.tinytim.Version; +import org.tmapi.core.Locator; +import org.tmapi.core.TMAPIException; +import org.tmapi.core.TopicMapExistsException; +import org.tmapi.core.TopicMapSystem; +import org.tmapi.core.TopicMapSystemFactory; + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +public class Console { + + private static final Pattern _CL_PATTERN = Pattern.compile("\"([^\"]*)\"|(\\S+)"); + + private static final String _VERSION = "0.1.0"; + + private final TopicMapSystem _tmSys; + private Map<String, ICommand> _commands; + + private InputStream _in = System.in; + private PrintStream _out = System.out; + private BufferedReader _reader; + + public static void main(String[] args) { + Console con = null; + try { + con = new Console(); + con.start(); + } + catch (TMAPIException ex) { + throw new RuntimeException(ex); + } + catch (IOException ex) { + throw new RuntimeException(ex); + } + } + + private Console() throws TMAPIException { + this(TopicMapSystemFactory.newInstance().newTopicMapSystem()); + } + + private Console(TopicMapSystem tmSys) { + if (tmSys == null) { + throw new IllegalArgumentException("The topic map system must not be null"); + } + _tmSys = tmSys; + _commands = new HashMap<String, ICommand>(); + _registerCommands(); + } + + private void _registerCommands() { + ICommand cmd = new CreateCommand(); + _registerCommand(cmd); + cmd = new ShowCommand(); + _registerCommand(cmd); + } + + private void _registerCommand(ICommand cmd) { + _commands.put(cmd.getName(), cmd); + } + + public void start() throws IOException { + _reader = new BufferedReader(new InputStreamReader(_in)); + _printBanner(); + boolean exit = false; + while(!exit) { + String command = _readInput(); + if (command == null) { + break; + } + exit = _executeCommand(command); + } + _println("Thanks for using tinyTiM."); + _println("Bye."); + } + + private boolean _executeCommand(String command) { + String[] args = _parse(command); + if (args.length == 0) { + return false; + } + String op = args[0]; + if ("exit".equals(op)) { + return true; + } + else if ("help".equals(op)) { + List<String> list = new ArrayList<String>(_commands.keySet()); + Collections.sort(list); + for (String name: list) { + ICommand cmd = _commands.get(name); + _print(cmd.getSytax()); + _print("\t"); + _println(cmd.getHelp()); + } + _println("exit\t Closes the console"); + return false; + } + ICommand cmd = _commands.get(op); + if (cmd == null) { + _printError("Unknown command: '" + command + "'"); + } + else { + cmd.execute(args); + } + return false; + } + + private String _readInput() throws IOException { + _print(">>> "); + String line = _reader.readLine(); + if (line == null) { + // EOF + return null; + } + StringBuilder buf = new StringBuilder(256); + buf.append(line); + while (line != null && !line.endsWith(".")) { + _print("... "); + line = _reader.readLine(); + buf.append('\n') + .append(line); + } + // Remove closing dot + buf.setLength(buf.length() - 1); + return buf.toString().trim(); + } + + private void _printBanner() { + _println(); + _print("Console v"); + _print(_VERSION); + _print(" using tinyTiM v"); + _println(Version.RELEASE); + _println("Commands end with a '.'"); + _println("Type 'help.' for more information"); + } + + private void _print(String s) { + _out.print(s); + } + + private void _println() { + _out.println(); + } + + private void _println(String s) { + _out.println(s); + } + + private void _printError(String msg) { + _out.println("ERROR: " + msg); + } + + private static String[] _parse(String command) { + Matcher matcher = _CL_PATTERN.matcher(command); + List<String> tokens = new ArrayList<String>(); + while (matcher.find()) { + if (matcher.group(1) != null) { + tokens.add(matcher.group(1)); + } + else { + tokens.add(matcher.group()); + } + } + return tokens.toArray(new String[tokens.size()]); + } + + + private class CreateCommand extends AbstractCommand { + + public CreateCommand() { + super("create <target:url>", + "Creates a topic map under the specified location"); + } + + public void execute(String[] args) { + if (args.length > 2) { + _printError("Too many arguments"); + return; + } + String iri = args[1]; + try { + _tmSys.createTopicMap(iri); + } + catch (TopicMapExistsException ex) { + _printError("Topic map exists"); + return; + } + _println("<" + iri + "> created."); + } + } + + + public class ReadCommand extends AbstractCommand { + + public ReadCommand() { + super("read <source:url> into <target:url> [using <syntax:identifier>]", + "Reads the content from a source into a local topic map"); + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#execute(java.lang.String[], java.io.PrintStream) + */ + public void execute(String[] args) { + // TODO Auto-generated method stub + + } + + } + + public class ShowCommand extends AbstractCommand { + + public ShowCommand() { + super("show", "Returns a list of topic maps"); + } + + public void execute(String[] args) { + Collection<Locator> locs = _tmSys.getLocators(); + if (locs.isEmpty()) { + _println("No topic maps available."); + } + else { + List<String> list = new ArrayList<String>(); + for (Locator loc: locs) { + list.add(loc.toExternalForm()); + } + Collections.sort(list); + for (String loc: list) { + _println(loc); + } + } + } + } + + private class WriteCommand extends AbstractCommand { + + public WriteCommand() { + super("write <source:url> to <target:url> [<syntax:identifier>]", + "Exports a topic map"); + } + + /* (non-Javadoc) + * @see org.tinytim.console.ICommand#execute(java.lang.String[]) + */ + public void execute(String[] args) { + // TODO Auto-generated method stub + + } + + } +} Property changes on: tinytim-console/trunk/src/main/java/org/tinytim/console/Console.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim-console/trunk/src/main/java/org/tinytim/console/ICommand.java =================================================================== --- tinytim-console/trunk/src/main/java/org/tinytim/console/ICommand.java (rev 0) +++ tinytim-console/trunk/src/main/java/org/tinytim/console/ICommand.java 2008-10-06 13:00:41 UTC (rev 164) @@ -0,0 +1,34 @@ +/* + * Copyright 2008 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.tinytim.console; + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +interface ICommand { + + public String getName(); + + public String getHelp(); + + public void execute(String[] args); + + public String getSytax(); + +} Property changes on: tinytim-console/trunk/src/main/java/org/tinytim/console/ICommand.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...> - 2008-09-18 13:09:10
|
Revision: 162 http://tinytim.svn.sourceforge.net/tinytim/?rev=162&view=rev Author: lheuer Date: 2008-09-18 13:09:19 +0000 (Thu, 18 Sep 2008) Log Message: ----------- Moved to Apache License 2.0 Modified Paths: -------------- tinytim-mio/trunk/src/main/java/org/tinytim/core/AbstractMapInputHandler.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractTopicMapReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/BTMReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/CTMReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/CXTMWriter.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapWriter.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/LTMReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/SnelloReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/TMXMLReader.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/TinyTimMapInputHandler.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/XMLC14NWriter.java tinytim-mio/trunk/src/main/java/org/tinytim/mio/XTMReader.java tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestTinyTimMapInputHandler.java Modified: tinytim-mio/trunk/src/main/java/org/tinytim/core/AbstractMapInputHandler.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/core/AbstractMapInputHandler.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/core/AbstractMapInputHandler.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractTopicMapReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractTopicMapReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/AbstractTopicMapReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/BTMReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/BTMReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/BTMReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/CTMReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/CTMReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/CTMReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/CXTMWriter.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/CXTMWriter.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/CXTMWriter.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapWriter.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapWriter.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/ITopicMapWriter.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/LTMReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/LTMReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/LTMReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/SnelloReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/SnelloReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/SnelloReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/TMXMLReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/TMXMLReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/TMXMLReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/TinyTimMapInputHandler.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/TinyTimMapInputHandler.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/TinyTimMapInputHandler.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/XMLC14NWriter.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/XMLC14NWriter.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/XMLC14NWriter.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/main/java/org/tinytim/mio/XTMReader.java =================================================================== --- tinytim-mio/trunk/src/main/java/org/tinytim/mio/XTMReader.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/main/java/org/tinytim/mio/XTMReader.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; Modified: tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestTinyTimMapInputHandler.java =================================================================== --- tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestTinyTimMapInputHandler.java 2008-09-18 13:02:34 UTC (rev 161) +++ tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestTinyTimMapInputHandler.java 2008-09-18 13:09:19 UTC (rev 162) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.mio; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-18 13:02:27
|
Revision: 161 http://tinytim.svn.sourceforge.net/tinytim/?rev=161&view=rev Author: lheuer Date: 2008-09-18 13:02:34 +0000 (Thu, 18 Sep 2008) Log Message: ----------- - Moved to Apache License 2.0 Modified Paths: -------------- tinytim/trunk/CHANGES.txt tinytim/trunk/LICENSE.txt tinytim/trunk/README.txt tinytim/trunk/build.properties tinytim/trunk/build.xml tinytim/trunk/src/main/java/org/tinytim/core/AssociationImpl.java tinytim/trunk/src/main/java/org/tinytim/core/ConstructImpl.java tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java tinytim/trunk/src/main/java/org/tinytim/core/Event.java tinytim/trunk/src/main/java/org/tinytim/core/IConstant.java tinytim/trunk/src/main/java/org/tinytim/core/IConstruct.java tinytim/trunk/src/main/java/org/tinytim/core/IEventHandler.java tinytim/trunk/src/main/java/org/tinytim/core/IEventPublisher.java tinytim/trunk/src/main/java/org/tinytim/core/ILiteral.java tinytim/trunk/src/main/java/org/tinytim/core/ILiteralAware.java tinytim/trunk/src/main/java/org/tinytim/core/ILocator.java tinytim/trunk/src/main/java/org/tinytim/core/IMovable.java tinytim/trunk/src/main/java/org/tinytim/core/IRI.java tinytim/trunk/src/main/java/org/tinytim/core/IScope.java tinytim/trunk/src/main/java/org/tinytim/core/IScoped.java tinytim/trunk/src/main/java/org/tinytim/core/IdGenerator.java tinytim/trunk/src/main/java/org/tinytim/core/IdentityManager.java tinytim/trunk/src/main/java/org/tinytim/core/IntegerLiteral.java tinytim/trunk/src/main/java/org/tinytim/core/Literal.java tinytim/trunk/src/main/java/org/tinytim/core/LiteralNormalizer.java tinytim/trunk/src/main/java/org/tinytim/core/MergeUtils.java tinytim/trunk/src/main/java/org/tinytim/core/NameImpl.java tinytim/trunk/src/main/java/org/tinytim/core/OccurrenceImpl.java tinytim/trunk/src/main/java/org/tinytim/core/RoleImpl.java tinytim/trunk/src/main/java/org/tinytim/core/Scope.java tinytim/trunk/src/main/java/org/tinytim/core/ScopedImpl.java tinytim/trunk/src/main/java/org/tinytim/core/SignatureGenerator.java tinytim/trunk/src/main/java/org/tinytim/core/TopicImpl.java tinytim/trunk/src/main/java/org/tinytim/core/TopicMapImpl.java tinytim/trunk/src/main/java/org/tinytim/core/TopicMapSystemFactoryImpl.java tinytim/trunk/src/main/java/org/tinytim/core/TopicMapSystemImpl.java tinytim/trunk/src/main/java/org/tinytim/core/TypedImpl.java tinytim/trunk/src/main/java/org/tinytim/core/VariantImpl.java tinytim/trunk/src/main/java/org/tinytim/index/AbstractIndex.java tinytim/trunk/src/main/java/org/tinytim/index/IIndexManager.java tinytim/trunk/src/main/java/org/tinytim/index/IndexManager.java tinytim/trunk/src/main/java/org/tinytim/index/LiteralIndexImpl.java tinytim/trunk/src/main/java/org/tinytim/index/ScopedIndexImpl.java tinytim/trunk/src/main/java/org/tinytim/index/TypeInstanceIndexImpl.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/CollectionFactory.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/DefaultIntObjectMap.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/ICollectionFactory.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/IIntObjectMap.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/JavaCollectionFactory.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/TroveCollectionFactory.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/WeakObjectRegistry.java tinytim/trunk/src/main/java/org/tinytim/utils/DuplicateRemovalUtils.java tinytim/trunk/src/main/java/org/tinytim/utils/Feature.java tinytim/trunk/src/main/java/org/tinytim/utils/TopicUtils.java tinytim/trunk/src/main/java/org/tinytim/utils/TypeInstanceConverter.java tinytim/trunk/src/main/java/org/tinytim/voc/TMDM.java tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java tinytim/trunk/src/main/java/org/tinytim/voc/XTM10.java tinytim/trunk/src/test/java/org/tinytim/core/AbstractTMAPITestSuite.java tinytim/trunk/src/test/java/org/tinytim/core/AllTests.java tinytim/trunk/src/test/java/org/tinytim/core/TestIConstruct.java tinytim/trunk/src/test/java/org/tinytim/core/TestIRI.java tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java tinytim/trunk/src/test/java/org/tinytim/core/TestLiteral.java tinytim/trunk/src/test/java/org/tinytim/core/TestLiteralNormalizer.java tinytim/trunk/src/test/java/org/tinytim/core/TestScope.java tinytim/trunk/src/test/java/org/tinytim/core/TestSignatureGenerator.java tinytim/trunk/src/test/java/org/tinytim/core/TestTMAPICore.java tinytim/trunk/src/test/java/org/tinytim/core/TestTMAPIIndex.java tinytim/trunk/src/test/java/org/tinytim/core/TestTopicMapSystemFactoryImpl.java tinytim/trunk/src/test/java/org/tinytim/core/TinyTimTestCase.java tinytim/trunk/src/test/java/org/tinytim/utils/TestDuplicateRemovalUtils.java tinytim/trunk/src/test/java/org/tinytim/utils/TestTopicUtils.java tinytim/trunk/src/test/java/org/tinytim/utils/TestTypeInstanceConverter.java Modified: tinytim/trunk/CHANGES.txt =================================================================== --- tinytim/trunk/CHANGES.txt 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/CHANGES.txt 2008-09-18 13:02:34 UTC (rev 161) @@ -2,6 +2,11 @@ Changes Log =========== +2.0.0 a3 (xx.09.2008) +--------------------- +* Moved to Apache License 2.0 + + 2.0.0 a2 (08.09.2008) --------------------- * Internal code refactoring Modified: tinytim/trunk/LICENSE.txt =================================================================== --- tinytim/trunk/LICENSE.txt 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/LICENSE.txt 2008-09-18 13:02:34 UTC (rev 161) @@ -1,504 +1,202 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - Preamble + 1. Definitions. - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. - a) The modified work must itself be a software library. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. + END OF TERMS AND CONDITIONS - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) + APPENDIX: How to apply the Apache License to your work. -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. + Copyright [yyyy] [name of copyright owner] -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. + http://www.apache.org/licenses/LICENSE-2.0 - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Modified: tinytim/trunk/README.txt =================================================================== --- tinytim/trunk/README.txt 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/README.txt 2008-09-18 13:02:34 UTC (rev 161) @@ -30,5 +30,5 @@ License ------- -tinyTiM is licensed under the GNU Lesser General Public License (LGPL) -Version 2.1, see LICENSE.txt for details. +tinyTiM is licensed under the Apache License Version 2.0, see LICENSE.txt +for details. Modified: tinytim/trunk/build.properties =================================================================== --- tinytim/trunk/build.properties 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/build.properties 2008-09-18 13:02:34 UTC (rev 161) @@ -1,4 +1,4 @@ version=2.0.0 -version_suffix=a2 +version_suffix=a3-snapshot debug=off optimize=on Modified: tinytim/trunk/build.xml =================================================================== --- tinytim/trunk/build.xml 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/build.xml 2008-09-18 13:02:34 UTC (rev 161) @@ -1,25 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- - ==================================================================== - This is tinyTiM, a tiny Topic Maps engine. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - ==================================================================== - - $Rev:$ - $Date:$ ---> <project name="tinyTiM" default="jar" basedir="."> <property file="build.properties"/> Modified: tinytim/trunk/src/main/java/org/tinytim/core/AssociationImpl.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/AssociationImpl.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/AssociationImpl.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim/trunk/src/main/java/org/tinytim/core/ConstructImpl.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/ConstructImpl.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/ConstructImpl.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; @@ -30,7 +25,7 @@ * * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev:$ - $Date:$ + * @version $Rev$ - $Date$ */ final class DecimalLiteral implements ILiteral { Modified: tinytim/trunk/src/main/java/org/tinytim/core/Event.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/Event.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/Event.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim/trunk/src/main/java/org/tinytim/core/IConstant.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/IConstant.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/IConstant.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.tinytim.core; Modified: tinytim/trunk/src/main/java/org/tinytim/core/IConstruct.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/IConstruct.java 2008-09-08 12:26:52 UTC (rev 160) +++ tinytim/trunk/src/main/java/org/tinytim/core/IConstruct.java 2008-09-18 13:02:34 UTC (rev 161) @@ -1,22 +1,17 @@ /* - * This is tinyTiM, a tiny Topic Maps engine. + * Copyright 2008 Lars Heuer (heuer[at]semagia.com) * - * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the ... [truncated message content] |
From: <lh...@us...> - 2008-09-08 12:26:42
|
Revision: 160 http://tinytim.svn.sourceforge.net/tinytim/?rev=160&view=rev Author: lheuer Date: 2008-09-08 12:26:52 +0000 (Mon, 08 Sep 2008) Log Message: ----------- Tagged 2.0.0a2 Added Paths: ----------- tinytim/tags/release-2_0_0a2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-08 12:15:09
|
Revision: 159 http://tinytim.svn.sourceforge.net/tinytim/?rev=159&view=rev Author: lheuer Date: 2008-09-08 12:15:19 +0000 (Mon, 08 Sep 2008) Log Message: ----------- Fixed typo Modified Paths: -------------- tinytim/trunk/CHANGES.txt Modified: tinytim/trunk/CHANGES.txt =================================================================== --- tinytim/trunk/CHANGES.txt 2008-09-08 12:09:10 UTC (rev 158) +++ tinytim/trunk/CHANGES.txt 2008-09-08 12:15:19 UTC (rev 159) @@ -5,7 +5,7 @@ 2.0.0 a2 (08.09.2008) --------------------- * Internal code refactoring -* Better duplicate literal supression +* Better duplicate literal suppression 2.0.0 a1 (26.08.2008) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-08 12:09:00
|
Revision: 158 http://tinytim.svn.sourceforge.net/tinytim/?rev=158&view=rev Author: lheuer Date: 2008-09-08 12:09:10 +0000 (Mon, 08 Sep 2008) Log Message: ----------- * Prepared 2.0.0a2 Modified Paths: -------------- tinytim/trunk/CHANGES.txt tinytim/trunk/README.txt tinytim/trunk/build.properties tinytim/trunk/build.xml Modified: tinytim/trunk/CHANGES.txt =================================================================== --- tinytim/trunk/CHANGES.txt 2008-09-08 11:37:54 UTC (rev 157) +++ tinytim/trunk/CHANGES.txt 2008-09-08 12:09:10 UTC (rev 158) @@ -2,6 +2,12 @@ Changes Log =========== +2.0.0 a2 (08.09.2008) +--------------------- +* Internal code refactoring +* Better duplicate literal supression + + 2.0.0 a1 (26.08.2008) --------------------- * Implementation of the TMAPI 2.0 interfaces Modified: tinytim/trunk/README.txt =================================================================== --- tinytim/trunk/README.txt 2008-09-08 11:37:54 UTC (rev 157) +++ tinytim/trunk/README.txt 2008-09-08 12:09:10 UTC (rev 158) @@ -6,17 +6,22 @@ ---------------- tinyTiM is a tiny Topic Maps engine which keeps topic maps in-memory. This Topic Maps engine is meant to be used together with the TMAPI interfaces, -see <http://www.tmapi.org/> for details. +see <http://www.tmapi.org/2.0/> for details. Installation ------------ -No real installation needed, simply put the ``tinytim-2.0.0a1.jar`` and +No real installation needed, simply put the ``tinytim-2.0.0a2.jar`` and ``tmapi-2.0a1.jar`` into your classpath. That's all. :) Optionally, you can put the ``trove-<VERSION>.jar`` into your classpath which makes tinyTiM slightly more memory efficient and faster. +Mailing List +------------ +If you have questions or suggestions, use our mailinglist +<http://tinytim.sourceforge.net/mailinglist> + Latest Version -------------- Visit tinyTiM's homepage <http://sourceforge.net/projects/tinytim> for the Modified: tinytim/trunk/build.properties =================================================================== --- tinytim/trunk/build.properties 2008-09-08 11:37:54 UTC (rev 157) +++ tinytim/trunk/build.properties 2008-09-08 12:09:10 UTC (rev 158) @@ -1,4 +1,4 @@ version=2.0.0 -version_suffix=a1 +version_suffix=a2 debug=off optimize=on Modified: tinytim/trunk/build.xml =================================================================== --- tinytim/trunk/build.xml 2008-09-08 11:37:54 UTC (rev 157) +++ tinytim/trunk/build.xml 2008-09-08 12:09:10 UTC (rev 158) @@ -29,7 +29,7 @@ <property name="dir.res" value="${basedir}/src/main/resources"/> <property name="dir.coverage" value="${basedir}/coverage"/> - <property name="lib.junit" value="${dir.lib}/junit-4.4.jar"/> + <property name="lib.junit" value="${dir.lib}/junit-4.5.jar"/> <property name="lib.trove" value="${dir.lib}/trove-2.0.4.jar"/> <property name="lib.tmapi" value="${dir.lib}/tmapi-2.0a1.jar"/> <property name="lib.tmapi.tests" value="${dir.lib}/tmapi-2.0a1-tests.jar"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-08 11:37:44
|
Revision: 157 http://tinytim.svn.sourceforge.net/tinytim/?rev=157&view=rev Author: lheuer Date: 2008-09-08 11:37:54 +0000 (Mon, 08 Sep 2008) Log Message: ----------- * Simplified Literal factory methods * DatatypeAwareConstruct uses createDecimal / createInteger directly Modified Paths: -------------- tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java tinytim/trunk/src/main/java/org/tinytim/core/Literal.java Modified: tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java 2008-09-05 12:01:41 UTC (rev 156) +++ tinytim/trunk/src/main/java/org/tinytim/core/DatatypeAwareConstruct.java 2008-09-08 11:37:54 UTC (rev 157) @@ -92,7 +92,7 @@ */ public void setValue(BigDecimal value) { Check.valueNotNull(this, value); - setLiteral(Literal.create(value)); + setLiteral(Literal.createDecimal(value)); } /* (non-Javadoc) @@ -100,7 +100,7 @@ */ public void setValue(BigInteger value) { Check.valueNotNull(this, value); - setLiteral(Literal.create(value)); + setLiteral(Literal.createInteger(value)); } /* (non-Javadoc) Modified: tinytim/trunk/src/main/java/org/tinytim/core/Literal.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/Literal.java 2008-09-05 12:01:41 UTC (rev 156) +++ tinytim/trunk/src/main/java/org/tinytim/core/Literal.java 2008-09-08 11:37:54 UTC (rev 157) @@ -94,6 +94,15 @@ } + private static synchronized <L extends ILiteral> L _registerIfAbsent(final WeakObjectRegistry<L> registry, final L lit) { + final L existing = registry.get(lit); + if (existing != null) { + return existing; + } + registry.add(lit); + return lit; + } + public static synchronized ILiteral create(final String value, final Locator datatype) { if (value == null) { throw new IllegalArgumentException("The value must not be null"); @@ -113,33 +122,13 @@ if (XSD.INTEGER.equals(datatype)) { return createInteger(value); } - ILiteral literal = new Literal(value, datatype); - ILiteral existing = _OTHERS.get(literal); - if (existing != null) { - return existing; - } - _OTHERS.add(literal); - return literal; + return _registerIfAbsent(_OTHERS, new Literal(value, datatype)); } public static synchronized ILiteral create(String value) { - ILiteral literal = new Literal(value, XSD.STRING); - ILiteral existing = _STRINGS.get(literal); - if (existing != null) { - return existing; - } - _STRINGS.add(literal); - return literal; + return _registerIfAbsent(_STRINGS, new Literal(value, XSD.STRING)); } - public static ILiteral create(BigDecimal value) { - return createDecimal(value); - } - - public static ILiteral create(BigInteger value) { - return createInteger(value); - } - public static ILiteral create(float value) { return create(value, XSD.FLOAT); } @@ -171,65 +160,35 @@ if (value == null) { throw new IllegalArgumentException("The value must not be null"); } - IRI iri = new IRI(value); - IRI existing = _IRIS.get(iri); - if (existing != null) { - return existing; - } - _IRIS.add(iri); - return iri; + return _registerIfAbsent(_IRIS, new IRI(value)); } public static synchronized ILiteral createDecimal(String value) { if (value == null) { throw new IllegalArgumentException("The value must not be null"); } - ILiteral lit = new DecimalLiteral(value); - ILiteral existing = _OTHERS.get(lit); - if (existing != null) { - return existing; - } - _OTHERS.add(lit); - return lit; + return _registerIfAbsent(_OTHERS, new DecimalLiteral(value)); } public static synchronized ILiteral createDecimal(BigDecimal value) { if (value == null) { throw new IllegalArgumentException("The value must not be null"); } - ILiteral lit = new DecimalLiteral(value); - ILiteral existing = _OTHERS.get(lit); - if (existing != null) { - return existing; - } - _OTHERS.add(lit); - return lit; + return _registerIfAbsent(_OTHERS, new DecimalLiteral(value)); } public static synchronized ILiteral createInteger(String value) { if (value == null) { throw new IllegalArgumentException("The value must not be null"); } - ILiteral lit = new IntegerLiteral(value); - ILiteral existing = _OTHERS.get(lit); - if (existing != null) { - return existing; - } - _OTHERS.add(lit); - return lit; + return _registerIfAbsent(_OTHERS, new IntegerLiteral(value)); } public static synchronized ILiteral createInteger(BigInteger value) { if (value == null) { throw new IllegalArgumentException("The value must not be null"); } - ILiteral lit = new IntegerLiteral(value); - ILiteral existing = _OTHERS.get(lit); - if (existing != null) { - return existing; - } - _OTHERS.add(lit); - return lit; + return _registerIfAbsent(_OTHERS, new IntegerLiteral(value)); } public BigDecimal decimalValue() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-05 12:01:33
|
Revision: 156 http://tinytim.svn.sourceforge.net/tinytim/?rev=156&view=rev Author: lheuer Date: 2008-09-05 12:01:41 +0000 (Fri, 05 Sep 2008) Log Message: ----------- Added dedicated DecimalLiteral and IntegerLiteral Modified Paths: -------------- tinytim/trunk/src/main/java/org/tinytim/core/Literal.java Added Paths: ----------- tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java tinytim/trunk/src/main/java/org/tinytim/core/IntegerLiteral.java Added: tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java 2008-09-05 12:01:41 UTC (rev 156) @@ -0,0 +1,115 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.core; + +import java.math.BigDecimal; +import java.math.BigInteger; + +import org.tinytim.voc.XSD; +import org.tmapi.core.Locator; + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +final class DecimalLiteral implements ILiteral { + + private final BigDecimal _decimal; + private final String _lexicalForm; + + public DecimalLiteral(BigDecimal decimal) { + _decimal = decimal; + _lexicalForm = LiteralNormalizer.normalizeDecimal(decimal.toPlainString()); + } + + public DecimalLiteral(String value) { + _lexicalForm = LiteralNormalizer.normalizeDecimal(value); + _decimal = new BigDecimal(_lexicalForm); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#decimalValue() + */ + public BigDecimal decimalValue() { + return _decimal; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#floatValue() + */ + public float floatValue() { + return _decimal.floatValue(); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#getDatatype() + */ + public Locator getDatatype() { + return XSD.DECIMAL; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#getValue() + */ + public String getValue() { + return _lexicalForm; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#intValue() + */ + public int intValue() { + return _decimal.intValue(); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#integerValue() + */ + public BigInteger integerValue() { + return _decimal.toBigInteger(); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#longValue() + */ + public long longValue() { + return _decimal.longValue(); + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + return _decimal.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + return this == obj || (obj instanceof DecimalLiteral) && ((DecimalLiteral) obj)._lexicalForm.equals(_lexicalForm); + } + +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/core/DecimalLiteral.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim/trunk/src/main/java/org/tinytim/core/IntegerLiteral.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/IntegerLiteral.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/core/IntegerLiteral.java 2008-09-05 12:01:41 UTC (rev 156) @@ -0,0 +1,119 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.core; + +import java.math.BigDecimal; +import java.math.BigInteger; + +import org.tinytim.voc.XSD; +import org.tmapi.core.Locator; + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +final class IntegerLiteral implements ILiteral { + + private final BigInteger _integer; + private final String _lexicalForm; + private BigDecimal _decimal; + + public IntegerLiteral(BigInteger value) { + _integer = value; + _lexicalForm = LiteralNormalizer.normalizeInteger(value.toString()); + } + + public IntegerLiteral(String value) { + _lexicalForm = LiteralNormalizer.normalizeInteger(value); + _integer = new BigInteger(_lexicalForm); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#decimalValue() + */ + public BigDecimal decimalValue() { + if (_decimal == null) { + _decimal = new BigDecimal(_integer); + } + return _decimal; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#floatValue() + */ + public float floatValue() { + return _integer.floatValue(); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#getDatatype() + */ + public Locator getDatatype() { + return XSD.INTEGER; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#getValue() + */ + public String getValue() { + return _lexicalForm; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#intValue() + */ + public int intValue() { + return _integer.intValue(); + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#integerValue() + */ + public BigInteger integerValue() { + return _integer; + } + + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#longValue() + */ + public long longValue() { + return _integer.longValue(); + } + + /* (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + return _integer.hashCode(); + } + + /* (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + return this == obj || (obj instanceof IntegerLiteral) && ((IntegerLiteral) obj)._lexicalForm.equals(_lexicalForm); + } + +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/core/IntegerLiteral.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Modified: tinytim/trunk/src/main/java/org/tinytim/core/Literal.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/Literal.java 2008-09-04 13:28:44 UTC (rev 155) +++ tinytim/trunk/src/main/java/org/tinytim/core/Literal.java 2008-09-05 12:01:41 UTC (rev 156) @@ -107,6 +107,12 @@ if (XSD.STRING.equals(datatype)) { return create(value); } + if (XSD.DECIMAL.equals(datatype)) { + return createDecimal(value); + } + if (XSD.INTEGER.equals(datatype)) { + return createInteger(value); + } ILiteral literal = new Literal(value, datatype); ILiteral existing = _OTHERS.get(literal); if (existing != null) { @@ -127,11 +133,11 @@ } public static ILiteral create(BigDecimal value) { - return create(value, XSD.DECIMAL); + return createDecimal(value); } public static ILiteral create(BigInteger value) { - return create(value, XSD.INTEGER); + return createInteger(value); } public static ILiteral create(float value) { @@ -174,6 +180,58 @@ return iri; } + public static synchronized ILiteral createDecimal(String value) { + if (value == null) { + throw new IllegalArgumentException("The value must not be null"); + } + ILiteral lit = new DecimalLiteral(value); + ILiteral existing = _OTHERS.get(lit); + if (existing != null) { + return existing; + } + _OTHERS.add(lit); + return lit; + } + + public static synchronized ILiteral createDecimal(BigDecimal value) { + if (value == null) { + throw new IllegalArgumentException("The value must not be null"); + } + ILiteral lit = new DecimalLiteral(value); + ILiteral existing = _OTHERS.get(lit); + if (existing != null) { + return existing; + } + _OTHERS.add(lit); + return lit; + } + + public static synchronized ILiteral createInteger(String value) { + if (value == null) { + throw new IllegalArgumentException("The value must not be null"); + } + ILiteral lit = new IntegerLiteral(value); + ILiteral existing = _OTHERS.get(lit); + if (existing != null) { + return existing; + } + _OTHERS.add(lit); + return lit; + } + + public static synchronized ILiteral createInteger(BigInteger value) { + if (value == null) { + throw new IllegalArgumentException("The value must not be null"); + } + ILiteral lit = new IntegerLiteral(value); + ILiteral existing = _OTHERS.get(lit); + if (existing != null) { + return existing; + } + _OTHERS.add(lit); + return lit; + } + public BigDecimal decimalValue() { return new BigDecimal(_value); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-04 13:28:33
|
Revision: 155 http://tinytim.svn.sourceforge.net/tinytim/?rev=155&view=rev Author: lheuer Date: 2008-09-04 13:28:44 +0000 (Thu, 04 Sep 2008) Log Message: ----------- Updated TMAPI tests (unofficial build) Modified Paths: -------------- tinytim/trunk/lib/tmapi-2.0a1-tests.jar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-04 11:46:43
|
Revision: 154 http://tinytim.svn.sourceforge.net/tinytim/?rev=154&view=rev Author: lheuer Date: 2008-09-04 11:46:52 +0000 (Thu, 04 Sep 2008) Log Message: ----------- - Added private constructors (again) :( Modified Paths: -------------- tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java Modified: tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java 2008-09-04 11:43:42 UTC (rev 153) +++ tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java 2008-09-04 11:46:52 UTC (rev 154) @@ -47,6 +47,10 @@ */ final class CopyUtils { + private CopyUtils() { + // noop. + } + /** * Copies the topics and associations from the <tt>source</tt> to the * <tt>target</tt> topic map. Modified: tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java 2008-09-04 11:43:42 UTC (rev 153) +++ tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java 2008-09-04 11:46:52 UTC (rev 154) @@ -35,6 +35,17 @@ */ public final class Check { + private Check() { + // noop. + } + + /** + * Throws a {@link ModelConstraintException} with the specified <tt>sender</tt> + * and <tt>msg</tt> + * + * @param sender The sender + * @param msg The error message + */ private static void _reportError(Construct sender, String msg) { throw new ModelConstraintException(sender, msg); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-04 11:43:32
|
Revision: 153 http://tinytim.svn.sourceforge.net/tinytim/?rev=153&view=rev Author: lheuer Date: 2008-09-04 11:43:42 +0000 (Thu, 04 Sep 2008) Log Message: ----------- - Removed checked Exception (again) :/ Modified Paths: -------------- tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java Modified: tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java 2008-09-04 11:36:23 UTC (rev 152) +++ tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java 2008-09-04 11:43:42 UTC (rev 153) @@ -40,11 +40,11 @@ * * @param tmo The Topic Maps construct to test. */ - private void _testConstraint(Construct tmo) throws Exception { + private void _testConstraint(final Construct tmo) { assertTrue(tmo.getItemIdentifiers().isEmpty()); - Locator iid = createLocator("http://sf.net/projects/tinytim"); - Locator iid2 = createLocator("http://sf.net/projects/tinytim2"); - Association assoc = createAssociation(); + final Locator iid = createLocator("http://sf.net/projects/tinytim"); + final Locator iid2 = createLocator("http://sf.net/projects/tinytim2"); + final Association assoc = createAssociation(); assoc.addItemIdentifier(iid); assertFalse(tmo.getItemIdentifiers().contains(iid)); try { @@ -72,14 +72,14 @@ /** * Tests against a topic map. */ - public void testTopicMap() throws Exception { + public void testTopicMap() { _testConstraint(_tm); } /** * Tests againts a topic. */ - public void testTopic() throws Exception { + public void testTopic() { Topic topic = createTopic(); Locator iid = createLocator("http://sf.net/projects/tinytim"); topic.addItemIdentifier(iid); @@ -107,35 +107,35 @@ /** * Tests against an association. */ - public void testAssociation() throws Exception { + public void testAssociation() { _testConstraint(createAssociation()); } /** * Tests against a role. */ - public void testRole() throws Exception { + public void testRole() { _testConstraint(createRole()); } /** * Tests against an occurrence. */ - public void testOccurrence() throws Exception { + public void testOccurrence() { _testConstraint(createOccurrence()); } /** * Tests against a name. */ - public void testName() throws Exception { + public void testName() { _testConstraint(createName()); } /** * Tests against a variant. */ - public void testVariant() throws Exception { + public void testVariant() { _testConstraint(createVariant()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-09-04 11:36:15
|
Revision: 152 http://tinytim.svn.sourceforge.net/tinytim/?rev=152&view=rev Author: lheuer Date: 2008-09-04 11:36:23 +0000 (Thu, 04 Sep 2008) Log Message: ----------- - More docs - Added LiteralNormalizer which normalizes a few datatypes Modified Paths: -------------- tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java tinytim/trunk/src/main/java/org/tinytim/core/IScope.java tinytim/trunk/src/main/java/org/tinytim/core/IdGenerator.java tinytim/trunk/src/main/java/org/tinytim/core/Literal.java tinytim/trunk/src/main/java/org/tinytim/core/Scope.java tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java tinytim/trunk/src/test/java/org/tinytim/core/AllTests.java tinytim/trunk/src/test/java/org/tinytim/core/TestIConstruct.java tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java tinytim/trunk/src/test/java/org/tinytim/core/TestLiteral.java tinytim/trunk/src/test/java/org/tinytim/core/TestScope.java Added Paths: ----------- tinytim/trunk/src/main/java/org/tinytim/core/LiteralNormalizer.java tinytim/trunk/src/test/java/org/tinytim/core/TestLiteralNormalizer.java Modified: tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/core/CopyUtils.java 2008-09-04 11:36:23 UTC (rev 152) @@ -47,10 +47,6 @@ */ final class CopyUtils { - private CopyUtils() { - // noop. - } - /** * Copies the topics and associations from the <tt>source</tt> to the * <tt>target</tt> topic map. Modified: tinytim/trunk/src/main/java/org/tinytim/core/IScope.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/IScope.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/core/IScope.java 2008-09-04 11:36:23 UTC (rev 152) @@ -51,6 +51,15 @@ public boolean contains(Topic theme); /** + * Returns <tt>true</tt> if all themes of the other <tt>scope</tt> are part + * of this scope. + * + * @param scope A collection of themes. + * @return <tt>true</tt> if all themes are part of this scope, otherwise <tt>false</tt>. + */ + public boolean containsAll(Collection<Topic> scope); + + /** * Returns a <tt>IScope</tt> consisting of all themes contained in this * scope and the <tt>theme</tt>. * @@ -84,6 +93,4 @@ */ public int size(); - public boolean containsAll(Collection<Topic> scope); - } Modified: tinytim/trunk/src/main/java/org/tinytim/core/IdGenerator.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/IdGenerator.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/core/IdGenerator.java 2008-09-04 11:36:23 UTC (rev 152) @@ -34,10 +34,6 @@ private static final AtomicLong _COUNTER = new AtomicLong(); - private IdGenerator() { - // noop. - } - /** * Returns the next identifier. * Modified: tinytim/trunk/src/main/java/org/tinytim/core/Literal.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/Literal.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/core/Literal.java 2008-09-04 11:36:23 UTC (rev 152) @@ -48,14 +48,20 @@ if (value == null) { throw new IllegalArgumentException("The value must not be null"); } - _value = value; + _value = LiteralNormalizer.normalize(value, datatype); _datatype = datatype; } + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#getDatatype() + */ public Locator getDatatype() { return _datatype; } + /* (non-Javadoc) + * @see org.tinytim.core.ILiteral#getValue() + */ public String getValue() { return _value; } Added: tinytim/trunk/src/main/java/org/tinytim/core/LiteralNormalizer.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/LiteralNormalizer.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/core/LiteralNormalizer.java 2008-09-04 11:36:23 UTC (rev 152) @@ -0,0 +1,164 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.core; + +import org.tinytim.voc.XSD; +import org.tmapi.core.Locator; + +/** + * Normalizes literal values. + * + * This class is not meant to be used outside of the tinyTiM package. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +final class LiteralNormalizer { + + private LiteralNormalizer() { + // noop. + } + + /** + * Normalizes the <tt>value</tt> dependent on the <tt>datatype</tt>. + * + * @param value The value to normalize. + * @param datatype The datatype. + * @return A normalized value. + */ + public static String normalize(final String value, final Locator datatype) { + if (XSD.BOOLEAN.equals(datatype)) { + return normalizeBoolean(value); + } + else if (XSD.INTEGER.equals(datatype)) { + return normalizeInteger(value); + } + else if (XSD.DECIMAL.equals(datatype)) { + return normalizeDecimal(value); + } + return value; + } + + public static String normalizeBoolean(final String value) { + if ("0".equals(value) || "false".equals(value)) { + return "false"; + } + else if ("1".equals(value) || "true".equals(value)) { + return "true"; + } + throw new IllegalArgumentException("Illegal boolean value: " + value); + } + + public static String normalizeInteger(final String value) { + final String val = value.trim(); + int len = value.length(); + if (len == 0) { + throw new IllegalArgumentException(); + } + int idx = 0; + boolean negative = false; + switch (val.charAt(idx)) { + case '-': + idx++; + negative = true; + break; + case '+': + idx++; + break; + } + // Skip leading zeros if any + while (idx < len && val.charAt(idx) == '0') { + idx++; + } + if (idx == len) { + return "0"; + } + final String normalized = val.substring(idx); + len = normalized.length(); + // Check if everything is a digit + for (int i = 0; i < len; i++) { + if (!Character.isDigit(normalized.charAt(i))) { + throw new IllegalArgumentException(); + } + } + return negative && normalized.charAt(0) != 0 ? '-' + normalized : normalized; + } + + public static String normalizeDecimal(final String value) { + final String val = value.trim(); + int len = value.length(); + if (len == 0) { + throw new IllegalArgumentException(); + } + int idx = 0; + boolean negative = false; + switch (val.charAt(idx)) { + case '-': + idx++; + negative = true; + break; + case '+': + idx++; + break; + } + // Skip leading zeros if any + while (idx < len && val.charAt(idx) == '0') { + idx++; + } + if (idx == len) { + return "0.0"; + } + StringBuilder normalized = new StringBuilder(len); + if (val.charAt(idx) == '.') { + normalized.append('0'); + } + else { + while (idx < len && val.charAt(idx) != '.') { + char c = val.charAt(idx); + if (!Character.isDigit(c)) { + throw new IllegalArgumentException("Illegal decimal value: " + value); + } + normalized.append(c); + idx++; + } + } + normalized.append('.'); + len--; + while (len >= idx && val.charAt(len) == '0') { + len--; + } + if (len == idx || len < idx) { + normalized.append('0'); + } + else { + while (idx < len) { + char c = val.charAt(idx); + if (!Character.isDigit(c)) { + throw new IllegalArgumentException("Illegal decimal value: " + value); + } + normalized.append(c); + idx++; + } + } + return negative && normalized.charAt(0) != '0' ? '-' + normalized.toString() : normalized.toString(); + } + +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/core/LiteralNormalizer.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Modified: tinytim/trunk/src/main/java/org/tinytim/core/Scope.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/core/Scope.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/core/Scope.java 2008-09-04 11:36:23 UTC (rev 152) @@ -30,8 +30,8 @@ import org.tmapi.core.Topic; /** + * {@link IScope} implementation. * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ Modified: tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/internal/utils/Check.java 2008-09-04 11:36:23 UTC (rev 152) @@ -28,87 +28,78 @@ import org.tmapi.core.Topic; /** - * Utility class to check arguments and to throw - * {@link org.tmapi.core.ModelConstraintException}s if the arg violates a - * constraint. + * Provides various argument constraint checks. * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ public final class Check { - private Check() { - // noop. - } - - /** - * Throws a {@link ModelConstraintException} with the specified <tt>sender</tt> - * and <tt>msg</tt> - * - * @param sender The sender - * @param msg The error message - */ - private static void _reportError(final Construct sender, final String msg) { + private static void _reportError(Construct sender, String msg) { throw new ModelConstraintException(sender, msg); } /** - * Throws a {@link ModelConstraintException} if the <tt>scope</tt> is <tt>null</tt>. + * Throws a {@link ModelConstraintException} iff the <tt>scope</tt> is + * <tt>null</tt>. * - * @param sender The sender - * @param scope The scope array. + * @param sender The sender. + * @param scope The scope. */ - public static void scopeNotNull(final Construct sender, final Topic[] scope) { + public static void scopeNotNull(Construct sender, Topic[] scope) { if (scope == null) { _reportError(sender, "The scope must not be null"); } } /** - * Throws a {@link ModelConstraintException} if the <tt>scope</tt> is <tt>null</tt>. + * Throws a {@link ModelConstraintException} iff the <tt>scope</tt> is + * <tt>null</tt>. * - * @param sender The sender - * @param scope A collection. + * @param sender The sender. + * @param scope The scope. */ - public static void scopeNotNull(final Construct sender, final Collection<Topic> scope) { + public static void scopeNotNull(Construct sender, Collection<Topic> scope) { if (scope == null) { _reportError(sender, "The scope must not be null"); } } /** - * Throws a {@link ModelConstraintException} if the <tt>type</tt> is <tt>null</tt>. + * Throws a {@link ModelConstraintException} iff the <tt>type</tt> is + * <tt>null</tt>. * - * @param sender The sender - * @param type The topic to check. + * @param sender The sender. + * @param type The type. */ - public static void typeNotNull(final Construct sender, final Topic type) { + public static void typeNotNull(Construct sender, Topic type) { if (type == null) { _reportError(sender, "The type must not be null"); } } /** - * Throws a {@link ModelConstraintException} if the <tt>value</tt> is <tt>null</tt>. + * Throws a {@link ModelConstraintException} iff the <tt>value</tt> is + * <tt>null</tt>. * - * @param sender The sender + * @param sender The sender. * @param value The value. */ - public static void valueNotNull(final Construct sender, final Object value) { + public static void valueNotNull(Construct sender, Object value) { if (value == null) { _reportError(sender, "The value must not be null"); } } /** - * Throws a {@link ModelConstraintException} if the <tt>value</tt> or - * <tt>datatype</tt> is <tt>null</tt>. + * Throws a {@link ModelConstraintException} iff the <tt>value</tt> or + * the <tt>datatype</tt> is <tt>null</tt>. * - * @param sender The sender + * @param sender The sender. * @param value The value. - * @param datatype The locator indicating the datatype. + * @param datatype The datatype. */ - public static void valueNotNull(final Construct sender, final Object value, Locator datatype) { + public static void valueNotNull(Construct sender, Object value, Locator datatype) { valueNotNull(sender, value); if (datatype == null) { _reportError(sender, "The datatype must not be null"); @@ -116,12 +107,13 @@ } /** - * Throws a {@link ModelConstraintException} if the <tt>player</tt> is <tt>null</tt>. + * Throws a {@link ModelConstraintException} iff the <tt>player</tt> is + * <tt>null</tt>. * - * @param sender The sender - * @param player The topic to check. + * @param sender The sender. + * @param player The player. */ - public static void playerNotNull(final Construct sender, final Topic player) { + public static void playerNotNull(Construct sender, Topic player) { if (player == null) { _reportError(sender, "The role player must not be null"); } Modified: tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java 2008-09-04 11:36:23 UTC (rev 152) @@ -24,13 +24,19 @@ import org.tmapi.core.Locator; /** + * Base for classes which provide PSIs. * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ abstract class Vocabulary { + /** + * Returns a locator with the specified <tt>reference</tt>. + * + * @param reference The address of the locator. + * @return A locator. + */ protected final static Locator _createLocator(String reference) { return Literal.createIRI(reference); } Modified: tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java 2008-09-04 11:36:23 UTC (rev 152) @@ -23,8 +23,8 @@ import org.tmapi.core.Locator; /** + * Provides PSIs for the XML Schema Datatypes. * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ @@ -50,4 +50,6 @@ public final static Locator LONG = _createLocator(_BASE + "long"); + public static final Locator BOOLEAN = _createLocator(_BASE + "boolean"); + } Modified: tinytim/trunk/src/test/java/org/tinytim/core/AllTests.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/AllTests.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/test/java/org/tinytim/core/AllTests.java 2008-09-04 11:36:23 UTC (rev 152) @@ -22,7 +22,6 @@ import org.tinytim.utils.TestDuplicateRemovalUtils; import org.tinytim.utils.TestTopicUtils; -import org.tinytim.utils.TestTypeInstanceConverter; import junit.framework.Test; import junit.framework.TestSuite; @@ -46,13 +45,13 @@ suite.addTestSuite(TestIConstruct.class); suite.addTestSuite(TestScope.class); suite.addTestSuite(TestLiteral.class); + suite.addTestSuite(TestLiteralNormalizer.class); suite.addTestSuite(TestItemIdentifierConstraint.class); suite.addTestSuite(TestSignatureGenerator.class); suite.addTest(TestTMAPICore.suite()); suite.addTest(TestTMAPIIndex.suite()); suite.addTestSuite(TestTopicMapSystemFactoryImpl.class); suite.addTestSuite(TestTopicUtils.class); - suite.addTestSuite(TestTypeInstanceConverter.class); return suite; } } Modified: tinytim/trunk/src/test/java/org/tinytim/core/TestIConstruct.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/TestIConstruct.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/test/java/org/tinytim/core/TestIConstruct.java 2008-09-04 11:36:23 UTC (rev 152) @@ -30,8 +30,8 @@ import org.tmapi.core.Variant; /** + * Tests against {@link IConstruct}. * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev:$ - $Date:$ */ Modified: tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/test/java/org/tinytim/core/TestItemIdentifierConstraint.java 2008-09-04 11:36:23 UTC (rev 152) @@ -40,11 +40,11 @@ * * @param tmo The Topic Maps construct to test. */ - private void _testConstraint(final Construct tmo) { + private void _testConstraint(Construct tmo) throws Exception { assertTrue(tmo.getItemIdentifiers().isEmpty()); - final Locator iid = createLocator("http://sf.net/projects/tinytim"); - final Locator iid2 = createLocator("http://sf.net/projects/tinytim2"); - final Association assoc = createAssociation(); + Locator iid = createLocator("http://sf.net/projects/tinytim"); + Locator iid2 = createLocator("http://sf.net/projects/tinytim2"); + Association assoc = createAssociation(); assoc.addItemIdentifier(iid); assertFalse(tmo.getItemIdentifiers().contains(iid)); try { @@ -72,16 +72,16 @@ /** * Tests against a topic map. */ - public void testTopicMap() { + public void testTopicMap() throws Exception { _testConstraint(_tm); } /** * Tests againts a topic. */ - public void testTopic() { - final Topic topic = createTopic(); - final Locator iid = createLocator("http://sf.net/projects/tinytim"); + public void testTopic() throws Exception { + Topic topic = createTopic(); + Locator iid = createLocator("http://sf.net/projects/tinytim"); topic.addItemIdentifier(iid); assertTrue(topic.getItemIdentifiers().contains(iid)); Topic topic2 = createTopic(); @@ -107,35 +107,35 @@ /** * Tests against an association. */ - public void testAssociation() { + public void testAssociation() throws Exception { _testConstraint(createAssociation()); } /** * Tests against a role. */ - public void testRole() { + public void testRole() throws Exception { _testConstraint(createRole()); } /** * Tests against an occurrence. */ - public void testOccurrence() { + public void testOccurrence() throws Exception { _testConstraint(createOccurrence()); } /** * Tests against a name. */ - public void testName() { + public void testName() throws Exception { _testConstraint(createName()); } /** * Tests against a variant. */ - public void testVariant() { + public void testVariant() throws Exception { _testConstraint(createVariant()); } Modified: tinytim/trunk/src/test/java/org/tinytim/core/TestLiteral.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/TestLiteral.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/test/java/org/tinytim/core/TestLiteral.java 2008-09-04 11:36:23 UTC (rev 152) @@ -24,8 +24,8 @@ import org.tmapi.core.Locator; /** + * Tests against {@link Literal}. * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ Added: tinytim/trunk/src/test/java/org/tinytim/core/TestLiteralNormalizer.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/TestLiteralNormalizer.java (rev 0) +++ tinytim/trunk/src/test/java/org/tinytim/core/TestLiteralNormalizer.java 2008-09-04 11:36:23 UTC (rev 152) @@ -0,0 +1,79 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.core; + +/** + * Tests against the {@link LiteralNormalizer}. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +public class TestLiteralNormalizer extends TinyTimTestCase { + + public void testNormalizeBoolean() { + assertEquals("true", LiteralNormalizer.normalizeBoolean("1")); + assertEquals("true", LiteralNormalizer.normalizeBoolean("true")); + assertEquals("false", LiteralNormalizer.normalizeBoolean("0")); + assertEquals("false", LiteralNormalizer.normalizeBoolean("false")); + try { + LiteralNormalizer.normalizeBoolean("invalid"); + fail("Expected an IllegalArgumentException"); + } + catch (IllegalArgumentException ex) { + // noop. + } + } + + public void testNormalizeInteger() { + assertEquals("0", LiteralNormalizer.normalizeInteger("0")); + assertEquals("0", LiteralNormalizer.normalizeInteger("-0")); + assertEquals("1", LiteralNormalizer.normalizeInteger("+1")); + assertEquals("1", LiteralNormalizer.normalizeInteger("00001")); + assertEquals("-1", LiteralNormalizer.normalizeInteger("-1")); + assertEquals("-1", LiteralNormalizer.normalizeInteger("-00001")); + try { + LiteralNormalizer.normalizeInteger("invalid"); + fail("Expected an IllegalArgumentException"); + } + catch (IllegalArgumentException ex) { + // noop. + } + } + + public void testNormalizeDecimal() { + assertEquals("0.0", LiteralNormalizer.normalizeDecimal("0")); + assertEquals("0.0", LiteralNormalizer.normalizeDecimal("-0")); + assertEquals("0.0", LiteralNormalizer.normalizeDecimal("-0.0")); + assertEquals("0.0", LiteralNormalizer.normalizeDecimal("+0.0")); + assertEquals("0.0", LiteralNormalizer.normalizeDecimal("+00000.0000000")); + assertEquals("0.0", LiteralNormalizer.normalizeDecimal("-00000.0000000")); + assertEquals("10.0", LiteralNormalizer.normalizeDecimal("10")); + assertEquals("-10.0", LiteralNormalizer.normalizeDecimal("-10.00")); + assertEquals("10.0", LiteralNormalizer.normalizeDecimal("+10.00")); + try { + LiteralNormalizer.normalizeDecimal("invalid"); + fail("Expected an IllegalArgumentException"); + } + catch (IllegalArgumentException ex) { + // noop. + } + } +} Property changes on: tinytim/trunk/src/test/java/org/tinytim/core/TestLiteralNormalizer.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Modified: tinytim/trunk/src/test/java/org/tinytim/core/TestScope.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/core/TestScope.java 2008-08-26 16:57:58 UTC (rev 151) +++ tinytim/trunk/src/test/java/org/tinytim/core/TestScope.java 2008-09-04 11:36:23 UTC (rev 152) @@ -25,8 +25,8 @@ import org.tmapi.core.Topic; /** + * Tests against {@link Scope}. * - * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> * @version $Rev$ - $Date$ */ @@ -38,11 +38,11 @@ } public void testEquals() { - Topic theme1 = createTopic(); - Topic theme2 = createTopic(); - IScope scope1 = Scope.create(Arrays.asList(theme1, theme2)); + final Topic theme1 = createTopic(); + final Topic theme2 = createTopic(); + final IScope scope1 = Scope.create(Arrays.asList(theme1, theme2)); assertEquals(2, scope1.size()); - IScope scope2 = Scope.create(Arrays.asList(theme2, theme1)); + final IScope scope2 = Scope.create(Arrays.asList(theme2, theme1)); assertSame(scope1, scope2); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-26 16:57:47
|
Revision: 151 http://tinytim.svn.sourceforge.net/tinytim/?rev=151&view=rev Author: lheuer Date: 2008-08-26 16:57:58 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Tagged release Added Paths: ----------- tinytim/tags/release-2_0_0a1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-26 14:37:24
|
Revision: 150 http://tinytim.svn.sourceforge.net/tinytim/?rev=150&view=rev Author: lheuer Date: 2008-08-26 14:37:33 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Modified Paths: -------------- tinytim/trunk/lib/tmapi-2.0a1-tests.jar tinytim/trunk/lib/tmapi-2.0a1.jar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-25 14:54:50
|
Revision: 149 http://tinytim.svn.sourceforge.net/tinytim/?rev=149&view=rev Author: lheuer Date: 2008-08-25 14:54:55 +0000 (Mon, 25 Aug 2008) Log Message: ----------- Updated 1.5 docs Modified Paths: -------------- website/trunk/1.5/source/index.txt Added Paths: ----------- website/trunk/1.5/source/properties.txt Modified: website/trunk/1.5/source/index.txt =================================================================== --- website/trunk/1.5/source/index.txt 2008-08-25 14:07:12 UTC (rev 148) +++ website/trunk/1.5/source/index.txt 2008-08-25 14:54:55 UTC (rev 149) @@ -1,6 +1,13 @@ Documentation ============= +Welcome to tinyTiM, a small and lightweight in-memory Topic Maps engine + +tinyTiM provides a native implementation of the `Topic Maps API (TMAPI) <http://www.tmapi.org/>`_. + +It holds everything in-memory, so tinyTiM is reasonable fast and needs no setup; +just `download <http://sf.net/projects/tinytim>`_ and use it! :) + Contents: .. toctree:: Added: website/trunk/1.5/source/properties.txt =================================================================== --- website/trunk/1.5/source/properties.txt (rev 0) +++ website/trunk/1.5/source/properties.txt 2008-08-25 14:54:55 UTC (rev 149) @@ -0,0 +1,41 @@ +.. highlight:: java + +Properties +========== + +:Author: Lars Heuer (heuer[at]semagia.com) +:Date: $Date:$ +:Version: $Rev:$ + +You can configure tinyTiM through some properties. + +For convenience, the class ``org.tinytim.Property`` provides constants +for tinyTiM-specific properties. + +.. Note:: + + These properties are tinyTiM-specific, other TMAPI compatible Topic Maps + engines ignore them or may report failures. + + +CollectionFactory property +-------------------------- +tinyTiM provides two collection factories. The collection factory is used to +create instances of ``java.util.Map`` and ``java.util.Set``. If tinyTiM detects, +that the `Trove4J <http://trove4j.sourceforge.net/>`_ library is available, it +utilizes that library. If Trove4J is not available, it uses a collection factory +that utilizes the default Java collections. + +As said, tinyTiM tries to detect the approbate collection factory, but you can +configure the collection factory explicitly:: + + import org.tmapi.core.TopicMapSystemFactory; + import org.tmapi.core.TopicMapSystem; + + TopicMapSystemFactory tmSysFactory = TopicMapSystemFactory.newInstance(); + + // Sets the collection factory to the Java implementation even if Trove4J is available + tmSysFactory.setProperty("org.tinytim.CollectionFactory", "org.tinytim.JavaCollectionFactory"); + + TopicMapSystem tmSys = tmSysFactory.newTopicMapSystem(); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-25 14:07:04
|
Revision: 148 http://tinytim.svn.sourceforge.net/tinytim/?rev=148&view=rev Author: lheuer Date: 2008-08-25 14:07:12 +0000 (Mon, 25 Aug 2008) Log Message: ----------- - Updated JUnit to 4.5 (thanks Markus! ;) - Updated CHANGES.txt Modified Paths: -------------- tinytim/trunk/CHANGES.txt Added Paths: ----------- tinytim/trunk/lib/junit-4.5.jar Removed Paths: ------------- tinytim/trunk/lib/junit-4.4.jar Modified: tinytim/trunk/CHANGES.txt =================================================================== --- tinytim/trunk/CHANGES.txt 2008-08-21 16:42:01 UTC (rev 147) +++ tinytim/trunk/CHANGES.txt 2008-08-25 14:07:12 UTC (rev 148) @@ -2,9 +2,10 @@ Changes Log =========== -2.0.0 a1 (xx.08.2008) +2.0.0 a1 (26.08.2008) --------------------- * Implementation of the TMAPI 2.0 interfaces +* Internal code refactoring 1.5.0 beta (08.08.2008) Property changes on: tinytim/trunk/lib/junit-4.5.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-21 16:41:51
|
Revision: 147 http://tinytim.svn.sourceforge.net/tinytim/?rev=147&view=rev Author: lheuer Date: 2008-08-21 16:42:01 +0000 (Thu, 21 Aug 2008) Log Message: ----------- Unofficial tinytim-2.0.0a1-tests.jar forgotten :) Added Paths: ----------- tinytim-mio/trunk/lib/tinytim-2.0.0a1-tests.jar Property changes on: tinytim-mio/trunk/lib/tinytim-2.0.0a1-tests.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-21 16:41:13
|
Revision: 146 http://tinytim.svn.sourceforge.net/tinytim/?rev=146&view=rev Author: lheuer Date: 2008-08-21 16:41:21 +0000 (Thu, 21 Aug 2008) Log Message: ----------- Libs updated (unofficial tinytim-2.0.0a1.jar and tmapi-2.0a1.jar) Added Paths: ----------- tinytim-mio/trunk/lib/LICENSE.junit.html tinytim-mio/trunk/lib/LICENSE.tmapi.txt tinytim-mio/trunk/lib/slf4j-api-1.5.2.jar tinytim-mio/trunk/lib/slf4j-jdk14-1.5.2.jar tinytim-mio/trunk/lib/tinytim-2.0.0a1.jar tinytim-mio/trunk/lib/tmapi-2.0a1.jar Added: tinytim-mio/trunk/lib/LICENSE.junit.html =================================================================== --- tinytim-mio/trunk/lib/LICENSE.junit.html (rev 0) +++ tinytim-mio/trunk/lib/LICENSE.junit.html 2008-08-21 16:41:21 UTC (rev 146) @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<HTML> +<HEAD> +<TITLE>Common Public License - v 1.0</TITLE> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</HEAD> + +<BODY BGCOLOR="#FFFFFF" VLINK="#800000"> + + +<P ALIGN="CENTER"><B>Common Public License - v 1.0</B> +<P><B></B><FONT SIZE="3"></FONT> +<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT> +<P><FONT SIZE="2">"Contribution" means:</FONT> + +<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT"> +b) in the case of each subsequent Contributor:</FONT></UL> + + +<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL> + + +<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL> + + +<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL> + +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT> +<P><FONT SIZE="2"><B></B></FONT> +<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT> + +<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + + +<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + + +<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + + +<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + +<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT> +<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT> + +<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL> + + +<UL><FONT SIZE="2">b) its license agreement:</FONT></UL> + + +<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL> + + +<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL> + + +<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL> + + +<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL> + + +<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL> + +<P><FONT SIZE="2">When the Program is made available in source code form:</FONT> + +<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL> + + +<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL> + +<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT> +<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT> +<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT> +<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT> +<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"><B>7. GENERAL</B></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> + +</BODY> + +</HTML> \ No newline at end of file Added: tinytim-mio/trunk/lib/LICENSE.tmapi.txt =================================================================== --- tinytim-mio/trunk/lib/LICENSE.tmapi.txt (rev 0) +++ tinytim-mio/trunk/lib/LICENSE.tmapi.txt 2008-08-21 16:41:21 UTC (rev 146) @@ -0,0 +1,11 @@ +The Topic Maps API (TMAPI), 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. Property changes on: tinytim-mio/trunk/lib/slf4j-api-1.5.2.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: tinytim-mio/trunk/lib/slf4j-jdk14-1.5.2.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: tinytim-mio/trunk/lib/tinytim-2.0.0a1.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Property changes on: tinytim-mio/trunk/lib/tmapi-2.0a1.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lh...@us...> - 2008-08-21 16:22:57
|
Revision: 145 http://tinytim.svn.sourceforge.net/tinytim/?rev=145&view=rev Author: lheuer Date: 2008-08-21 16:23:07 +0000 (Thu, 21 Aug 2008) Log Message: ----------- Removed old libs Removed Paths: ------------- tinytim-mio/trunk/lib/semagia-mio-0.9.0.jar tinytim-mio/trunk/lib/semagia-mio-xtm-0.9.0.jar tinytim-mio/trunk/lib/slf4j-api-1.5.0.jar tinytim-mio/trunk/lib/slf4j-jdk14-1.5.0.jar tinytim-mio/trunk/lib/tmapi-1_0SP1.jar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |