fipaos.agent.conversation.content
Class Content

java.lang.Object
  |
  +--fipaos.agent.conversation.content.Content

Deprecated. Content objects should be avoided - please use XML Databinding instead

public class Content
extends java.lang.Object

This class encapsulates content information in the form:

this has an attribute with a value of value

In general, the information contained within a Content object is either: a) Other Content objects (forming a tree like structure); b) Double objects; c) Long objects; or d) String objects (anything which doesn't fit catergories a-c).

See Also:
XMLDataBinding

Constructor Summary
Content()
          Deprecated. Creates a completely blank Content object with no attributes and no name
Content(Content c)
          Deprecated. This Constructor will clone the structure of the Content object given in a manner which completely decouples this from the given Content object (i.e.
Content(java.util.Map content)
          Deprecated. Constructs a Content object using the given Map as a basis for the internal data structure.
Content(java.lang.String name)
          Deprecated. Creates a completely blank Content object with the given name
 
Method Summary
 void addAttribute(java.lang.String name, java.util.List value)
          Deprecated. This method associates the specified values with the specified attribute.
 void addAttribute(java.lang.String name, java.lang.Object value)
          Deprecated. This method associates the specified value with the specified attribute.
 java.lang.Object getAttribute(java.lang.String name)
          Deprecated. This method returns the value to which the given attribute maps to.
 java.util.Set getAttributeNames()
          Deprecated. This method returns a Set of the attribute names contained in this Content object.
 java.lang.String getName()
          Deprecated. Method to get the name of this Content object
 boolean isEmpty()
          Deprecated. This method indicates if this Content object has no attributes associated with it.
 void removeAttribute(java.lang.String name)
          Deprecated. This method removes the mapping for this attribute from this if it is present.
 void setAttribute(java.lang.String name, java.util.List values)
          Deprecated. This method associates the specified values with the specified attribute.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Deprecated. This method associates the specified value with the specified attribute.
 java.lang.String toString()
          Deprecated. This is the public toString method which returns a String.
 java.lang.String toString(java.lang.String pre)
          Deprecated. This is a toString method which returns a String representation of this, each line pre-fixed with the given String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Content

public Content()
Deprecated. 
Creates a completely blank Content object with no attributes and no name

Content

public Content(java.lang.String name)
Deprecated. 
Creates a completely blank Content object with the given name
Parameters:
name - The name of this particular Content object

Content

public Content(java.util.Map content)
Deprecated. 
Constructs a Content object using the given Map as a basis for the internal data structure. DO NOT USE THIS CONSTRUCTOR - The internal representation of the Content object may change at a later date
Parameters:
content - The Map upon which the internal data structure should be based

Content

public Content(Content c)
Deprecated. 
This Constructor will clone the structure of the Content object given in a manner which completely decouples this from the given Content object (i.e. it is recursively cloned - modifiying one object referenced directly or indirectly by this will have no effect on the objects directly or indirectly referenced by the given Content object).
Parameters:
content - The Content object to "clone"
Method Detail

getAttributeNames

public java.util.Set getAttributeNames()
Deprecated. 
This method returns a Set of the attribute names contained in this Content object.
Returns:
A Set containing all attributes of this Content object

addAttribute

public void addAttribute(java.lang.String name,
                         java.lang.Object value)
Deprecated. 
This method associates the specified value with the specified attribute. If the attribute already exists, a List will be created to hold both values, else if a List has already been created, the value will be appended to the list.

addAttribute() does not overwrite attributes. It is suggested that if this is the desired operation, setAttribute() is used instead.

Parameters:
name - The attribute name to add the value to
value - The value to associate with the attribute

addAttribute

public void addAttribute(java.lang.String name,
                         java.util.List value)
Deprecated. 
This method associates the specified values with the specified attribute. If the attribute already exists, a List will be created to hold the current values and the new values

addAttribute() does not overwrite attributes. It is suggested that if this is the desired operation, setAttribute() is used instead.

Parameters:
name - The attribute name to add the value to
values - The values to associate with the attribute

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Deprecated. 
This method associates the specified value with the specified attribute. If the attribute already exists it will be over-written

Parameters:
name - The attribute name to add the value to
value - The value to associate with the attribute

setAttribute

public void setAttribute(java.lang.String name,
                         java.util.List values)
Deprecated. 
This method associates the specified values with the specified attribute. If the attribute already exists it will be over-written

Parameters:
name - The attribute name to add the value to
values - The values to associate with the attribute

removeAttribute

public void removeAttribute(java.lang.String name)
Deprecated. 
This method removes the mapping for this attribute from this if it is present.
Parameters:
name - The name of the attribute to remove

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Deprecated. 
This method returns the value to which the given attribute maps to. In the case that this is a 1..N mapping, the object will be a List instance
Parameters:
name - The name of the attribute for which to retreive the associated value
Returns:
Either the object associated with the attribute, or a List containing multiple objects, or null if there is no such attribute.

getName

public java.lang.String getName()
Deprecated. 
Method to get the name of this Content object
Returns:
The name associated with this

isEmpty

public boolean isEmpty()
Deprecated. 
This method indicates if this Content object has no attributes associated with it.
Returns:
True if this has no attributes

toString

public java.lang.String toString(java.lang.String pre)
Deprecated. 
This is a toString method which returns a String representation of this, each line pre-fixed with the given String.
Parameters:
pre - The String to prefix to each line of the created String
Returns:
A String representation of this

toString

public java.lang.String toString()
Deprecated. 
This is the public toString method which returns a String.
Overrides:
toString in class java.lang.Object