/** Returns a recursively created XML representation of this <code>Meta</code>. */
  public String toString() {

    StringBuilder buffer = new StringBuilder();
    buffer.append("<" + xmltag + ">" + newline);

    if (null != corpus_id) {
      buffer.append("\t\t\t" + corpus_id.toString());
    }
    if (null != history) {
      buffer.append("\t\t\t" + history.toString());
    }
    if (null != format) {
      buffer.append("\t\t\t" + format.toString());
    }
    if (null != name) {
      buffer.append("\t\t\t" + name.toString());
    }
    if (null != author) {
      buffer.append("\t\t\t" + author.toString());
    }
    if (null != date) {
      buffer.append("\t\t\t" + date.toString());
    }
    if (null != description) {
      buffer.append("\t\t\t" + description.toString());
    }

    buffer.append("\t\t</" + xmltag + ">" + newline);

    return buffer.toString();
  }
Пример #2
0
 /**
  * Returns a textual representation of the contents of the cell, formatted as a {@link String}.
  */
 public String toString() {
   switch (type) {
     case DATE: // date
       return date.toString();
     case DOUBLE: // number
       return Double.toString(d);
     case FORMULA: // Formula
       return formula.toString();
     case STRING: // String
       return "\"" + s + "\"";
     default: // case EMPTY:
       return "<empty>";
   }
 }