public abstract class AbstractNodesFilterSearchCallback extends Object implements ISearchCallback
searchNode() based on its internal
mode, which could be ALLOW_MODE, DENY_MODE or
NO_MODE:
NO_MODE is the default mode and means searchNode()
always return trueALLOW_MODE is set when setAllowedNodes() is called
and it means searchNode() will return true only if the node is
contained on the Set (or array) passed to setAllowedNodes()
DENY_MODE is set when setDeniedNodes() is called
and it means searchNode() will return true only if the node is
not contained on the Set (or array) passed to setDeniedNodes()
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ALLOW_MODE |
protected static int |
DENY_MODE |
protected org.slf4j.Logger |
logger |
protected static int |
NO_MODE |
| Constructor and Description |
|---|
AbstractNodesFilterSearchCallback()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Set |
getFilteredNodes()
Get which modes are allowed/denied, depending on the operation mode.
|
protected int |
getFilteringMode()
Get the operation mode
|
void |
nodeAdded(Object fromNode)
Do nothing...
|
boolean |
searchNode(Object node)
Decides if a node should be searched or not
|
protected void |
setAllowedNodes(Object[] filteredNodes)
Set which modes are allowed on the search.
|
protected void |
setAllowedNodes(Set filteredNodes)
Set which modes are allowed on the search.
|
protected void |
setDeniedNodes(Object[] filteredNodes)
Set which modes are not allowed on the search.
|
protected void |
setDeniedNodes(Set filteredNodes)
Set which modes are not allowed on the search.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEdgesprotected final org.slf4j.Logger logger
protected static final int NO_MODE
protected static final int ALLOW_MODE
protected static final int DENY_MODE
public AbstractNodesFilterSearchCallback()
protected Set getFilteredNodes()
protected int getFilteringMode()
protected void setAllowedNodes(Set filteredNodes)
filteredNodes - which modes are allowed on the search.protected void setAllowedNodes(Object[] filteredNodes)
filteredNodes - which modes are allowed on the search.protected void setDeniedNodes(Set filteredNodes)
filteredNodes - which modes are not allowed on the search.protected void setDeniedNodes(Object[] filteredNodes)
filteredNodes - which modes are not allowed on the search.public void nodeAdded(Object fromNode) throws SearchException
nodeAdded in interface ISearchCallbackfromNode - node that has been added.SearchExceptionpublic boolean searchNode(Object node) throws SearchException
ISearchCallbacksearchNode in interface ISearchCallbacknode - node to be filteredSearchExceptionCopyright © 2002-2017. All Rights Reserved.