--- projects/cms/source/util/uk/org/iscream/cms/util/XMLPacketMaker.java 2000/12/07 23:26:16 1.6 +++ projects/cms/source/util/uk/org/iscream/cms/util/XMLPacketMaker.java 2000/12/12 20:44:30 1.7 @@ -15,8 +15,8 @@ import uk.ac.ukc.iscream.core.*; /** * XMLPacketMaker - Creates an XMLPacket object. * - * @author $Author: tdb $ - * @version $Id: XMLPacketMaker.java,v 1.6 2000/12/07 23:26:16 tdb Exp $ + * @author $Author: ajm $ + * @version $Id: XMLPacketMaker.java,v 1.7 2000/12/12 20:44:30 ajm Exp $ */ public class XMLPacketMaker extends HandlerBase { @@ -25,7 +25,7 @@ public class XMLPacketMaker extends HandlerBase { /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.6 $"; + public final String REVISION = "$Revision: 1.7 $"; //---STATIC METHODS--- @@ -66,10 +66,16 @@ public class XMLPacketMaker extends HandlerBase { * Overrides the {@link java.lang.Object#toString() Object.toString()} * method to provide clean logging (every class should have this). * + * This uses the uk.ac.ukc.iscream.util.NameFormat class + * to format the toString() + * * @return the name of this class and its CVS revision */ public String toString() { - return this.getClass().getName() + "(" + REVISION.substring(11, REVISION.length() - 2) + ")"; + return FormatName.getName( + _name, + getClass().getName(), + REVISION); } //---PRIVATE METHODS--- @@ -78,8 +84,27 @@ public class XMLPacketMaker extends HandlerBase { //---ATTRIBUTES--- + /** + * Holds the xml + */ String _xml; - Logger _logger = ReferenceManager.getInstance().getLogger(); + + /** + * This holds a reference to the + * system logger that is being used. + */ + private Logger _logger = ReferenceManager.getInstance().getLogger(); + + /** + * This is the friendly identifier of the + * component this class is running in. + * eg, a Filter may be called "filter1", + * If this class does not have an owning + * component, a name from the configuration + * can be placed here. This name could also + * be changed to null for utility classes. + */ + private String _name = null; //---STATIC ATTRIBUTES---