private void serializeChildren(final IConfigMNode node, final OutputStream outputStream)
      throws IOException {
    for (final IConfigMNode child : node.getChildren().values()) {
      if (child.isDatabase()) {
        serializeDatabaseNode(child.getAsDatabaseMNode(), outputStream);
      } else if (child instanceof ConfigTableNode) {
        serializeTableNode((ConfigTableNode) child, outputStream);
      } else {
        serializeConfigBasicMNode(child, outputStream);
      }
    }
  }
This method returns the templateId set on paths if the path set matches or is a prefix of input
path pattern.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java