Class AbstractOperator
- java.lang.Object
-
- org.dspace.content.logic.operator.AbstractOperator
-
- All Implemented Interfaces:
LogicalStatement
public abstract class AbstractOperator extends Object implements LogicalStatement
Abstract class for an operator. An operator contains a list of logical statements (conditions or more operators) and depending on the kind of operator (AND, OR, NOT, etc.) the results of some or all sub-statements are evaluated and returned as a logical result- Version:
- $Revision$
- Author:
- Kim Shepherd
-
-
Constructor Summary
Constructors Constructor Description AbstractOperator()Default constructorAbstractOperator(List<LogicalStatement> statements)Constructor to create operator from some predefined statements
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetResult(Context context, Item item)Get the result of logical evaluation for an itemList<LogicalStatement>getStatements()Get sub-statements for this operatorvoidsetStatements(List<LogicalStatement> statements)Set sub-statements for this operator, as defined in item-filters.xml
-
-
-
Constructor Detail
-
AbstractOperator
public AbstractOperator()
Default constructor
-
AbstractOperator
public AbstractOperator(List<LogicalStatement> statements)
Constructor to create operator from some predefined statements- Parameters:
statements-
-
-
Method Detail
-
getStatements
public List<LogicalStatement> getStatements()
Get sub-statements for this operator- Returns:
- list of sub-statements
-
setStatements
public void setStatements(List<LogicalStatement> statements)
Set sub-statements for this operator, as defined in item-filters.xml- Parameters:
statements- list of logical statements
-
getResult
public boolean getResult(Context context, Item item) throws LogicalStatementException
Description copied from interface:LogicalStatementGet the result of logical evaluation for an item- Specified by:
getResultin interfaceLogicalStatement- Parameters:
context- DSpace contextitem- Item to evaluate- Returns:
- boolean result of evaluation (of sub-statements)
- Throws:
LogicalStatementException
-
-