libserializer-1.1.6/0000755000175000017500000000000011636153535013033 5ustar renerenelibserializer-1.1.6/source/0000755000175000017500000000000011365605356014335 5ustar renerenelibserializer-1.1.6/source/overview.html0000644000175000017500000000013311365605356017066 0ustar renerene The JCommon-Serializer is a generic serialization framework. libserializer-1.1.6/source/org/0000755000175000017500000000000011365605356015124 5ustar renerenelibserializer-1.1.6/source/org/pentaho/0000755000175000017500000000000011365605356016562 5ustar renerenelibserializer-1.1.6/source/org/pentaho/reporting/0000755000175000017500000000000011365605356020573 5ustar renerenelibserializer-1.1.6/source/org/pentaho/reporting/libraries/0000755000175000017500000000000011365605356022547 5ustar renerenelibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/0000755000175000017500000000000011365605356024720 5ustar renerenelibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/0000755000175000017500000000000011365605356026363 5ustar renerene././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/RoundRectangle2DSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/RoundRectangle2DSerial0000644000175000017500000000604611365605356032556 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles Rectangle2D objects. * * @author Thomas Morgner * @see Rectangle2D */ public class RoundRectangle2DSerializer implements SerializeMethod { /** * Default Constructor. */ public RoundRectangle2DSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final RoundRectangle2D rectangle = (RoundRectangle2D) o; out.writeDouble(rectangle.getX()); out.writeDouble(rectangle.getY()); out.writeDouble(rectangle.getWidth()); out.writeDouble(rectangle.getHeight()); out.writeDouble(rectangle.getArcWidth()); out.writeDouble(rectangle.getArcHeight()); } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final double x = in.readDouble(); final double y = in.readDouble(); final double w = in.readDouble(); final double h = in.readDouble(); final double aw = in.readDouble(); final double ah = in.readDouble(); return new RoundRectangle2D.Double(x, y, w, h, aw, ah); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.geom.Rectangle2D. */ public Class getObjectClass () { return RoundRectangle2D.class; } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Line2DSerializer.java0000644000175000017500000000536411365605356032345 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Line2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles Line2D objects. * * @author Thomas Morgner * @see java.awt.geom.Line2D */ public class Line2DSerializer implements SerializeMethod { /** * Default Constructor. */ public Line2DSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final Line2D line = (Line2D) o; out.writeDouble(line.getX1()); out.writeDouble(line.getY1()); out.writeDouble(line.getX2()); out.writeDouble(line.getY2()); } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final double x1 = in.readDouble(); final double y1 = in.readDouble(); final double x2 = in.readDouble(); final double y2 = in.readDouble(); return new Line2D.Double(x1, y1, x2, y2); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.geom.Line2D. */ public Class getObjectClass () { return Line2D.class; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/GeneralPathSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/GeneralPathSerializer.0000644000175000017500000001257511365605356032622 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import java.awt.geom.PathIterator; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A serialize method that handles java.awt.geom.GeneralPath objects. * * @author Thomas Morgner */ public class GeneralPathSerializer implements SerializeMethod { /** * Default constructor. */ public GeneralPathSerializer () { } /** * The class of the object, which this object can serialize. * * @return the class of the object type, which this method handles. */ public Class getObjectClass () { return GeneralPath.class; } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws java.io.IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final int winding = in.readInt(); final GeneralPath gp = new GeneralPath(winding); // type will be -1 at the end of the GPath .. int type = in.readInt(); while (type >= 0) { switch (type) { case PathIterator.SEG_MOVETO: { final float x = in.readFloat(); final float y = in.readFloat(); gp.moveTo(x, y); break; } case PathIterator.SEG_LINETO: { final float x = in.readFloat(); final float y = in.readFloat(); gp.lineTo(x, y); break; } case PathIterator.SEG_QUADTO: { final float x1 = in.readFloat(); final float y1 = in.readFloat(); final float x2 = in.readFloat(); final float y2 = in.readFloat(); gp.quadTo(x1, y1, x2, y2); break; } case PathIterator.SEG_CUBICTO: { final float x1 = in.readFloat(); final float y1 = in.readFloat(); final float x2 = in.readFloat(); final float y2 = in.readFloat(); final float x3 = in.readFloat(); final float y3 = in.readFloat(); gp.curveTo(x1, y1, x2, y2, x3, y3); break; } case PathIterator.SEG_CLOSE: { break; } default: throw new IOException("Unexpected type encountered: " + type); } type = in.readInt(); } return gp; } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws java.io.IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final GeneralPath gp = (GeneralPath) o; final PathIterator it = gp.getPathIterator(new AffineTransform()); out.writeInt(it.getWindingRule()); while (it.isDone() == false) { final float[] corrds = new float[6]; final int type = it.currentSegment(corrds); out.writeInt(type); switch (type) { case PathIterator.SEG_MOVETO: { out.writeFloat(corrds[0]); out.writeFloat(corrds[1]); break; } case PathIterator.SEG_LINETO: { out.writeFloat(corrds[0]); out.writeFloat(corrds[1]); break; } case PathIterator.SEG_QUADTO: { out.writeFloat(corrds[0]); out.writeFloat(corrds[1]); out.writeFloat(corrds[2]); out.writeFloat(corrds[3]); break; } case PathIterator.SEG_CUBICTO: { out.writeFloat(corrds[0]); out.writeFloat(corrds[1]); out.writeFloat(corrds[2]); out.writeFloat(corrds[3]); out.writeFloat(corrds[4]); out.writeFloat(corrds[5]); break; } case PathIterator.SEG_CLOSE: { break; } default: throw new IOException("Unexpected type encountered: " + type); } it.next(); } out.writeInt(-1); } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/package.html0000644000175000017500000000012611365605356030643 0ustar renerene Handler classes for the SerizalizeHelper. ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/BasicStrokeSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/BasicStrokeSerializer.0000644000175000017500000000600611365605356032631 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.BasicStroke; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles BasicStrokes. * * @author Thomas Morgner * @see BasicStroke */ public class BasicStrokeSerializer implements SerializeMethod { /** * Default Constructor. */ public BasicStrokeSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param stream the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream stream) throws IOException { final BasicStroke s = (BasicStroke) o; stream.writeFloat(s.getLineWidth()); stream.writeInt(s.getEndCap()); stream.writeInt(s.getLineJoin()); stream.writeFloat(s.getMiterLimit()); stream.writeObject(s.getDashArray()); stream.writeFloat(s.getDashPhase()); } /** * Reads the object from the object input stream. * * @param stream the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream stream) throws IOException, ClassNotFoundException { final float width = stream.readFloat(); final int cap = stream.readInt(); final int join = stream.readInt(); final float miterLimit = stream.readFloat(); final float[] dash = (float[]) stream.readObject(); final float dashPhase = stream.readFloat(); return new BasicStroke(width, cap, join, miterLimit, dash, dashPhase); } /** * The class of the object, which this object can serialize. * * @return the class java.awt.BasicStroke. */ public Class getObjectClass () { return BasicStroke.class; } } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Ellipse2DSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Ellipse2DSerializer.ja0000644000175000017500000000543611365605356032524 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Ellipse2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles Ellipse2D objects. * * @author Thomas Morgner * @see java.awt.geom.Ellipse2D */ public class Ellipse2DSerializer implements SerializeMethod { /** * Default Constructor. */ public Ellipse2DSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final Ellipse2D ellipse = (Ellipse2D) o; out.writeDouble(ellipse.getX()); out.writeDouble(ellipse.getY()); out.writeDouble(ellipse.getWidth()); out.writeDouble(ellipse.getHeight()); } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final double x = in.readDouble(); final double y = in.readDouble(); final double w = in.readDouble(); final double h = in.readDouble(); return new Ellipse2D.Double(x, y, w, h); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.geom.Ellipse2D. */ public Class getObjectClass () { return Ellipse2D.class; } } ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/AttributedStringSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/AttributedStringSerial0000644000175000017500000001031111365605356032740 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.ObjectInputStream; import java.text.AttributedCharacterIterator; import java.text.CharacterIterator; import java.text.AttributedString; import java.util.Map; import java.util.HashMap; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A serializer-method to serialize and deserialize attributed-strings. * * @author Thomas Morgner */ public class AttributedStringSerializer implements SerializeMethod { /** * Default constructor. */ public AttributedStringSerializer() { } /** * Writes a serializable object description to the given object output * stream. * * @param o the to be serialized object. * @param stream the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject(Object o, ObjectOutputStream stream) throws IOException { AttributedString as = (AttributedString) o; AttributedCharacterIterator aci = as.getIterator(); // build a plain string from aci // then write the string StringBuffer plainStr = new StringBuffer(100); char current = aci.first(); while (current != CharacterIterator.DONE) { plainStr = plainStr.append(current); current = aci.next(); } stream.writeObject(plainStr.toString()); // then write the attributes and limits for each run current = aci.first(); int begin = aci.getBeginIndex(); while (current != CharacterIterator.DONE) { // write the current character - when the reader sees that this // is not CharacterIterator.DONE, it will know to read the // run limits and attributes stream.writeChar(current); // now write the limit, adjusted as if beginIndex is zero int limit = aci.getRunLimit(); stream.writeInt(limit - begin); // now write the attribute set Map atts = new HashMap(aci.getAttributes()); stream.writeObject(atts); current = aci.setIndex(limit); } // write a character that signals to the reader that all runs // are done... stream.writeChar(CharacterIterator.DONE); } /** * Reads the object from the object input stream. * * @param stream the object input stream from where to read the serialized data. * @return the generated object. * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { // read string and attributes then create result String plainStr = (String) stream.readObject(); AttributedString result = new AttributedString(plainStr); char c = stream.readChar(); int start = 0; while (c != CharacterIterator.DONE) { int limit = stream.readInt(); Map atts = (Map) stream.readObject(); result.addAttributes(atts, start, limit); start = limit; c = stream.readChar(); } return result; } /** * The class of the object, which this object can serialize. * * @return the class of the object type, which this method handles. */ public Class getObjectClass() { return AttributedString.class; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Rectangle2DSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Rectangle2DSerializer.0000644000175000017500000000547411365605356032522 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Rectangle2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles Rectangle2D objects. * * @author Thomas Morgner * @see java.awt.geom.Rectangle2D */ public class Rectangle2DSerializer implements SerializeMethod { /** * Default Constructor. */ public Rectangle2DSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final Rectangle2D rectangle = (Rectangle2D) o; out.writeDouble(rectangle.getX()); out.writeDouble(rectangle.getY()); out.writeDouble(rectangle.getWidth()); out.writeDouble(rectangle.getHeight()); } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final double x = in.readDouble(); final double y = in.readDouble(); final double w = in.readDouble(); final double h = in.readDouble(); return new Rectangle2D.Double(x, y, w, h); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.geom.Rectangle2D. */ public Class getObjectClass () { return Rectangle2D.class; } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Arc2DSerializer.java0000644000175000017500000000600111365605356032150 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Arc2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A serialize-Method for Arc-2D Shapes. * * @author Thomas Morgner */ public class Arc2DSerializer implements SerializeMethod { /** * Default constructor. */ public Arc2DSerializer() { } /** * Writes a serializable object description to the given object output * stream. * * @param o the to be serialized object. * @param stream the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject(Object o, ObjectOutputStream stream) throws IOException { final Arc2D arc = (Arc2D) o; stream.writeDouble(arc.getX()); stream.writeDouble(arc.getY()); stream.writeDouble(arc.getWidth()); stream.writeDouble(arc.getHeight()); stream.writeDouble(arc.getAngleStart()); stream.writeDouble(arc.getAngleExtent()); stream.writeInt(arc.getArcType()); } /** * Reads the object from the object input stream. * * @param stream the object input stream from where to read the serialized data. * @return the generated object. * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { final double x = stream.readDouble(); final double y = stream.readDouble(); final double w = stream.readDouble(); final double h = stream.readDouble(); final double as = stream.readDouble(); // Angle Start final double ae = stream.readDouble(); // Angle Extent final int at = stream.readInt(); // Arc type return new Arc2D.Double(x, y, w, h, as, ae, at); } /** * The class of the object, which this object can serialize. * * @return the class of the object type, which this method handles. */ public Class getObjectClass() { return Arc2D.class; } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Point2DSerializer.java0000644000175000017500000000514011365605356032537 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Point2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles Point2D objects. * * @author Thomas Morgner * @see java.awt.geom.Point2D */ public class Point2DSerializer implements SerializeMethod { /** * Default Constructor. */ public Point2DSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final Point2D point = (Point2D) o; out.writeDouble(point.getX()); out.writeDouble(point.getY()); } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final double x = in.readDouble(); final double y = in.readDouble(); return new Point2D.Double(x, y); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.geom.Point2D. */ public Class getObjectClass () { return Point2D.class; } } ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/PageFormatSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/PageFormatSerializer.j0000644000175000017500000001002011365605356032606 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.print.PageFormat; import java.awt.print.Paper; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * A SerializeMethod implementation that handles PageFormat objects. * * @author Thomas Morgner * @see java.awt.print.PageFormat */ public class PageFormatSerializer implements SerializeMethod { /** * Default Constructor. */ public PageFormatSerializer () { } /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (final Object o, final ObjectOutputStream out) throws IOException { final PageFormat pf = (PageFormat) o; out.writeObject(resolvePageFormat(pf)); } /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (final ObjectInputStream in) throws IOException, ClassNotFoundException { final Object[] pageFormatResolve = (Object[]) in.readObject(); return createPageFormat(pageFormatResolve); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.print.PageFormat. */ public Class getObjectClass () { return PageFormat.class; } /** * Resolves a page format, so that the result can be serialized. * * @param format the page format that should be prepared for serialisation. * @return the prepared page format data. */ private Object[] resolvePageFormat (final PageFormat format) { final Integer orientation = new Integer(format.getOrientation()); final Paper p = format.getPaper(); final float[] fdim = new float[]{(float) p.getWidth(), (float) p.getHeight()}; final float[] rect = new float[]{(float) p.getImageableX(), (float) p.getImageableY(), (float) p.getImageableWidth(), (float) p.getImageableHeight()}; return new Object[]{orientation, fdim, rect}; } /** * Restores a page format after it has been serialized. * * @param data the serialized page format data. * @return the restored page format. */ private PageFormat createPageFormat (final Object[] data) { final Integer orientation = (Integer) data[0]; final float[] dim = (float[]) data[1]; final float[] rect = (float[]) data[2]; final Paper p = new Paper(); p.setSize(dim[0], dim[1]); p.setImageableArea(rect[0], rect[1], rect[2], rect[3]); final PageFormat format = new PageFormat(); format.setPaper(p); format.setOrientation(orientation.intValue()); return format; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Dimension2DSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/Dimension2DSerializer.0000644000175000017500000000555111365605356032537 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.geom.Dimension2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; import org.pentaho.reporting.libraries.base.util.FloatDimension; /** * A SerializeMethod implementation that handles Dimension2D objects. * * @author Thomas Morgner * @see java.awt.geom.Dimension2D */ public class Dimension2DSerializer implements SerializeMethod { /** * Default Constructor. */ public Dimension2DSerializer() { } /** * Writes a serializable object description to the given object output stream. This method writes the width and the * height of the dimension into the stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject(final Object o, final ObjectOutputStream out) throws IOException { final Dimension2D dim = (Dimension2D) o; out.writeDouble(dim.getWidth()); out.writeDouble(dim.getHeight()); } /** * Reads the object from the object input stream. This read the width and height and constructs a new FloatDimension * object. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { final double w = in.readDouble(); final double h = in.readDouble(); return new FloatDimension((float) w, (float) h); } /** * Returns the class of the object, which this object can serialize. * * @return the class of java.awt.geom.Dimension2D. */ public Class getObjectClass() { return Dimension2D.class; } } ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/GradientPaintSerializer.javalibserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/methods/GradientPaintSerialize0000644000175000017500000000631311365605356032712 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer.methods; import java.awt.Color; import java.awt.GradientPaint; import java.awt.geom.Point2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.pentaho.reporting.libraries.serializer.SerializeMethod; /** * SerializeMethod for GradientPaint objects. * * @author Thomas Morgner */ public class GradientPaintSerializer implements SerializeMethod { /** * Default constructor. */ public GradientPaintSerializer() { } /** * Writes a serializable object description to the given object output * stream. * * @param o the to be serialized object. * @param stream the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject(Object o, ObjectOutputStream stream) throws IOException { final GradientPaint gp = (GradientPaint) o; final Point2D point2D1 = gp.getPoint1(); stream.writeFloat((float) point2D1.getX()); stream.writeFloat((float) point2D1.getY()); stream.writeObject(gp.getColor1()); final Point2D point2D = gp.getPoint2(); stream.writeFloat((float) point2D.getX()); stream.writeFloat((float) point2D.getY()); stream.writeObject(gp.getColor2()); stream.writeBoolean(gp.isCyclic()); } /** * Reads the object from the object input stream. * * @param stream the object input stream from where to read the serialized data. * @return the generated object. * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { final float x1 = stream.readFloat(); final float y1 = stream.readFloat(); final Color c1 = (Color) stream.readObject(); final float x2 = stream.readFloat(); final float y2 = stream.readFloat(); final Color c2 = (Color) stream.readObject(); final boolean isCyclic = stream.readBoolean(); return new GradientPaint(x1, y1, c1, x2, y2, c2, isCyclic); } /** * The class of the object, which this object can serialize. * * @return the class of the object type, which this method handles. */ public Class getObjectClass() { return GradientPaint.class; } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java0000644000175000017500000002142211365605356031035 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer; import java.io.IOException; import java.io.NotSerializableException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.HashMap; import java.util.Iterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.pentaho.reporting.libraries.base.config.Configuration; import org.pentaho.reporting.libraries.base.util.ObjectUtilities; import org.pentaho.reporting.libraries.base.util.DebugLog; /** * The SerializeHelper is used to make implementing custom serialization * handlers easier. Handlers for certain object types need to be added to this * helper before this implementation is usable. * * @author Thomas Morgner */ public class SerializerHelper { private static final Log logger = LogFactory.getLog(SerializerHelper.class); /** * The singleton instance of the serialize helper. */ private static SerializerHelper singleton; /** * Returns or creates a new SerializerHelper. When a new instance is created * by this method, all known SerializeMethods are registered. * * @return the SerializerHelper singleton instance. */ public static synchronized SerializerHelper getInstance() { if (singleton == null) { singleton = new SerializerHelper(); singleton.registerMethods(); } return singleton; } /** * This method can be used to replace the singleton instance of this helper. * * @param helper the new instance of the serialize helper. */ protected static void setInstance(final SerializerHelper helper) { singleton = helper; } /** * A collection of the serializer methods. */ private final HashMap methods; /** * A class comparator for searching the super class of an certain class. */ private final ClassComparator comparator; /** * Creates a new SerializerHelper. */ protected SerializerHelper() { this.comparator = new ClassComparator(); this.methods = new HashMap(); } /** * Registers a new SerializeMethod with this SerializerHelper. * * @param method the method that should be registered. */ public synchronized void registerMethod(final SerializeMethod method) { this.methods.put(method.getObjectClass(), method); } /** * Traverses the configuration and registers all serialization handlers in this factory. */ protected void registerMethods() { final Configuration config = LibSerializerBoot.getInstance().getGlobalConfig(); final Iterator sit = config.findPropertyKeys("org.pentaho.reporting.libraries.serializer.handler."); while (sit.hasNext()) { final String configkey = (String) sit.next(); final String c = config.getConfigProperty(configkey); final Object maybeModule = ObjectUtilities.loadAndInstantiate (c, SerializerHelper.class, SerializeMethod.class); if (maybeModule != null) { final SerializeMethod module = (SerializeMethod) maybeModule; registerMethod(module); } else { logger.warn("Invalid SerializeMethod implementation: " + c); } } } /** * Deregisters a new SerializeMethod with this SerializerHelper. * * @param method the method that should be deregistered. */ public synchronized void unregisterMethod(final SerializeMethod method) { this.methods.remove(method.getObjectClass()); } /** * Returns the collection of all registered serialize methods. * * @return a collection of the registered serialize methods. */ protected HashMap getMethods() { return methods; } /** * Returns the class comparator instance used to find correct super classes. * * @return the class comparator. */ protected ClassComparator getComparator() { return comparator; } /** * Looks up the SerializeMethod for the given class or null if there is no * SerializeMethod for the given class. * * @param c the class for which we want to lookup a serialize method. * @return the method or null, if there is no registered method for the * class. */ protected SerializeMethod getSerializer(final Class c) { final SerializeMethod sm = (SerializeMethod) methods.get(c); if (sm != null) { return sm; } return getSuperClassObjectDescription(c); } /** * Looks up the SerializeMethod for the given class or null if there is no * SerializeMethod for the given class. This method searches all * superclasses. * * @param d the class for which we want to lookup a serialize * method. * @return the method or null, if there is no registered method for the * class. */ protected SerializeMethod getSuperClassObjectDescription (final Class d) { SerializeMethod knownSuperClass = null; final Iterator keys = methods.keySet().iterator(); while (keys.hasNext()) { final Class keyClass = (Class) keys.next(); if (keyClass.isAssignableFrom(d)) { final SerializeMethod od = (SerializeMethod) methods.get(keyClass); if (knownSuperClass == null) { knownSuperClass = od; } else { if (comparator.isComparable (knownSuperClass.getObjectClass(), od.getObjectClass())) { if (comparator.compare (knownSuperClass.getObjectClass(), od.getObjectClass()) < 0) { knownSuperClass = od; } } } } } return knownSuperClass; } /** * Writes a serializable object description to the given object output stream. * This method selects the best serialize helper method for the given object. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public synchronized void writeObject(final Object o, final ObjectOutputStream out) throws IOException { try { if (o == null) { out.writeByte(0); return; } if (o instanceof Serializable) { out.writeByte(1); out.writeObject(o); return; } final SerializeMethod m = getSerializer(o.getClass()); if (m == null) { throw new NotSerializableException(o.getClass().getName()); } out.writeByte(2); out.writeObject(m.getObjectClass()); m.writeObject(o, out); } catch (NotSerializableException nse) { DebugLog.log("Unable to serialize object: " + o); throw nse; } } public synchronized boolean isSerializable(final Object o) { if (o == null) { return true; } if (o instanceof Serializable) { return true; } final SerializeMethod m = getSerializer(o.getClass()); return m != null; } /** * Reads the object from the object input stream. This object selects the best * serializer to read the object. *

* Make sure, that you use the same configuration (library and class versions, * registered methods in the SerializerHelper) for reading as you used for * writing. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public synchronized Object readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { final int type = in.readByte(); if (type == 0) { return null; } if (type == 1) { return in.readObject(); } final Class c = (Class) in.readObject(); final SerializeMethod m = getSerializer(c); if (m == null) { throw new NotSerializableException(c.getName()); } return m.readObject(in); } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/ClassComparator.java0000644000175000017500000001007511365605356030663 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer; import java.util.Comparator; import java.io.Serializable; /** * The class comparator can be used to compare and sort classes and their * superclasses. The comparator is not able to compare classes which have * no relation... * * @author Thomas Morgner */ public class ClassComparator implements Comparator, Serializable { /** For serialization. */ private static final long serialVersionUID = -5225335361837391120L; /** * Defaultconstructor. */ public ClassComparator() { super(); } /** * Compares its two arguments for order. Returns a negative integer, * zero, or a positive integer as the first argument is less than, equal * to, or greater than the second.

*

* Note: throws ClassCastException if the arguments' types prevent them from * being compared by this Comparator. * And IllegalArgumentException if the classes share no relation. * * The implementor must ensure that sgn(compare(x, y)) == * -sgn(compare(y, x)) for all x and y. (This * implies that compare(x, y) must throw an exception if and only * if compare(y, x) throws an exception.)

* * The implementor must also ensure that the relation is transitive: * ((compare(x, y)>0) && (compare(y, z)>0)) implies * compare(x, z)>0.

* * Finally, the implementer must ensure that compare(x, y)==0 * implies that sgn(compare(x, z))==sgn(compare(y, z)) for all * z.

* * It is generally the case, but not strictly required that * (compare(x, y)==0) == (x.equals(y)). Generally speaking, * any comparator that violates this condition should clearly indicate * this fact. The recommended language is "Note: this comparator * imposes orderings that are inconsistent with equals." * * @param o1 the first object to be compared. * @param o2 the second object to be compared. * @return a negative integer, zero, or a positive integer as the * first argument is less than, equal to, or greater than the * second. */ public int compare(final Object o1, final Object o2) { final Class c1 = (Class) o1; final Class c2 = (Class) o2; if (c1.equals(o2)) { return 0; } if (c1.isAssignableFrom(c2)) { return -1; } else { if (!c2.isAssignableFrom(c2)) { throw new IllegalArgumentException( "The classes share no relation" ); } return 1; } } /** * Checks, whether the given classes are comparable. This method will * return true, if one of the classes is assignable from the other class. * * @param c1 the first class to compare * @param c2 the second class to compare * @return true, if the classes share a direct relation, false otherwise. */ public boolean isComparable(final Class c1, final Class c2) { return (c1.isAssignableFrom(c2) || c2.isAssignableFrom(c1)); } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/LibSerializerBoot.java0000644000175000017500000000461611365605356031156 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer; import org.pentaho.reporting.libraries.base.boot.AbstractBoot; import org.pentaho.reporting.libraries.base.config.Configuration; import org.pentaho.reporting.libraries.base.versioning.ProjectInformation; /** * The boot class guarantees a controlled initialization of the library. * * @author Thomas Morgner */ public class LibSerializerBoot extends AbstractBoot { private static LibSerializerBoot instance; /** * Returns a singleton instance of the boot class. * * @return the singleton booter. */ public static synchronized LibSerializerBoot getInstance() { if (instance == null) { instance = new LibSerializerBoot(); } return instance; } /** * Private constructor to prevent object creation. */ private LibSerializerBoot() { } /** * Loads the configuration. This will be called exactly once. * * @return The configuration. */ protected Configuration loadConfiguration() { return createDefaultHierarchicalConfiguration ("/org/pentaho/reporting/libraries/serializer/libserializer.properties", "/libserializer.properties", true, LibSerializerBoot.class); } /** * Performs the boot. This method is empty, as this library does not require any manual initializations. */ protected void performBoot() { } /** * Returns the project info. * * @return The project info. */ protected ProjectInformation getProjectInfo() { return LibSerializerInfo.getInstance(); } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/libserializer.properties0000644000175000017500000000340711365605356031702 0ustar renerene# # All known serialization handlers. # The format is simple: # org.pentaho.reporting.libraries.serializer.handler.= org.pentaho.reporting.libraries.serializer.handler.java.awt.GradientPaint=org.pentaho.reporting.libraries.serializer.methods.GradientPaintSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.BasicStroke=org.pentaho.reporting.libraries.serializer.methods.BasicStrokeSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.Dimension2D=org.pentaho.reporting.libraries.serializer.methods.Dimension2DSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.Ellipse2D=org.pentaho.reporting.libraries.serializer.methods.Ellipse2DSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.Rectangle2D=org.pentaho.reporting.libraries.serializer.methods.Rectangle2DSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.RoundRectangle2D=org.pentaho.reporting.libraries.serializer.methods.RoundRectangle2DSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.GeneralPath=org.pentaho.reporting.libraries.serializer.methods.GeneralPathSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.Line2D=org.pentaho.reporting.libraries.serializer.methods.Line2DSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.geom.Point2D=org.pentaho.reporting.libraries.serializer.methods.Point2DSerializer org.pentaho.reporting.libraries.serializer.handler.java.awt.print.PageFormat=org.pentaho.reporting.libraries.serializer.methods.PageFormatSerializer org.pentaho.reporting.libraries.serializer.handler.java.text.AttributedString=org.pentaho.reporting.libraries.serializer.methods.AttributedStringSerializer libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/LibSerializerInfo.java0000644000175000017500000000401311365605356031135 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer; import org.pentaho.reporting.libraries.base.versioning.ProjectInformation; /** * Creation-Date: 23.10.2005, 18:49:39 * * @author Thomas Morgner */ public class LibSerializerInfo extends ProjectInformation { /** * The info singleton. */ private static LibSerializerInfo singleton; /** * Returns the single instance of this class. * * @return The single instance of information about the JCommon library. */ public static synchronized LibSerializerInfo getInstance() { if (singleton == null) { singleton = new LibSerializerInfo(); singleton.initialize(); } return singleton; } /** * Constructs an empty project info object. */ private LibSerializerInfo() { super("libserializer", "LibSerializer"); } /** * Second step of the initialization. */ private void initialize() { setInfo("http://reporting.pentaho.org/libserializer/"); setCopyright("(C)opyright 2006-2010, by Pentaho Corporation, Object Refinery Limited and Contributors"); setLicenseName("LGPL"); setBootClass(LibSerializerBoot.class.getName()); } } libserializer-1.1.6/source/org/pentaho/reporting/libraries/serializer/SerializeMethod.java0000644000175000017500000000417511365605356030662 0ustar renerene/* * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html * or from the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This program 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. * * Copyright (c) 2006 - 2009 Object Refinery Limited, Pentaho Corporation and Contributors. All rights reserved. */ package org.pentaho.reporting.libraries.serializer; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; /** * The SerializeMethod is used to define a serialization strategy for a certain object * type. * * @author Thomas Morgner */ public interface SerializeMethod { /** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param out the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject (Object o, ObjectOutputStream out) throws IOException; /** * Reads the object from the object input stream. * * @param in the object input stream from where to read the serialized data. * @return the generated object. * * @throws IOException if reading the stream failed. * @throws ClassNotFoundException if serialized object class cannot be found. */ public Object readObject (ObjectInputStream in) throws IOException, ClassNotFoundException; /** * The class of the object, which this object can serialize. * * @return the class of the object type, which this method handles. */ public Class getObjectClass (); } libserializer-1.1.6/licence-LGPL.txt0000644000175000017500000006347611365605356015754 0ustar renerene 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. [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.] Preamble 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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 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". 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. 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".) "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. 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. 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: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 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. 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. (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.) 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. 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. 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. 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. 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. Copyright (C) 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. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libserializer-1.1.6/README.txt0000644000175000017500000000444411365605356014541 0ustar renerene************************************************* * LibSerializer: Version 0.3.0 * ************************************************* 30 May 2008 (C)opyright, 2006-2008, by Pentaho Corporation, Object Refinery Limited and Contributors. ----------------- 1. INTRODUCTION ----------------- This library module contains a general serialization framework. It simplifies the task of writing custom serialization handlers for non-serializable classes. LibSerializer is licensed, free of charge, under the terms of the GNU Lesser General Public Licence. A copy of the licence is included in the download. For the latest news and information about LibSerializer, please refer to: http://reporting.pentaho.org/libserializer/ 2. REQUIREMENTS --------------- LibSerializer needs at least JDK 1.2.2 for its functionality. 3. SUPPORT ---------- Free support is available via the Pentaho forum, follow the link from the home page. Please note that questions are answered by volunteers, so there is no guaranteed response time or level of service. Please avoid e-mailing the developers directly for support questions. If you post a message in the forum, then everyone can see the question, and everyone can see the answer. The forums can be found at http://forums.pentaho.org/ 4. REPORTING BUGS ----------------- If you find bugs in LibSerializer, we'd like to hear about it so that we can improve future releases of LibSerializer. Please post a bug report to the JIRA bug-tracker at Pentaho.org: http://jira.pentaho.org/ Please be sure to provide as much information as you can. We need to know the version of LibSerializer that you are using, the JDK version, and the steps required to replicate the bug. Include any other information that you think is relevant. 5. ANT ------ We use an open source build tool called Ant to build LibSerializer. An Ant script (tested using Ant 1.6) is included in the distribution: /build.xml You can find out more about Ant at: http://ant.apache.org/ Ant is licensed under the terms of the Apache Software License (a popular open source software license). 6. OTHER FEEDBACK ----------------- For other feedback and comments, please post a message on the Pentaho forums. The Forum is available at http://forums.pentaho.org/ libserializer-1.1.6/test-lib/0000755000175000017500000000000011365605416014555 5ustar renerenelibserializer-1.1.6/libserializer.iml0000644000175000017500000001655611365605356016415 0ustar renerene libserializer-1.1.6/ChangeLog.txt0000644000175000017500000000117511365605356015431 0ustar renerene--------------- 1. WHAT's NEW --------------- A list of changes in recent versions: 0.3.0: (30-May-2008) * Switched from JCommon to LibBase. All version information is now contained in the manifest. The Project-Info implementation reads the version numbers from the Jar's Manifest or the compiler-output-directory. 0.2.0: (01-Aug-2007) * [BUG] The initialization configuration file must be named after the library. The 'serializer.properties' file has been renamed into 'jcommon-serializer.properties'. 0.1.0: (17-Apr-2006) * The first public release of this library. libserializer-1.1.6/devresource/0000755000175000017500000000000011365605356015363 5ustar renerenelibserializer-1.1.6/devresource/META-INF/0000755000175000017500000000000011365605356016523 5ustar renerenelibserializer-1.1.6/devresource/META-INF/MANIFEST.MF0000644000175000017500000000034011365605356020152 0ustar renereneImplementation-Title: LibSerializer Implementation-Vendor: Pentaho Corporation Implementation-ProductID: libserializer Release-Major-Number: 1 Release-Minor-Number: 0 Release-Milestone-Number: 0 Release-Candidate-Token: dev libserializer-1.1.6/dev-lib/0000755000175000017500000000000011365605362014354 5ustar renerenelibserializer-1.1.6/.classpath0000644000175000017500000000141311365605356015017 0ustar renerene libserializer-1.1.6/ivysettings.xml0000644000175000017500000000174311365605356016154 0ustar renerene libserializer-1.1.6/lib/0000755000175000017500000000000011636153530013574 5ustar renerenelibserializer-1.1.6/common_build.xml0000644000175000017500000020225611365605356016235 0ustar renerene ------------------------------------------------------------------------------- Common Build file provides tasks needed to perform a project build. It is typically not used directly but imported by each project's build.xml file. The build.xml file can override tasks when customization is required. MAIN TARGETS ============ * clean / clean-all : remove all artifacts of the build, clean-all adds the removal of any library or jar dependencies downloaded as part of the build * resolve : download/refresh library or jar dependencies needed for the build (uses Apache IVY) * compile : run javac on the project's source * jar : creates a jar file * dist : creates all project distributables * test : runs JUnit tests from your project's test source SPECIAL TARGETS ============ * publish-local : builds a jar for your project and registers it with the local artifact repository isolated to your machine at $HOME/.ivy2/local. Further executions of the the resolve target by this or other projects will find your published jar. * ivy-clean* : this family of targets helps reset your IVY environment in the event that you are having difficulty resolving dependencies TYPICAL TARGET SEQUENCE ============ * clean-all resolve dist : a good start to build all project distributables from scratch. Note that jar dependencies will not be downloaded unless you explicitly run the resolve target. We made the resolution and retrieval completely discretionary since there are many situations in which you will not want to get or refresh dependencies, e.g. if you are offline with no Internet access. In such case, you could just run "dist" if the set of jars you already have are sufficient. libserializer-1.1.6/.project0000644000175000017500000000060511365605356014505 0ustar renerene libserializer org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature libserializer-1.1.6/ant/0000755000175000017500000000000011365605356013617 5ustar renerenelibserializer-1.1.6/ant/build-lib.xml0000644000175000017500000006224211365605356016212 0ustar renerene libserializer-1.1.6/ivy.xml0000644000175000017500000000153211365605356014367 0ustar renerene libserializer-1.1.6/build.xml0000644000175000017500000000324311365605356014660 0ustar renerene This build file is used to create the API project and works with the common_build.xml file. libserializer-1.1.6/build.properties0000644000175000017500000000032111365605356016246 0ustar renereneproject.revision=1.1-SNAPSHOT ivy.artifact.group=pentaho-library ivy.artifact.id=libserializer impl.title=LibSerializer impl.productID=libserializer src.dir=${basedir}/source dependency.libbase.revision=1.1.6