| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 | |
final static String | CSPRELATION String that a CSPRelation will be referenced with when represented as a Content object. |
final static String | EMPTY This specifies that there are no allowed combinations of values for these variables. |
final static 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. |
final static 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. |
final static String | GREATER_THAN_EQUAL Similar to greaterThan described above but using a "greater than or equals" relation. |
final static String | INDICES String that a Set of Indices will be referenced with when represented as an Attribute of a Content object. |
final static 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. |
final static 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. |
final static String | LESS_THAN_EQUAL Similar to lessThan described above but using a "less than or equals" relation. |
final static String | NAME The only Attribute stored in a Content object representing "Tags" information. |
final static String | RELATION_TYPE String that the relation type is referenced with when represented as an Attribute of of a Content object. |
final static String | TAGS String that a collection of tags is referenced with when represented as an Attribute of a Content object. |
final static 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(String str) Adds a new Tag. |
CSPRelation | copy() Returns a copy of the CSPRelation object. |
Vector | getIndexPairs() Returns a Vector of the IndexPairs stored in the CSPRelation. |
String | getRelationType() Returns a String indicating the relationship between the two variables this CSPRelation concerns. |
Vector | getTags() Returns a Vector of the Tags stored in the CSPRelation. |
String | getVariableNameOne() Returns the name of the first variable this CSPRelation concerns. |
String | getVariableNameTwo() Returns the name of the second variable this CSPRelation concerns. |
static void | main(String[] args) Used for testing. |
void | setRelationType(String str) Sets the nature of the relationship between the two variables this CSPRelation concerns. |
void | setVariableNameOne(String str) Sets a value for the first variable this CSPRelation concerns. |
void | setVariableNameTwo(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. |
String | toString() Returns a String representation of the CSPRelation object. |
Field Detail |
public final static String CSPRELATION
public final static String EMPTY
public final static String EQUALITY
public final static String GREATER_THAN
public final static String GREATER_THAN_EQUAL
public final static String INDICES
public final static String INEQUALITY
public final static String LESS_THAN
public final static String LESS_THAN_EQUAL
public final static String NAME
public final static String RELATION_TYPE
public final static String TAGS
public final static String VARIABLES
Constructor Detail |
public CSPRelation()
public CSPRelation(Content content)
Method Detail |
public void addIndexPair(IndexPair indices)
public void addTag(String str)
public CSPRelation copy()
public Vector getIndexPairs()
public String getRelationType()
public Vector getTags()
public String getVariableNameOne()
public String getVariableNameTwo()
public static void main(String[] args)
public void setRelationType(String str)
public void setVariableNameOne(String str)
public void setVariableNameTwo(String str)
public Content toContent()
public String toString()
Association Links |
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.util.Vector
to Class java.util.Vector
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |