com.ge.grc.acuity
Class PresentationObject

java.lang.Object
  extended bycom.ge.grc.acuity.PresentationObject
Direct Known Subclasses:
InteractionObject

public class PresentationObject
extends java.lang.Object

Class to encapsulate the Properties of a presentation object, e.g., a list box or a graph, etc. In particular, a PresentationObject may contain other PresentationObjects (addContainedPresentationObject, getContents methods), has an instance URI, and has a PresentationParameterMap (getKeys, getParameterMap, getParameterValue, getParameterValueRecursively, hasParameter, hasParameterValue, setParameter methods), and may have additional Properties which are not Parameters (addAdditionalProperty, getAdditionalProperty, getAdditionalPropertyMap).

Version:
$Revision: 1.2 $ Last modified on $Date: 2006/09/08 22:38:45 $
Author:
crapo

Field Summary
protected  java.util.List contents
           
 
Constructor Summary
PresentationObject(java.lang.String uri)
          Constructor for class, no arguments.
 
Method Summary
 void addAdditionalProperty(java.lang.String key, java.lang.Object value)
          Call this mathod to add an additional property to this PresentationObject.
 void addContainedPresentationObject(PresentationObject containedPO)
          Call this method to add a PresentationObject to the contents of this PresentationObject.
 boolean canReturnValues()
          Call this method to determine if this PO can return values to the controller
protected  void clearAdditionalPropertyMap()
           
 boolean contains(com.hp.hpl.jena.rdf.model.Resource aSeriesElement)
           
 java.lang.Object getAdditionalProperty(java.lang.String key)
          Call this method to get the value of an additional Property.
 java.util.Map getAdditionalPropertyMap()
          Call this method to get the Map of additional Properties of this PresentationObject
 java.util.List getContents()
          Call this method to get a list of the PresentationObjects contained in this PresentationObject.
 java.lang.String getInstanceURI()
          Call this method to get the URI of the represented Individual PO.
 java.lang.String[] getKeys()
          Call this method to get a String array containing all of the keys which have been defined for this PresentationObject.
 PresentationParameterMap getParameterMap()
          Call this method to the POs PresentationParameterMap.
 java.lang.Object getParameterValue(java.lang.String key)
          Call this method to obtain the value of a named parameter.
 java.lang.Object getParameterValueRecursively(java.lang.String key)
          Call this method to obtain the value of a named parameter, recursing into nested maps as needed.
 boolean hasParameter(java.lang.String key)
          Call this method to inquire about the existence of a particular parameter.
 boolean hasParameterValue(java.lang.Object value)
          Call this method to inquire about the existence of a particular value in the set of known parameterMap.
 void setCanReturnValues(boolean bCanReturnValues)
          Call this method to specify whether or not this PresentationObject can return values.
protected  void setInstanceURI(java.lang.String instanceURI)
           
 void setParameter(java.lang.String key, java.lang.Object value)
          Call this method to set the specified value for the specified key.
 void setParameterMap(PresentationParameterMap parameters)
          Call this method to set the PresentationParameterMap of the PresentationObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contents

protected java.util.List contents
Constructor Detail

PresentationObject

public PresentationObject(java.lang.String uri)
Constructor for class, no arguments.

Method Detail

setParameter

public void setParameter(java.lang.String key,
                         java.lang.Object value)
Call this method to set the specified value for the specified key.

Parameters:
key - - a String identifier of the parameter, e.g., allowsMultipleSelection
value - - an Object which is the value to be assigned to the key, e.g., Boolean false

getParameterValue

public java.lang.Object getParameterValue(java.lang.String key)
Call this method to obtain the value of a named parameter.

Parameters:
key - - the name (localname of predicate) of the parameter whose value is requested
Returns:
- the value of the parameter as previously set

getParameterValueRecursively

public java.lang.Object getParameterValueRecursively(java.lang.String key)
Call this method to obtain the value of a named parameter, recursing into nested maps as needed.

Parameters:
key - - the name of the parameter whose value is requested
Returns:
- the value of the first parameter found that matches the key

getKeys

public java.lang.String[] getKeys()
Call this method to get a String array containing all of the keys which have been defined for this PresentationObject.

Returns:
- an array of all the keys currently known to the PresentationObject

hasParameter

public boolean hasParameter(java.lang.String key)
Call this method to inquire about the existence of a particular parameter.

Parameters:
key - - the String key naming the parameter in question
Returns:
- true if the named parameter exists else false

hasParameterValue

public boolean hasParameterValue(java.lang.Object value)
Call this method to inquire about the existence of a particular value in the set of known parameterMap.

Parameters:
value - - the value which is the subject of the inquiry
Returns:
- true if the value exists else false

addContainedPresentationObject

public void addContainedPresentationObject(PresentationObject containedPO)
Call this method to add a PresentationObject to the contents of this PresentationObject.

Parameters:
containedPO - - the PresentationObject to be added

getContents

public java.util.List getContents()
Call this method to get a list of the PresentationObjects contained in this PresentationObject.

Returns:
- a List of PresentationObjects

setInstanceURI

protected void setInstanceURI(java.lang.String instanceURI)
Parameters:
instanceURI - The instanceURI to set.

getInstanceURI

public java.lang.String getInstanceURI()
Call this method to get the URI of the represented Individual PO.

Returns:
Returns the instanceURI.

setParameterMap

public void setParameterMap(PresentationParameterMap parameters)
Call this method to set the PresentationParameterMap of the PresentationObject

Parameters:
parameters - The PresentationParameterMap to be set in this PO.

getParameterMap

public PresentationParameterMap getParameterMap()
Call this method to the POs PresentationParameterMap.

Returns:
Returns the parameterMap.

addAdditionalProperty

public void addAdditionalProperty(java.lang.String key,
                                  java.lang.Object value)
                           throws AcuityException
Call this mathod to add an additional property to this PresentationObject.

Parameters:
key - - the additional property key
value - - the additional property value
Throws:
AcuityException

getAdditionalProperty

public java.lang.Object getAdditionalProperty(java.lang.String key)
Call this method to get the value of an additional Property.

Parameters:
key - - the key (localname of the predicate) identifying the additional Property
Returns:
- the value of the additional Property

clearAdditionalPropertyMap

protected void clearAdditionalPropertyMap()

getAdditionalPropertyMap

public java.util.Map getAdditionalPropertyMap()
Call this method to get the Map of additional Properties of this PresentationObject

Returns:
- a Map with Property localName as key and Object as value

contains

public boolean contains(com.hp.hpl.jena.rdf.model.Resource aSeriesElement)
Returns:

setCanReturnValues

public void setCanReturnValues(boolean bCanReturnValues)
Call this method to specify whether or not this PresentationObject can return values.

Parameters:
bCanReturnValues - - true if values can be returned else false

canReturnValues

public boolean canReturnValues()
Call this method to determine if this PO can return values to the controller

Returns:
- returns true if the PO can return values else false