cz.cuni.versatile.api
Interface RelationalProperty

All Superinterfaces:
Property
All Known Subinterfaces:
Equivalence, OrderProperty, Taxonomy, TreeTaxonomy

public interface RelationalProperty
extends Property

RelationalProperty is a property which defines a binary relation over the set of its values.

The RelationalProperty interface declares methods allowing to query algebraic relational properties (reflexivity, symmetry and transitivity). It also defines contains(Object dom, Object rng) method which checks if a pair of property values is related given a particular property definition.

The algebraic definitions of relational properties used thereafter adhere to the definitions given at the Binary Relation article of Wikipedia.

Author:
Jaroslav Gergic
See Also:
Relations over a set (Binary relation, Wikipedia), RelationalOperator, RelationalOperatorsRegistry

Method Summary
 boolean contains(java.lang.Object dom, java.lang.Object rng)
          Query whether two property values are related in terms of a given relational property.
 boolean isAntisymmetric()
          Antisymmetry check.
 boolean isAsymetric()
          Asymetry check.
 boolean isIrreflexive()
          Irreflexivity check.
 boolean isReflexive()
          Reflexivity check.
 boolean isSymmetric()
          Symmetry check.
 boolean isTransitive()
          Transitivity check.
 
Methods inherited from interface cz.cuni.versatile.api.Property
getLocalName, getNamespace, getSeparator, getType, getUniqueName
 

Method Detail

isReflexive

public boolean isReflexive()
Reflexivity check. Query whether a relational property is reflexive:

for all x: contains(x, x) = true
(An opposite to irreflexive property.)

Returns:
true if a particular relational property is reflexive

isIrreflexive

public boolean isIrreflexive()
Irreflexivity check. Query whether a relational property is irreflexive:

for all x: contains(x, x) = false
(An opposite to reflexive property.)

Returns:
true if a particular relational property is irreflexive

isSymmetric

public boolean isSymmetric()
Symmetry check. Query whether a relational property is symmetric:

for all x,y: (contains(x, y) = true) -> (contains(y, x) = true)

Returns:
true if a particular relational property is symmetric

isAntisymmetric

public boolean isAntisymmetric()
Antisymmetry check. Query whether a relational property is antisymmetric:

for all x,y: ((contains(x, y) = true and contains(y, x) = true) -> x = y

Returns:
true if a particular relational property is antisymmetric

isAsymetric

public boolean isAsymetric()
Asymetry check. Query whether a relational property is asymmetric:

for all x,y: (contains(x, y) = true) -> (contains(y, x) = false)

Returns:
true if a particular relational property is asymmetric

isTransitive

public boolean isTransitive()
Transitivity check. Query whether a relational property is transitive:

for all x,y,z: (contains(x, y) = true and contains(y, z) = true) -> (contains(x, z) = true)

Returns:
true if a particular relational property is transitive

contains

public boolean contains(java.lang.Object dom,
                        java.lang.Object rng)
Query whether two property values are related in terms of a given relational property. The input to this method is an ordered pair,the order is significant, unless the relational property declares it is a symmetric property.

The contains() method must adhere to the relational properties advertised in terms of the is*() methods. If the behavior of the contains() method is not consistent with the is*() query methods, the implementation of the relational property is considered a defective implementation.

When testing/validating relational properties, one may try to employ relational closure operators, apply them on the the property and measure whether the property's contains() gives the same results as the contains() method of the instance closure operators were applied to.

Parameters:
dom - the first member of the ordered pair (a member of the "domain" set)
rng - the second member of the ordered pair (a member of the "range" set)
Returns:
true is an ordered pair [dom, rng] is a member of the binary relation corresponding to a given RelationalProperty
See Also:
RelationalOperator