Asimov Technologies
J2EE, JEE, PHP
Frank D. Martínez’s Blog
Software & Fun
Welcome to my technical blog. Here you can find my opinions and proposals over many software development things, mainly on open source projects.
VelFop = Velocity + Fop
I have developed a simple dynamic FOP processor with Velocity. I used it to make dynamic pdf reports and i got very good results.
You can download it from here:
- The jar file only: velfop.jar
You need to download velocity, fop and its dependencies from Apache. - The source code: velfop.zip
A Netbeans 6 project, A Basic example, and All dependency jars.
This is only a glue of two good projects from Apache.
For documentation please go to Apache projects homes.
Example usage:
// Velocity initialization.
VelocityEngine ve = new VelocityEngine();
ve.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM, this);
ve.setProperty(VelocityEngine.FILE_RESOURCE_LOADER_PATH,
new File(".").getCanonicalPath());
ve.init();
// Load the context.
Context context = new VelocityContext();
context.put("messages", Arrays.asList(
new String[] {"Message one", "Message Two", "Message three"}));
// Init source template and target output.
Template t = ve.getTemplate("src/report1.velfop");
FileOutputStream out = new FileOutputStream(
new File("./src/report1.pdf").getCanonicalPath());
// Do the magic
VelFopProcessor vfp = new VelFopProcessor();
vfp.merge(t, context, "application/pdf", out);
Xavar: SQL Query to XML,JSON,Text, etc .. For RESTful Applications.
Xavar is a small library I developed to provide some database queries through a RESTful interface in XML and JSON formats.
The basic feature is:
Make a hierarchic query to a relational database and serialize the output to an OutputStream. The serialization format must be pluggable.
And there is it: http://www.ibstaff.net/fmartinez/?page_id=9
You can extend it as you need because i published the source code under the LGPL. And it is designed thinking of pluggability of the executors.
This site contains personal opinions about many things and does not intend to be normative in any aspect.
Java, J2EE, J2SE, JEE, Are trademarks of Sun Microsystems Inc.
