Class IsNodeFilter
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.filter.DepthItemFilter
-
- org.apache.jackrabbit.vault.fs.filter.IsNodeFilter
-
- All Implemented Interfaces:
Dumpable,Filter,ItemFilter
public class IsNodeFilter extends DepthItemFilter
Item filter that checks if an item is a node.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.vault.fs.api.ItemFilter
ALL, NONE
-
-
Constructor Summary
Constructors Constructor Description IsNodeFilter()Default constructor.IsNodeFilter(boolean polarity)Creates a new node item filterIsNodeFilter(boolean polarity, int minDepth, int maxDepth)Creates a new node item filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(DumpContext ctx, boolean isLast)Dumps some human readable information using the given context.booleanmatches(Item item)Returnstrue.voidsetIsNode(String polarity)Sets the polarity of this filter.voidsetPolarity(String polarity)Sets the polarity of this filter.-
Methods inherited from class org.apache.jackrabbit.vault.fs.filter.DepthItemFilter
matches, setMaxDepth, setMinDepth
-
-
-
-
Constructor Detail
-
IsNodeFilter
public IsNodeFilter()
Default constructor.
-
IsNodeFilter
public IsNodeFilter(boolean polarity, int minDepth, int maxDepth)Creates a new node item filter.- Parameters:
polarity- the polarity of this filter. iftrueit matches nodes, iffalseit matches properties.minDepth- the minimum depthmaxDepth- the maximum depth- See Also:
DepthItemFilter
-
IsNodeFilter
public IsNodeFilter(boolean polarity)
Creates a new node item filter- Parameters:
polarity- the polarity of this filter. iftrueit matches nodes, iffalseit matches properties.
-
-
Method Detail
-
setPolarity
public void setPolarity(String polarity)
Sets the polarity of this filter. If set totruethis filter matches nodes otherwise properties.- Parameters:
polarity- the polarity
-
setIsNode
public void setIsNode(String polarity)
Sets the polarity of this filter. If set totruethis filter matches nodes otherwise properties.- Parameters:
polarity- the polarity
-
matches
public boolean matches(Item item) throws RepositoryException
Returnstrue. Subclasses can override to implement something useful that is dependant of the depth. Returnstrueif the item is a node and the polarity is positive (true).- Overrides:
matchesin classDepthItemFilter- Parameters:
item- the item to match- Returns:
trueif the item matches;falseotherwise.- Throws:
RepositoryException- if an error occurs.
-
dump
public void dump(DumpContext ctx, boolean isLast)
Dumps some human readable information using the given context.- Specified by:
dumpin interfaceDumpable- Overrides:
dumpin classDepthItemFilter- Parameters:
ctx- the dump contextisLast- specifies if this is the last element to dump on this level
-
-