Class SearchPath


  • public class SearchPath
    extends java.lang.Object
    Utility class for parsing model.searchPath and filtering a search cluster based on it.
    Author:
    ollivir
    • Method Detail

      • selectNodes

        public static java.util.List<Node> selectNodes​(java.lang.String searchPath,
                                                       SearchCluster cluster)
        Parse the search path and select nodes from the given cluster based on it.
        Parameters:
        searchPath - unparsed search path expression (see: model.searchPath in Search API reference)
        cluster - the search cluster from which nodes are selected
        Returns:
        list of nodes chosen with the search path, or an empty list in which case some other node selection logic should be used
        Throws:
        SearchPath.InvalidSearchPathException - if the searchPath is malformed
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object