cz.cuni.versatile.api
Interface PropertyPredicate


public interface PropertyPredicate

PropertyPredicate represents a single meta-data constraint or a preference. An ordered list of property predicates together with additional settings forms a QueryTemplate. A QueryTemplate can instantiate a particular multi-variant resource Query.

See Also:
QueryTemplate, Query

Method Summary
 java.lang.Object getArguments()
          Additional arguments (besides the Property and the property value) required to evaluate the predicate.
 PropertyOperator getOperator()
          A PropertyOperator this predicate applies to its associated Property
 Property getProperty()
          A Property this predicate applies to.
 java.lang.Object getPropertyValue()
          Returns the actual Property value.
 void setPropertyValue(java.lang.Object value)
          Sets the actual Property value.
 

Method Detail

getProperty

public Property getProperty()
A Property this predicate applies to.

Returns:
a Property this predicate applies to

getOperator

public PropertyOperator getOperator()
A PropertyOperator this predicate applies to its associated Property

Returns:
a PropertyOperator used by this predicate
See Also:
PropertyOperators

getArguments

public java.lang.Object getArguments()
Additional arguments (besides the Property and the property value) required to evaluate the predicate.

Returns:
an operator-specific data structure capturing the additional operator arguments, can be null
See Also:
PropertyOperators

getPropertyValue

public java.lang.Object getPropertyValue()
Returns the actual Property value. The value is determined at the time of Query instantiation which means that if this method is invoked on a PropertyPredicate while being a part of a QueryTemplate, the method most likely returns null.

Returns:
the actual Property value at the time of Query instantiation.

setPropertyValue

public void setPropertyValue(java.lang.Object value)
Sets the actual Property value. This method is invoked during Query creation process when the actual property values are being substituted from the DeliveryContext.

Parameters:
value - the actual Property value
See Also:
QueryTemplate.newQuery(String)