uk.org.iscream.cms.server.dbinterface
Class XMLPacketWrapper

java.lang.Object
  |
  +--uk.org.iscream.cms.server.dbinterface.XMLPacketWrapper

class XMLPacketWrapper
extends Object

Wraps an XMLPacket, an XML String, and a time in a single Object.

Version:
$Id: XMLPacketWrapper.java,v 1.7 2003/02/05 16:43:47 tdb Exp $
Author:
$Author: tdb $

Field Summary
private  String _name
          This is the friendly identifier of the component this class is running in.
private  XMLPacket _packet
          The XMLPacket version of the _xml String.
private  long _timestamp
          A timestamp at which the XML data was received by the DBInterface section of the server.
private  String _xml
          The String of XML date this object represents.
private static XMLCache _xmlCache
          A reference to the XMLCache in use
static String REVISION
          The current CVS revision of this class
 
Constructor Summary
XMLPacketWrapper(String xml)
          Constructs an XMLPacketWrapper on the given XML data.
 
Method Summary
 long getTimestamp()
          Returns the timestamp of when this XML was received.
 String getXML()
          Returns the XML data as a raw String.
 XMLPacket getXMLPacket()
          Returns the XML data as an XMLPacket Object.
 String toString()
          Overrides the Object.toString() method to provide clean logging (every class should have this).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
The current CVS revision of this class

See Also:
Constant Field Values

_packet

private XMLPacket _packet
The XMLPacket version of the _xml String.


_xml

private String _xml
The String of XML date this object represents.


_timestamp

private long _timestamp
A timestamp at which the XML data was received by the DBInterface section of the server.


_name

private String _name
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.


_xmlCache

private static XMLCache _xmlCache
A reference to the XMLCache in use

Constructor Detail

XMLPacketWrapper

public XMLPacketWrapper(String xml)
                 throws InvalidXMLException
Constructs an XMLPacketWrapper on the given XML data.

Throws:
InvalidXMLException - if the xml is not valid
Method Detail

toString

public String toString()
Overrides the Object.toString() method to provide clean logging (every class should have this). This uses the uk.ac.ukc.iscream.util.FormatName class to format the toString()

Overrides:
toString in class Object
Returns:
the name of this class and its CVS revision

getXMLPacket

public XMLPacket getXMLPacket()
Returns the XML data as an XMLPacket Object.

Returns:
an XMLPacket representing the XML data

getXML

public String getXML()
Returns the XML data as a raw String.

Returns:
a String representing the XML data

getTimestamp

public long getTimestamp()
Returns the timestamp of when this XML was received.

Returns:
a long time since the epoch


Copyright © 2000-2003 i-scream. All Rights Reserved.