Class IsNodeFilter

    • 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​(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​(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