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
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
ConstructorsConstructorDescriptionDefault constructor.IsNodeFilter(boolean polarity) Creates a new node item filterIsNodeFilter(boolean polarity, int minDepth, int maxDepth) Creates a new node item filter. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(DumpContext ctx, boolean isLast) Dumps some human readable information using the given context.booleanReturnstrue.voidSets 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 Details
-
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:
-
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 Details
-
setPolarity
Sets the polarity of this filter. If set totruethis filter matches nodes otherwise properties.- Parameters:
polarity- the polarity
-
setIsNode
Sets the polarity of this filter. If set totruethis filter matches nodes otherwise properties.- Parameters:
polarity- the polarity
-
matches
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
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
-