org.mycore.services.fieldquery
Class MCRQueryCondition

java.lang.Object
  extended by org.mycore.services.fieldquery.MCRFieldValue
      extended by org.mycore.services.fieldquery.MCRQueryCondition
All Implemented Interfaces:
MCRCondition

public class MCRQueryCondition
extends MCRFieldValue
implements MCRCondition

Represents a simple query condition, which consists of a search field, a value and a comparison operator.

Author:
Frank Lützenkirchen

Constructor Summary
MCRQueryCondition(MCRFieldDef field, String operator, String value)
          Creates a new simple query condition
 
Method Summary
 void accept(MCRConditionVisitor visitor)
           
 boolean evaluate(Object o)
           
 String getOperator()
          Returns the comparison operator used in this condition
 Element info()
           
 String toString()
           
 Element toXML()
           
 
Methods inherited from class org.mycore.services.fieldquery.MCRFieldValue
buildXML, getField, getFile, getValue, parseXML, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MCRQueryCondition

public MCRQueryCondition(MCRFieldDef field,
                         String operator,
                         String value)
Creates a new simple query condition

Method Detail

getOperator

public String getOperator()
Returns the comparison operator used in this condition


toString

public String toString()
Specified by:
toString in interface MCRCondition
Overrides:
toString in class MCRFieldValue

toXML

public Element toXML()
Specified by:
toXML in interface MCRCondition

info

public Element info()
Specified by:
info in interface MCRCondition

accept

public void accept(MCRConditionVisitor visitor)
Specified by:
accept in interface MCRCondition

evaluate

public boolean evaluate(Object o)
Specified by:
evaluate in interface MCRCondition