001 /*
002 * Copyright (C) 2008-2009 Holger Arndt, A. Naegele and M. Bundschus
003 *
004 * This file is part of the Java Data Mining Package (JDMP).
005 * See the NOTICE file distributed with this work for additional
006 * information regarding copyright ownership and licensing.
007 *
008 * JDMP is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU Lesser General Public License as
010 * published by the Free Software Foundation; either version 2
011 * of the License, or (at your option) any later version.
012 *
013 * JDMP is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU Lesser General Public License for more details.
017 *
018 * You should have received a copy of the GNU Lesser General Public
019 * License along with JDMP; if not, write to the
020 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
021 * Boston, MA 02110-1301 USA
022 */
023
024 package org.jdmp.core.algorithm.basic;
025
026 import java.util.HashMap;
027 import java.util.Map;
028
029 import org.jdmp.core.JDMP;
030 import org.jdmp.core.algorithm.AbstractAlgorithm;
031 import org.jdmp.core.variable.Variable;
032 import org.ujmp.core.exceptions.MatrixException;
033
034 public class ShowLicense extends AbstractAlgorithm {
035 private static final long serialVersionUID = 363263434638588146L;
036
037 public static final String DESCRIPTION = "displays license information for JDMP";
038
039 public ShowLicense(Variable... variables) {
040 super();
041 setDescription(DESCRIPTION);
042 }
043
044 @Override
045 public Map<Object, Object> calculateObjects(Map<Object, Object> input) throws MatrixException {
046 Map<Object, Object> result = new HashMap<Object, Object>();
047 String s = "\n";
048 s += " Java Data Mining Package (JDMP)\n";
049 s += " Version " + JDMP.JDMPVERSION + "\n";
050 s += "Copyright (C) " + JDMP.COPYRIGHT + " " + JDMP.AUTHOR + "\n";
051 s += "\n";
052 s += "JDMP is free software; you can redistribute it and/or modify\n";
053 s += "it under the terms of the GNU Lesser General Public License as\n";
054 s += "published by the Free Software Foundation; either version 2\n";
055 s += "of the License, or (at your option) any later version.\n";
056 s += "\n";
057 s += "JDMP is distributed in the hope that it will be useful,\n";
058 s += "but WITHOUT ANY WARRANTY; without even the implied warranty of\n";
059 s += "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n";
060 s += "GNU Lesser General Public License for more details.\n";
061 s += "\n";
062 s += "\n";
063 s += " GNU LESSER GENERAL PUBLIC LICENSE\n";
064 s += " Version 3, 29 June 2007\n";
065 s += "\n";
066 s += "Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n";
067 s += "Everyone is permitted to copy and distribute verbatim copies\n";
068 s += "of this license document, but changing it is not allowed.\n";
069 s += "\n";
070 s += "\n";
071 s += " This version of the GNU Lesser General Public License incorporates\n";
072 s += "the terms and conditions of version 3 of the GNU General Public\n";
073 s += "License, supplemented by the additional permissions listed below.\n";
074 s += "\n";
075 s += " 0. Additional Definitions. \n";
076 s += "\n";
077 s += " As used herein, \"this License\" refers to version 3 of the GNU Lesser\n";
078 s += "General Public License, and the \"GNU GPL\" refers to version 3 of the GNU\n";
079 s += "General Public License.\n";
080 s += "\n";
081 s += " \"The Library\" refers to a covered work governed by this License,\n";
082 s += "other than an Application or a Combined Work as defined below.\n";
083 s += "\n";
084 s += " An \"Application\" is any work that makes use of an interface provided\n";
085 s += "by the Library, but which is not otherwise based on the Library.\n";
086 s += "Defining a subclass of a class defined by the Library is deemed a mode\n";
087 s += "of using an interface provided by the Library.\n";
088 s += "\n";
089 s += " A \"Combined Work\" is a work produced by combining or linking an\n";
090 s += "Application with the Library. The particular version of the Library\n";
091 s += "with which the Combined Work was made is also called the \"Linked\n";
092 s += "Version\".\n";
093 s += "\n";
094 s += " The \"Minimal Corresponding Source\" for a Combined Work means the\n";
095 s += "Corresponding Source for the Combined Work, excluding any source code\n";
096 s += "for portions of the Combined Work that, considered in isolation, are\n";
097 s += "based on the Application, and not on the Linked Version.\n";
098 s += "\n";
099 s += " The \"Corresponding Application Code\" for a Combined Work means the\n";
100 s += "object code and/or source code for the Application, including any data\n";
101 s += "and utility programs needed for reproducing the Combined Work from the\n";
102 s += "Application, but excluding the System Libraries of the Combined Work.\n";
103 s += "\n";
104 s += " 1. Exception to Section 3 of the GNU GPL.\n";
105 s += "\n";
106 s += " You may convey a covered work under sections 3 and 4 of this License\n";
107 s += "without being bound by section 3 of the GNU GPL.\n";
108 s += "\n";
109 s += " 2. Conveying Modified Versions.\n";
110 s += "\n";
111 s += " If you modify a copy of the Library, and, in your modifications, a\n";
112 s += "facility refers to a function or data to be supplied by an Application\n";
113 s += "that uses the facility (other than as an argument passed when the\n";
114 s += "facility is invoked), then you may convey a copy of the modified\n";
115 s += "version:\n";
116 s += "\n";
117 s += " a) under this License, provided that you make a good faith effort to\n";
118 s += " ensure that, in the event an Application does not supply the\n";
119 s += " function or data, the facility still operates, and performs\n";
120 s += " whatever part of its purpose remains meaningful, or\n";
121 s += "\n";
122 s += " b) under the GNU GPL, with none of the additional permissions of\n";
123 s += " this License applicable to that copy.\n";
124 s += "\n";
125 s += " 3. Object Code Incorporating Material from Library Header Files.\n";
126 s += "\n";
127 s += " The object code form of an Application may incorporate material from\n";
128 s += "a header file that is part of the Library. You may convey such object\n";
129 s += "code under terms of your choice, provided that, if the incorporated\n";
130 s += "material is not limited to numerical parameters, data structure\n";
131 s += "layouts and accessors, or small macros, inline functions and templates\n";
132 s += "(ten or fewer lines in length), you do both of the following:\n";
133 s += "\n";
134 s += " a) Give prominent notice with each copy of the object code that the\n";
135 s += " Library is used in it and that the Library and its use are\n";
136 s += " covered by this License.\n";
137 s += "\n";
138 s += " b) Accompany the object code with a copy of the GNU GPL and this license\n";
139 s += " document.\n";
140 s += "\n";
141 s += " 4. Combined Works.\n";
142 s += "\n";
143 s += " You may convey a Combined Work under terms of your choice that,\n";
144 s += "taken together, effectively do not restrict modification of the\n";
145 s += "portions of the Library contained in the Combined Work and reverse\n";
146 s += "engineering for debugging such modifications, if you also do each of\n";
147 s += "the following:\n";
148 s += "\n";
149 s += " a) Give prominent notice with each copy of the Combined Work that\n";
150 s += " the Library is used in it and that the Library and its use are\n";
151 s += " covered by this License.\n";
152 s += "\n";
153 s += " b) Accompany the Combined Work with a copy of the GNU GPL and this license\n";
154 s += " document.\n";
155 s += "\n";
156 s += " c) For a Combined Work that displays copyright notices during\n";
157 s += " execution, include the copyright notice for the Library among\n";
158 s += " these notices, as well as a reference directing the user to the\n";
159 s += " copies of the GNU GPL and this license document.\n";
160 s += "\n";
161 s += " d) Do one of the following:\n";
162 s += "\n";
163 s += " 0) Convey the Minimal Corresponding Source under the terms of this\n";
164 s += " License, and the Corresponding Application Code in a form\n";
165 s += " suitable for, and under terms that permit, the user to\n";
166 s += " recombine or relink the Application with a modified version of\n";
167 s += " the Linked Version to produce a modified Combined Work, in the\n";
168 s += " manner specified by section 6 of the GNU GPL for conveying\n";
169 s += " Corresponding Source.\n";
170 s += "\n";
171 s += " 1) Use a suitable shared library mechanism for linking with the\n";
172 s += " Library. A suitable mechanism is one that (a) uses at run time\n";
173 s += " a copy of the Library already present on the user's computer\n";
174 s += " system, and (b) will operate properly with a modified version\n";
175 s += " of the Library that is interface-compatible with the Linked\n";
176 s += " Version. \n";
177 s += "\n";
178 s += " e) Provide Installation Information, but only if you would otherwise\n";
179 s += " be required to provide such information under section 6 of the\n";
180 s += " GNU GPL, and only to the extent that such information is\n";
181 s += " necessary to install and execute a modified version of the\n";
182 s += " Combined Work produced by recombining or relinking the\n";
183 s += " Application with a modified version of the Linked Version. (If\n";
184 s += " you use option 4d0, the Installation Information must accompany\n";
185 s += " the Minimal Corresponding Source and Corresponding Application\n";
186 s += " Code. If you use option 4d1, you must provide the Installation\n";
187 s += " Information in the manner specified by section 6 of the GNU GPL\n";
188 s += " for conveying Corresponding Source.)\n";
189 s += "\n";
190 s += " 5. Combined Libraries.\n";
191 s += "\n";
192 s += " You may place library facilities that are a work based on the\n";
193 s += "Library side by side in a single library together with other library\n";
194 s += "facilities that are not Applications and are not covered by this\n";
195 s += "License, and convey such a combined library under terms of your\n";
196 s += "choice, if you do both of the following:\n";
197 s += "\n";
198 s += " a) Accompany the combined library with a copy of the same work based\n";
199 s += " on the Library, uncombined with any other library facilities,\n";
200 s += " conveyed under the terms of this License.\n";
201 s += "\n";
202 s += " b) Give prominent notice with the combined library that part of it\n";
203 s += " is a work based on the Library, and explaining where to find the\n";
204 s += " accompanying uncombined form of the same work.\n";
205 s += "\n";
206 s += " 6. Revised Versions of the GNU Lesser General Public License.\n";
207 s += "\n";
208 s += " The Free Software Foundation may publish revised and/or new versions\n";
209 s += "of the GNU Lesser General Public License from time to time. Such new\n";
210 s += "versions will be similar in spirit to the present version, but may\n";
211 s += "differ in detail to address new problems or concerns.\n";
212 s += "\n";
213 s += " Each version is given a distinguishing version number. If the\n";
214 s += "Library as you received it specifies that a certain numbered version\n";
215 s += "of the GNU Lesser General Public License \"or any later version\"\n";
216 s += "applies to it, you have the option of following the terms and\n";
217 s += "conditions either of that published version or of any later version\n";
218 s += "published by the Free Software Foundation. If the Library as you\n";
219 s += "received it does not specify a version number of the GNU Lesser\n";
220 s += "General Public License, you may choose any version of the GNU Lesser\n";
221 s += "General Public License ever published by the Free Software Foundation.\n";
222 s += "\n";
223 s += " If the Library as you received it specifies that a proxy can decide\n";
224 s += "whether future versions of the GNU Lesser General Public License shall\n";
225 s += "apply, that proxy's public statement of acceptance of any version is\n";
226 s += "permanent authorization for you to choose that version for the\n";
227 s += "Library.\n";
228 s += "\n";
229 s += "\n";
230 result.put(TARGET, s);
231 return result;
232 }
233
234 }