Class SearchNodeFactory


  • public class SearchNodeFactory
    extends Object
    Search node factory.
    Author:
    Angelo ZERR
    • Constructor Detail

      • SearchNodeFactory

        public SearchNodeFactory()
    • Method Detail

      • findSearchNodes

        public static List<SearchNode> findSearchNodes​(DOMNode node,
                                                       String prefix,
                                                       boolean multiple,
                                                       SearchNode.Direction direction)
        Returns all search node of the given DOM node.

        will return the search nodes #abc and #def.

        Parameters:
        node - the DOM node.
        prefix - the prefix.
        multiple - true if multiple is supported.
        direction - the search node direction.
        Returns:
        all search node of the given DOM node.
      • getSearchNodeAt

        public static SearchNode getSearchNodeAt​(DOMNode node,
                                                 int offset,
                                                 String prefix,
                                                 boolean multiple,
                                                 SearchNode.Direction direction)
        Returns the search node in the given DOM node at the given offset and null otherwise.

        will return the search node #def.

        Parameters:
        node - the DOM node.
        offset - the offset.
        prefix - the prefix.
        multiple - true if multiple is supported.
        direction - the search node direction.
        Returns:
        the search node in the given DOM node at the given offset and null otherwise.