|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.skill.constraint.ccl.constraint.CSPRelation
This class represents the object "CSP-relation" as described in the document
"CCL Language Specification v2.01" section 4.2.3.2, p14.
This object represents a relation between two variables. Any varibles named
in the Relation-body must appear in the set of Varibles of the relation.
The set of index-pairs identifies which slots in a tuple valued variable are
covered by the relation. For example, for an equality relation between two
variables with 3 tuples as values (e.g. (x, y, z)), setting the set of indices
to {(2,2), (3,3)} indicates that only the 2nd and 3rd slot of the value tuples
need ever be equal- the constraint is not violated even if the values in the
1st slots are unequal.
Field Summary | |
static java.lang.String |
CSPRELATION
String that a CSPRelation will be referenced with when represented as a Content object. |
static java.lang.String |
EMPTY
This specifies that there are no allowed combinations of values for these variables. |
static java.lang.String |
EQUALITY
This specifies that all the variables listed in the Variables list of the relevant CSP-constraint object must take equal values in any instantiation. |
static java.lang.String |
GREATER_THAN
This specifies that the variables in the Variables list of the relevant CSP-constraint object are related by a "greater than" relationship ">" such that the order of the tuple defines the order in the relationship- the first variable in the list is strictly greater than the second, which is strictly greater than the third etc. |
static java.lang.String |
GREATER_THAN_EQUAL
Similar to greaterThan described above but using a "greater than or equals" relation. |
static java.lang.String |
INDICES
String that a Set of Indices will be referenced with when represented as an Attribute of a Content object. |
static java.lang.String |
INEQUALITY
This specifies that all the variables list in the Variables list of the relevant CSP-constraint object must take strictly different values in any instantiation. |
static java.lang.String |
LESS_THAN
This specifies that the variables in the Variables list of the relevant CSP-constraint object are related by a "less than" relationship "<" such that that order of the tuple defines the order in the relationship- the first variable in the list is strictly less than the second, which is strictly less than the third, etc. |
static java.lang.String |
LESS_THAN_EQUAL
Similar to lessThan described above but using a "less than or equals" relation. |
static java.lang.String |
NAME
The only Attribute stored in a Content object representing "Tags" information. |
static java.lang.String |
RELATION_TYPE
String that the relation type is referenced with when represented as an Attribute of of a Content object. |
static java.lang.String |
TAGS
String that a collection of tags is referenced with when represented as an Attribute of a Content object. |
static java.lang.String |
VARIABLES
String that a set of variables are referenced with when represented as an Attribute of a Content object. |
Constructor Summary | |
CSPRelation()
Constructs an empty CSPRelation object. |
|
CSPRelation(Content content)
Constructs a new CSPRelation object and populates it with the data passed in the content object |
Method Summary | |
void |
addIndexPair(IndexPair indices)
Adds a new IndexPair. |
void |
addTag(java.lang.String str)
Adds a new Tag. |
CSPRelation |
copy()
Returns a copy of the CSPRelation object. |
java.util.Vector |
getIndexPairs()
Returns a Vector of the IndexPairs stored in the CSPRelation. |
java.lang.String |
getRelationType()
Returns a String indicating the relationship between the two variables this CSPRelation concerns. |
java.util.Vector |
getTags()
Returns a Vector of the Tags stored in the CSPRelation. |
java.lang.String |
getVariableNameOne()
Returns the name of the first variable this CSPRelation concerns. |
java.lang.String |
getVariableNameTwo()
Returns the name of the second variable this CSPRelation concerns. |
static void |
main(java.lang.String[] args)
Used for testing. |
void |
setRelationType(java.lang.String str)
Sets the nature of the relationship between the two variables this CSPRelation concerns. |
void |
setVariableNameOne(java.lang.String str)
Sets a value for the first variable this CSPRelation concerns. |
void |
setVariableNameTwo(java.lang.String str)
Sets a value for the second variable this CSPRelation concerns. |
Content |
toContent()
Returns a Content object representing this class populated with the Data it contains. |
java.lang.String |
toString()
Returns a String representation of the CSPRelation object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String EQUALITY
public static final java.lang.String INEQUALITY
public static final java.lang.String GREATER_THAN
public static final java.lang.String LESS_THAN
public static final java.lang.String GREATER_THAN_EQUAL
public static final java.lang.String LESS_THAN_EQUAL
public static final java.lang.String EMPTY
public static final java.lang.String CSPRELATION
public static final java.lang.String INDICES
public static final java.lang.String RELATION_TYPE
public static final java.lang.String TAGS
public static final java.lang.String NAME
public static final java.lang.String VARIABLES
Constructor Detail |
public CSPRelation()
public CSPRelation(Content content)
Method Detail |
public void addTag(java.lang.String str)
public java.util.Vector getTags()
public void addIndexPair(IndexPair indices)
public java.util.Vector getIndexPairs()
public void setVariableNameOne(java.lang.String str)
public java.lang.String getVariableNameOne()
public void setVariableNameTwo(java.lang.String str)
public java.lang.String getVariableNameTwo()
public void setRelationType(java.lang.String str)
public java.lang.String getRelationType()
public CSPRelation copy()
public java.lang.String toString()
toString
in class java.lang.Object
public Content toContent()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |