cz.cuni.versatile.api.relops
Interface RelationalOperatorsRegistry


public interface RelationalOperatorsRegistry

RelationalOperatorsRegistry is a generic class factory allowing to register custom implementations of relational operators for individual relational properties.

Author:
Jaroslav Gergic
See Also:
RelationalProperty

Method Summary
 InverseOf getInverseOf(java.lang.String uniqueName)
          Returns a InverseOf implementation for a given relational property identified by its uniqueName.
 ReflexiveClosure getReflexiveClosure(java.lang.String uniqueName)
          Returns a ReflexiveClosure implementation for a given relational property identified by its uniqueName.
 SymmetricClosure getSymmetricClosure(java.lang.String uniqueName)
          Returns a SymmetricClosure implementation for a given relational property identified by its uniqueName.
 TotalOrder getTotalOrder(java.lang.String uniqueName)
          Returns a TotalOrder implementation for a given relational property identified by its uniqueName.
 TransitiveClosure getTransitiveClosure(java.lang.String uniqueName)
          Returns a TransitiveClosure implementation for a given relational property identified by its uniqueName.
 void registerImplementation(java.lang.String uniqueName, RelationalOperator implementation)
          Register an implementation for one or more relational operators for a given property.
 

Method Detail

registerImplementation

public void registerImplementation(java.lang.String uniqueName,
                                   RelationalOperator implementation)
Register an implementation for one or more relational operators for a given property. This method uses uniqueName instead of an instance of RelationalProperty in order to avoid the need to physically instantiate all properties for which we want to configure relational operators with the registry. In the typical situation, there are generic (property independent) implementations for certain relational operators (InversOf, ReflexiveClosure, SymmetricClosure and also TotalOrder), these can be overridden by custom implementations for individual properties if needed.

Parameters:
uniqueName - a fully qualified name of a relational property
implementation - an implementation of one or more relational operators, Java reflection is used to determine the set of relational operators the given implementation supports.

getReflexiveClosure

public ReflexiveClosure getReflexiveClosure(java.lang.String uniqueName)
                                     throws UnsupportedPropertyException
Returns a ReflexiveClosure implementation for a given relational property identified by its uniqueName.

Parameters:
uniqueName - a fully qualified name of a relational property
Returns:
an implementation of a relational operator if one exists for a given property
Throws:
UnsupportedPropertyException - in case there is no implementation of the operator for a given property

getSymmetricClosure

public SymmetricClosure getSymmetricClosure(java.lang.String uniqueName)
                                     throws UnsupportedPropertyException
Returns a SymmetricClosure implementation for a given relational property identified by its uniqueName.

Parameters:
uniqueName - a fully qualified name of a relational property
Returns:
an implementation of a relational operator if one exists for a given property
Throws:
UnsupportedPropertyException - in case there is no implementation of the operator for a given property

getTransitiveClosure

public TransitiveClosure getTransitiveClosure(java.lang.String uniqueName)
                                       throws UnsupportedPropertyException
Returns a TransitiveClosure implementation for a given relational property identified by its uniqueName.

Parameters:
uniqueName - a fully qualified name of a relational property
Returns:
an implementation of a relational operator if one exists for a given property
Throws:
UnsupportedPropertyException - in case there is no implementation of the operator for a given property

getInverseOf

public InverseOf getInverseOf(java.lang.String uniqueName)
                       throws UnsupportedPropertyException
Returns a InverseOf implementation for a given relational property identified by its uniqueName.

Parameters:
uniqueName - a fully qualified name of a relational property
Returns:
an implementation of a relational operator if one exists for a given property
Throws:
UnsupportedPropertyException - in case there is no implementation of the operator for a given property

getTotalOrder

public TotalOrder getTotalOrder(java.lang.String uniqueName)
                         throws UnsupportedPropertyException
Returns a TotalOrder implementation for a given relational property identified by its uniqueName.

Parameters:
uniqueName - a fully qualified name of a relational property
Returns:
an implementation of a relational operator if one exists for a given property
Throws:
UnsupportedPropertyException - in case there is no implementation of the operator for a given property