se.kmr.scam.client.http.helper
Class ModelBean

java.lang.Object
  extended byse.kmr.scam.client.http.helper.ModelBean

public class ModelBean
extends Object

This bean is used for storing a model. An instance of this bean is stored in the session scope to provide the last model. Each time a model assigned to this bean it is associated with a time-stamp. Objects that uses this bean can detect if the model has been replaced by comparing the current time-stamp with the time-stamp . This is usefull when the bean is used for caching models between requests.

Version:
$Revision: 1.11 $
Author:
Jöran
Created:
den 21 augusti 2002

Field Summary
static String NAME
           
 
Constructor Summary
ModelBean()
          Default Constructor
ModelBean(Model m)
           
ModelBean(Model m, List roots)
           
ModelBean(Model m, String uri)
          Specialized Constructor
 
Method Summary
 Model getModel()
          Gets the model attribute of the ModelBean object
 Resource getRoot()
          Get the Root of current model.
 List getRoots()
          Get the Roots of current model.
 List getSubItems()
          List the sub-items (children) of current Root.
 TimeStamp getTimeStamp()
          Gets the timeStamp attribute of the ModelBean object
 boolean isEmpty()
          Check if data exists.
 void setModel(Model model)
          Sets the model attribute of the ModelBean object
 void setRoot(Resource res)
          Set the Root of current model.
 void setRoots(List roots)
          Set the Roots of current model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

ModelBean

public ModelBean()
Default Constructor


ModelBean

public ModelBean(Model m,
                 String uri)
          throws RDFException
Specialized Constructor

Parameters:
uri - URI of Root
m - Model
Throws:
RDFException

ModelBean

public ModelBean(Model m)
          throws RDFException

ModelBean

public ModelBean(Model m,
                 List roots)
Method Detail

isEmpty

public boolean isEmpty()
Check if data exists.

Returns:
true if data is missing.

getModel

public Model getModel()
Gets the model attribute of the ModelBean object

Returns:
The model value

setModel

public void setModel(Model model)
Sets the model attribute of the ModelBean object

Parameters:
model - The new model value

getTimeStamp

public TimeStamp getTimeStamp()
Gets the timeStamp attribute of the ModelBean object

Returns:
The timeStamp value

getRoot

public Resource getRoot()
Get the Root of current model.

Returns:
Root

setRoot

public void setRoot(Resource res)
Set the Root of current model.

Parameters:
res - Root

getRoots

public List getRoots()
Get the Roots of current model.

Returns:
Collection of Resources

setRoots

public void setRoots(List roots)
Set the Roots of current model.

Parameters:
roots - Collection of Resources

getSubItems

public List getSubItems()
List the sub-items (children) of current Root.

Returns:
Collection of Resources


Copyright © 2003 SCAM. All Rights Reserved.