Package org.dspace.content.logic
Class DefaultFilter
java.lang.Object
org.dspace.content.logic.DefaultFilter
- All Implemented Interfaces:
Filter,LogicalStatement,Aware,BeanNameAware
The default filter, a very simple implementation of Filter / LogicalStatement
The idea is to have this as a wrapper / root class for all logical operations, so it takes a single
statement as a property (unlike an operator) and takes no parameters (unlike a condition)
- Author:
- Kim Shepherd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of a filter.booleanGet the result of logical evaluation for an itemvoidsetBeanName(String name) voidsetStatement(LogicalStatement statement) Set statement from Spring configuration in item-filters.xml Be aware that this is singular not plural.
-
Constructor Details
-
DefaultFilter
public DefaultFilter()
-
-
Method Details
-
setStatement
Set statement from Spring configuration in item-filters.xml Be aware that this is singular not plural. A filter can have one sub-statement only.- Parameters:
statement- LogicalStatement of this filter (operator, condition, or another filter)
-
getResult
Get the result of logical evaluation for an item- Specified by:
getResultin interfaceFilter- Specified by:
getResultin interfaceLogicalStatement- Parameters:
context- DSpace contextitem- Item to evaluate- Returns:
- boolean
- Throws:
LogicalStatementException
-
setBeanName
- Specified by:
setBeanNamein interfaceBeanNameAware
-
getName
Description copied from interface:FilterGet the name of a filter. This can be used by filters which make use of BeanNameAware to return the bean name.
-