code: protected String removeBracketsAndQuotes( String text,
                                                boolean recursive,
                                                Position position ) {
          if (text.length() > 0) {
              char firstChar = text.charAt(0);
              switch (firstChar) {
                  case '\'':
                  case '"':
                      if (text.charAt(text.length() - 1) != firstChar) {
                          String msg = GraphI18n.expectingValidName.text(text, position.getLine(), position.getColumn());
                          throw new ParsingException(position, msg);
                      }
                      String removed = text.substring(1, text.length() - 1);
                      return recursive ? removeBracketsAndQuotes(removed, recursive, position) : removed;
                  case '[':
                      if (text.charAt(text.length() - 1) != ']') {
                          String msg = GraphI18n.expectingValidName.text(text, position.getLine(), position.getColumn());
                          throw new ParsingException(position, msg);
                      }
                      removed = text.substring(1, text.length() - 1);
                      return recursive ? removeBracketsAndQuotes(removed, recursive, position) : removed;
              }
          }
          return text;
      }
docs: Remove any leading and trailing single-quotes, double-quotes, or square brackets from the supplied text.
  
  @param text the input text; may not be null
  @param recursive true if more than one pair of quotes, double-quotes, or square brackets should be removed, or false if
  just the first pair should be removed
  @param position the position of the text; may not be null
  @return the text without leading and trailing brackets and quotes, or <code>text</code> if there were no square brackets or
  quotes