Class Not
java.lang.Object
org.dspace.content.logic.operator.Not
- All Implemented Interfaces:
LogicalStatement
An operator that implements NOT by simply negating a statement
Note that this operator doesn't actually implement the 'AbstractOperator' interface because
we only want one sub-statement. So it's actually just a simple implementation of LogicalStatement.
Not can have one sub-statement only, while and, or, nor, ... can have multiple sub-statements.
- Author:
- Kim Shepherd
-
Constructor Summary
ConstructorsConstructorDescriptionNot()Default constructorNot(LogicalStatement statement) Constructor that accepts predefined list of statements as defined in item-filters.xml -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if the result of the sub-statement is false Return false otherwiseGet sub-statement (note: singular!voidsetStatements(LogicalStatement statement) Set sub-statement (note: singular!)
-
Constructor Details
-
Not
public Not()Default constructor -
Not
Constructor that accepts predefined list of statements as defined in item-filters.xml- Parameters:
statement- Single logical statement
-
-
Method Details
-
getStatements
Get sub-statement (note: singular! even though we keep the method name) for this operator- Returns:
- list of sub-statements
-
setStatements
Set sub-statement (note: singular!) for this operator, as defined in item-filters.xml- Parameters:
statement- a single statement to apply to NOT operation
-
getResult
Return true if the result of the sub-statement is false Return false otherwise- Specified by:
getResultin interfaceLogicalStatement- Parameters:
context- DSpace contextitem- Item to evaluate- Returns:
- boolean result of NOT
- Throws:
LogicalStatementException
-