Class IsNodeFilter

    • 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 filter
      IsNodeFilter​(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​(Item item)
      Returns true.
      void setIsNode​(java.lang.String polarity)
      Sets the polarity of this filter.
      void setPolarity​(java.lang.String polarity)
      Sets the polarity of this filter.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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. if true it matches nodes, if false it matches properties.
        minDepth - the minimum depth
        maxDepth - the maximum depth
        See Also:
        DepthItemFilter
      • IsNodeFilter

        public IsNodeFilter​(boolean polarity)
        Creates a new node item filter
        Parameters:
        polarity - the polarity of this filter. if true it matches nodes, if false it matches properties.
    • Method Detail

      • setPolarity

        public void setPolarity​(java.lang.String polarity)
        Sets the polarity of this filter. If set to true this filter matches nodes otherwise properties.
        Parameters:
        polarity - the polarity
      • setIsNode

        public void setIsNode​(java.lang.String polarity)
        Sets the polarity of this filter. If set to true this filter matches nodes otherwise properties.
        Parameters:
        polarity - the polarity
      • matches

        public boolean matches​(Item item)
                        throws RepositoryException
        Returns true. Subclasses can override to implement something useful that is dependant of the depth. Returns true if the item is a node and the polarity is positive (true).
        Overrides:
        matches in class DepthItemFilter
        Parameters:
        item - the item to match
        Returns:
        true if the item matches; false otherwise.
        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:
        dump in interface Dumpable
        Overrides:
        dump in class DepthItemFilter
        Parameters:
        ctx - the dump context
        isLast - specifies if this is the last element to dump on this level