fipaos.skill.constraint.ccl.variable
Class CSPValue


public class CSPValue


This class describes the object CSP-value as described in the document
"CCL Language Specification v2.01" section 4.2.2.2, p12.

This object represents an option. In general this can be a tuple- hence
the variable is an ordered list of domain terms.

May contain the following information:

Npart integer 1
Elements List {domain-term} {blue, green, red}
Tags Set {symbol} {T1, T2}


Field Summary
 final static StringCSPVALUE
          Name CSPValue objects are labelled with when represented as Content objects.
 final static StringELEMENTS
          
Used to reference the Element that contains the Value when represented as
a Content object.
 final static StringNAME
           
 final static StringNPART
          Name of the Attribute the Npart value is stored with when represented in Content objects.
 final static StringTAGS
           
 final static StringVALUE
          Name of the Attribute the Values contained in this class are stored as in Content objects.

Constructor Summary
CSPValue()
          Constructs an Empty CSPValue.
CSPValue(Content content)
          
Constructs a new CSPValue object and populates it using the Data held
in the passed Content object.

Method Summary
 voidaddElement(String str)
          
Adds an Element to the CSPValue.
 voidaddTag(String str)
          
Adds a Tag to the CSPValue.
 CSPValuecopy()
          
Returns a copy of this CSPValue object.
 VectorgetElements()
          
Returns a Vector of all the Elements held
 StringgetElementString()
          
Returns a String representation of the collection of Elements
 intgetNparts()
          
Returns the number of items in the Elements Parameter.
 VectorgetTags()
          Retrieves the set of all the tags.
 StringgetTagString()
          
Returns a String representation of the collection of Tags
If there are more than one will return them surrounded by brackets.
 static voidmain(String[] args)
          
Used for testing.
 ContenttoContent()
          Returns a Content object populated with the Data held in this CSPValue object.
 StringtoString()
          
Returns a String representation of this CSPValue object.

Field Detail

CSPVALUE

public final static String CSPVALUE
Name CSPValue objects are labelled with when represented as Content objects.

ELEMENTS

public final static String ELEMENTS

Used to reference the Element that contains the Value when represented as
a Content object.

NAME

public final static String NAME

NPART

public final static String NPART
Name of the Attribute the Npart value is stored with when represented in Content objects.

TAGS

public final static String TAGS

VALUE

public final static String VALUE
Name of the Attribute the Values contained in this class are stored as in Content objects.
Constructor Detail

CSPValue

public CSPValue()
Constructs an Empty CSPValue.

CSPValue

public CSPValue(Content content)

Constructs a new CSPValue object and populates it using the Data held
in the passed Content object.
Method Detail

addElement

public void addElement(String str)

Adds an Element to the CSPValue.

addTag

public void addTag(String str)

Adds a Tag to the CSPValue.

copy

public CSPValue copy()

Returns a copy of this CSPValue object.

getElements

public Vector getElements()

Returns a Vector of all the Elements held

getElementString

public String getElementString()

Returns a String representation of the collection of Elements

getNparts

public int getNparts()

Returns the number of items in the Elements Parameter.

getTags

public Vector getTags()
Retrieves the set of all the tags.

getTagString

public String getTagString()

Returns a String representation of the collection of Tags
If there are more than one will return them surrounded by brackets.

main

public static void main(String[] args)

Used for testing.

toContent

public Content toContent()
Returns a Content object populated with the Data held in this CSPValue object.

toString

public String toString()

Returns a String representation of this CSPValue object.

Association Links

to Class java.lang.String


Used to reference the Element that contains the Value when represented as
a Content object.

to Class java.lang.String

Name CSPValue objects are labelled with when represented as Content objects.

to Class java.lang.String

Name of the Attribute the Npart value is stored with when represented in Content objects.

to Class java.lang.String

Name of the Attribute the Values contained in this class are stored as in Content objects.

to Class java.lang.String

to Class java.lang.String

to Class java.util.Vector


Contains the list of domain terms referred to by Elements.

to Class java.util.Vector