Package net.ggtools.grand.filters
Class GraphWalkFilter
- java.lang.Object
-
- net.ggtools.grand.filters.AbstractGraphFilter
-
- net.ggtools.grand.filters.GraphWalkFilter
-
- All Implemented Interfaces:
GraphFilter
,GraphConsumer
,GraphProducer
- Direct Known Subclasses:
ConnectedToNodeFilter
,FromNodeFilter
,ToNodeFilter
public abstract class GraphWalkFilter extends AbstractGraphFilter implements GraphFilter
An abstract class implementing generic filtering from a graph walk. Derived class need to implemented the getLinkFinder method.- Author:
- Christophe Labouisse
-
-
Field Summary
-
Fields inherited from class net.ggtools.grand.filters.AbstractGraphFilter
name
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GraphWalkFilter(String nodeName)
Creates a new filter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Collection<Node>
getFilteredNodes()
Method getFilteredNodes.abstract LinkFinder
getLinkFinder()
Returns an object finding the links to follow from a specific node.-
Methods inherited from class net.ggtools.grand.filters.AbstractGraphFilter
getGraph, getGraphProducer, getName, getProducersGraph, setProducer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.ggtools.grand.graph.GraphConsumer
setProducer
-
Methods inherited from interface net.ggtools.grand.filters.GraphFilter
getName
-
Methods inherited from interface net.ggtools.grand.graph.GraphProducer
getGraph
-
-
-
-
Constructor Detail
-
GraphWalkFilter
protected GraphWalkFilter(String nodeName)
Creates a new filter.- Parameters:
nodeName
- node to search from.
-
-
Method Detail
-
getFilteredNodes
protected final Collection<Node> getFilteredNodes() throws GrandException
Method getFilteredNodes.- Specified by:
getFilteredNodes
in classAbstractGraphFilter
- Returns:
- Collection<Node>
- Throws:
GrandException
- if an error occurs in getProducersGraph()- See Also:
AbstractGraphFilter.getFilteredNodes()
-
getLinkFinder
public abstract LinkFinder getLinkFinder()
Returns an object finding the links to follow from a specific node. This object will be used when walking the graph ingetFilteredNodes()
to find the filtered nodes.- Returns:
- the
LinkFinder
object used for filtering. - See Also:
LinkFinder
-
-