public abstract class FilterBase extends Object implements IFilter, Cloneable
IFilter
or a chain of IFilter
s.Constructor and Description |
---|
FilterBase() |
Modifier and Type | Method and Description |
---|---|
FilterBase |
addFilter(IFilter filter)
Add a filter to the end of this filter chain.
|
Iterator |
filter(Iterator src,
Object context)
The filter method is provided to allow the creation of the filtering iterator.
|
protected abstract Iterator |
filterOnce(Iterator src,
Object context)
Wrap the source iterator with this filter.
|
Object |
getProperty(String name)
Return the value of a named property.
|
protected Object |
getRequiredProperty(String name)
Return the value of a named property.
|
Object |
setProperty(String name,
Object value)
Set an annotation.
|
String |
toString()
Human readable representation of the filter chain.
|
public final FilterBase addFilter(IFilter filter)
filter
- The filter.public final Iterator filter(Iterator src, Object context)
IFilter
The filter method is provided to allow the creation of the filtering iterator.
Any implementation should follow the following pattern:
public Iterator filter(Iterator src, Object context) { return new Filterator(src, context, this); }This pattern makes the source iterator, the evaluation context, and the
IPropertySet
annotations visible to the runtime striterator
implementation.protected abstract Iterator filterOnce(Iterator src, Object context)
src
- The source iterator.context
- The iterator evaluation context.public final Object getProperty(String name)
IPropertySet
getProperty
in interface IPropertySet
name
- The property name.protected final Object getRequiredProperty(String name)
name
- The property name.IllegalStateException
- unless the named property is bound.public final Object setProperty(String name, Object value)
name
- The name.value
- The value.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.