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 void
dump(DumpContext ctx, boolean isLast)
Dumps some human readable information using the given context.boolean
matches(javax.jcr.Item item)
Returnstrue
.void
setIsNode(String polarity)
Sets the polarity of this filter.void
setPolarity(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. iftrue
it matches nodes, iffalse
it 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. iftrue
it matches nodes, iffalse
it matches properties.
-
-
Method Detail
-
setPolarity
public void setPolarity(String polarity)
Sets the polarity of this filter. If set totrue
this filter matches nodes otherwise properties.- Parameters:
polarity
- the polarity
-
setIsNode
public void setIsNode(String polarity)
Sets the polarity of this filter. If set totrue
this filter matches nodes otherwise properties.- Parameters:
polarity
- the polarity
-
matches
public boolean matches(javax.jcr.Item item) throws javax.jcr.RepositoryException
Returnstrue
. Subclasses can override to implement something useful that is dependant of the depth. Returnstrue
if the item is a node and the polarity is positive (true).- Overrides:
matches
in classDepthItemFilter
- Parameters:
item
- the item to match- Returns:
true
if the item matches;false
otherwise.- Throws:
javax.jcr.RepositoryException
- if an error occurs.
-
dump
public void dump(DumpContext ctx, boolean isLast)
Dumps some human readable information using the given context.- Specified by:
dump
in interfaceDumpable
- Overrides:
dump
in classDepthItemFilter
- Parameters:
ctx
- the dump contextisLast
- specifies if this is the last element to dump on this level
-
-