1:
31:
32: package ;
33:
34: import ;
35:
36: import ;
37: import ;
38: import ;
39: import ;
40: import ;
41: import ;
42: import ;
43: import ;
44: import ;
45: import ;
46: import ;
47:
48:
53: public class JFreeReportInfo extends ProjectInfo
54: {
55:
63: public static final String REPORT_NAMESPACE =
64: "http://jfreereport.sourceforge.net/namespaces/engine";
65:
66:
73: public static final String COMPATIBILITY_NAMESPACE =
74: "http://jfreereport.sourceforge.net/namespaces/engine/compatibility";
75:
76: private static JFreeReportInfo instance;
77:
78: public static synchronized JFreeReportInfo getInstance()
79: {
80: if (instance == null)
81: {
82: instance = new JFreeReportInfo();
83: }
84: return instance;
85: }
86:
87:
92: private JFreeReportInfo ()
93: {
94: setName("JFreeReport");
95: setVersion("0.9.2");
96: setInfo("http://reporting.pentaho.org/");
97: setCopyright
98: ("(C)opyright 2000-2007, by Pentaho Corporation, Object Refinery Limited and Contributors");
99:
100: setContributors(Arrays.asList(new Contributor[]
101: {
102: new Contributor("David Gilbert", "david.gilbert@object-refinery.com"),
103: new Contributor("Thomas Morgner", "taqua@users.sourceforge.net"),
104: new Contributor("J\u00d6rg Sch\u00d6mer", "joerg.schoemer@nikocity.de"),
105: new Contributor("Heiko Evermann", "-"),
106: new Contributor("Piotr Bzdyl", "-"),
107: new Contributor("Patrice Rolland", "-"),
108: new Contributor("Cedric Pronzato", "mimil@users.sourceforge.get"),
109: new Contributor("Maciej Wegorkiewicz", "-"),
110: new Contributor("Michael Tennes", "michael@tennes.com"),
111: new Contributor("Dmitri Colebatch", "dimc@users.sourceforge.net"),
112: new Contributor("J\u00d6rg Schaible", "joehni@users.sourceforge.net"),
113: new Contributor("Marc Casas", "-"),
114: new Contributor("Ramon Juanes", "-"),
115: new Contributor("Demeter F. Tamas", "-"),
116: new Contributor("Hendri Smit", "-"),
117: new Contributor("Sergey M Mozgovoi", "-"),
118: new Contributor("Thomas Dilts", "-"),
119: new Contributor("Illka", "ipriha@users.sourceforge.net"),
120: }));
121:
122: addLibrary(JCommon.INFO);
123: addLibrary(JCommonSerializerInfo.getInstance());
124: addLibrary(LibLoaderInfo.getInstance());
125: addLibrary(LibLayoutInfo.getInstance());
126: addLibrary(LibFormulaInfo.getInstance());
127: addLibrary(LibXmlInfo.getInstance());
128:
129: final BootableProjectInfo pixieLibraryInfo = tryLoadPixieInfo();
130: if (pixieLibraryInfo != null)
131: {
132: addLibrary(pixieLibraryInfo);
133: }
134: final BootableProjectInfo libfontsLibraryInfo = tryLoadLibFontInfo();
135: if (libfontsLibraryInfo != null)
136: {
137: addLibrary(libfontsLibraryInfo);
138: }
139:
140: setBootClass(JFreeReportBoot.class.getName());
141: }
142:
143:
149: private static BootableProjectInfo tryLoadPixieInfo ()
150: {
151: try
152: {
153: return (BootableProjectInfo) ObjectUtilities.loadAndInstantiate
154: ("org.jfree.pixie.PixieInfo", JFreeReportInfo.class,
155: BootableProjectInfo.class);
156: }
157: catch (Exception e)
158: {
159: return null;
160: }
161: }
162:
163:
169: private static BootableProjectInfo tryLoadLibFontInfo ()
170: {
171: try
172: {
173: return (BootableProjectInfo) ObjectUtilities.loadAndInstantiate
174: ("org.jfree.fonts.LibFontInfo",
175: JFreeReportInfo.class, BootableProjectInfo.class);
176: }
177: catch (Exception e)
178: {
179: return null;
180: }
181: }
182:
183:
188: public static boolean isPixieAvailable ()
189: {
190: return tryLoadPixieInfo() != null;
191: }
192:
193:
201: public String getLicenceText ()
202: {
203: return Licences.getInstance().getLGPL();
204: }
205:
206:
214: public static void main (final String[] args)
215: {
216: final JFreeReportInfo info = new JFreeReportInfo();
217: System.out.println(info.getName() + " " + info.getVersion());
218: System.out.println("----------------------------------------------------------------");
219: System.out.println(info.getCopyright());
220: System.out.println(info.getInfo());
221: System.out.println("----------------------------------------------------------------");
222: System.out.println("This project is licenced under the terms of the "
223: + info.getLicenceName() + ".");
224: System.exit(0);
225: }
226: }
227: