org.ibisph.mvc.model
Class SimpleXMLModelAndDate

java.lang.Object
  extended by org.ibisph.mvc.model.SimpleXMLModelAndDate
All Implemented Interfaces:
XMLModelAndDate
Direct Known Subclasses:
XMLSystemIDModelAndDate

public class SimpleXMLModelAndDate
extends java.lang.Object
implements XMLModelAndDate

Base Model structure for most XML controllers. Defines the standard XML model (XML systemID or document object) and the XML's date along with a basic constructors, setters, and required getters. These two components, XML data object and date, form the basis of the model created by most XML based controllers and used for the XML/XSLT transformation view.

Author:
Garth Braithwaite, STG

Field Summary
protected  java.util.Date xmlDate
           
protected  java.lang.Object xmlModel
           
 
Constructor Summary
protected SimpleXMLModelAndDate()
          Hidden constructor - forces non blank instances.
  SimpleXMLModelAndDate(java.lang.Object xmlModel)
          Simplest constructor that accepts an XML Model object.
  SimpleXMLModelAndDate(java.lang.Object xmlModel, java.util.Date xmlDate)
          Basic constructor that sets both the XML data representation object and the XML's date object.
  SimpleXMLModelAndDate(java.lang.Object xmlModel, long dateTime)
          Basic constructor that sets both the XML data representation object and the XML's date object.
 
Method Summary
 java.util.Date getXMLDate()
          Basic getter method that returns the XML's date object.
 java.lang.Object getXMLModel()
          Basic getter method that returns the XML model object.
 void setXMLDate(java.util.Date date)
          Sets the XML model's date object.
 void setXMLDate(long dateTime)
          Sets the date object based on the long value passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlModel

protected java.lang.Object xmlModel

xmlDate

protected java.util.Date xmlDate
Constructor Detail

SimpleXMLModelAndDate

protected SimpleXMLModelAndDate()
Hidden constructor - forces non blank instances.


SimpleXMLModelAndDate

public SimpleXMLModelAndDate(java.lang.Object xmlModel)
Simplest constructor that accepts an XML Model object.

Parameters:
xmlModel - SystemID or DOM object that represents the XML data.

SimpleXMLModelAndDate

public SimpleXMLModelAndDate(java.lang.Object xmlModel,
                             java.util.Date xmlDate)
Basic constructor that sets both the XML data representation object and the XML's date object.

Parameters:
xmlModel - SystemID or DOM object that represents the XML data.
xmlDate - Date object that is associated with the XML data.

SimpleXMLModelAndDate

public SimpleXMLModelAndDate(java.lang.Object xmlModel,
                             long dateTime)
Basic constructor that sets both the XML data representation object and the XML's date object.

Parameters:
xmlModel - SystemID or DOM object that represents the XML data.
dateTime - long value representing the XML model's date/time (ms since some starting point in time as defined by Java Date).
Method Detail

setXMLDate

public void setXMLDate(java.util.Date date)
Sets the XML model's date object.

Parameters:
date - XML model's date value object.

setXMLDate

public void setXMLDate(long dateTime)
Sets the date object based on the long value passed in.

Parameters:
dateTime - long value representing the XML model's date/time (ms since some starting point in time as defined by Java Date).

getXMLModel

public java.lang.Object getXMLModel()
Basic getter method that returns the XML model object.

Specified by:
getXMLModel in interface XMLModelAndDate
Returns:
XML model object.

getXMLDate

public java.util.Date getXMLDate()
Basic getter method that returns the XML's date object.

Specified by:
getXMLDate in interface XMLModelAndDate
Returns:
XML date object.