code: public static List<Resource> getChildrenByType(final Resource resource, List<String> typeSet) {
          final ArrayList<Resource> children = new ArrayList<>();
          if (resource != null) {
              for (final Resource child : resource.getChildren()) {
                  for (String type : typeSet) {
                      if (isResourceType(child, type)) {
                          children.add(child);
                          break;
                      }
                  }
              }
          }
          return children;
      }
docs: retrieves all children of one of a type from a type set (node type or resource type)