code: public static String getTitle(Node node) {
          String title = getNodeTitle(node);
          if (StringUtils.isBlank(title)) {
              try {
                  title = node.getName();
              } catch (RepositoryException rex) {
                  LOG.error(rex.getMessage(), rex);
              }
          }
          return title;
      }
docs: Retrieves the title with a fallback to the nodes name.
  
  @param node
  @return the usable title (not blank)