public List<MeasurementPath> getAllPathPatterns(boolean asMeasurementPath) {
    List<MeasurementPath> result = new ArrayList<>();
    Deque<String> ancestors = new ArrayDeque<>();
    searchPathPattern(root, ancestors, result, asMeasurementPath);
    return result;
  }
Construct tree according to the pathPatternList.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PathPatternTree.java