--- projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java 2000/11/23 09:36:07 1.2 +++ projects/cms/source/util/uk/org/iscream/cms/util/XMLPacket.java 2000/11/29 19:11:53 1.3 @@ -1,11 +1,31 @@ +//---PACKAGE DECLARATION--- +package uk.ac.ukc.iscream.xml; + +//---IMPORTS--- import java.util.HashMap; -// Paul Mutton, pjm2@ukc.ac.uk - -// Object in which to store incoming XML data -// to be passed around the CORBA system. +/** + * Object in which to store incoming XML data + * to be passed around the CORBA system. + * + * @author $Author: tdb $ + * @version $Id: XMLPacket.java,v 1.3 2000/11/29 19:11:53 tdb Exp $ + */ public class XMLPacket { +//---FINAL ATTRIBUTES--- + + /** + * The current CVS revision of this class + */ + public final String REVISION = "$Revision: 1.3 $"; + +//---STATIC METHODS--- + +//---CONSTRUCTORS--- + +//---PUBLIC METHODS--- + // Add a key and value pair to the HashMap. public synchronized void addParam (String key, String value) { params.put(key, value); @@ -28,6 +48,24 @@ public class XMLPacket { return params.toString(); } - private HashMap params = new HashMap(); - -} + /** + * Overrides the {@link java.lang.Object#toString() Object.toString()} + * method to provide clean logging (every class should have this). + * + * @return the name of this class and its CVS revision + */ + public String toString() { + return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")"; + } + +//---PRIVATE METHODS--- + +//---ACCESSOR/MUTATOR METHODS--- + +//---ATTRIBUTES--- + + private HashMap params = new HashMap(); + +//---STATIC ATTRIBUTES--- + +} \ No newline at end of file