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, wait
getEdges
protected 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 ISearchCallback
fromNode
- node that has been added.SearchException
public boolean searchNode(Object node) throws SearchException
ISearchCallback
searchNode
in interface ISearchCallback
node
- node to be filteredSearchException
Copyright © 2002–2017. All rights reserved.