Example #1
0
  /**
   * Returns an enumeration describing the available options.
   *
   * @return an enumeration of all the available options.
   */
  public Enumeration listOptions() {
    Vector newVector;
    String desc;
    SelectedTag tag;
    int i;

    newVector = new Vector();

    desc = "";
    for (i = 0; i < TAGS_TYPE.length; i++) {
      tag = new SelectedTag(TAGS_TYPE[i].getID(), TAGS_TYPE);
      desc +=
          "\t"
              + tag.getSelectedTag().getIDStr()
              + " = "
              + tag.getSelectedTag().getReadable()
              + "\n";
    }
    newVector.addElement(
        new Option(
            "\tThe type of attribute to create:\n"
                + desc
                + "\t(default: "
                + new SelectedTag(Attribute.NUMERIC, TAGS_TYPE)
                + ")",
            "T",
            1,
            "-T " + Tag.toOptionList(TAGS_TYPE)));

    newVector.addElement(
        new Option(
            "\tSpecify where to insert the column. First and last\n"
                + "\tare valid indexes.(default: last)",
            "C",
            1,
            "-C <index>"));

    newVector.addElement(
        new Option(
            "\tName of the new attribute.\n" + "\t(default: 'Unnamed')", "N", 1, "-N <name>"));

    newVector.addElement(
        new Option(
            "\tCreate nominal attribute with given labels\n" + "\t(default: numeric attribute)",
            "L",
            1,
            "-L <label1,label2,...>"));

    newVector.addElement(
        new Option(
            "\tThe format of the date values (see ISO-8601)\n"
                + "\t(default: yyyy-MM-dd'T'HH:mm:ss)",
            "F",
            1,
            "-F <format>"));

    return newVector.elements();
  }
Example #2
0
  /**
   * Returns an enumeration describing the available options.
   *
   * @return an enumeration of all the available options.
   */
  public Enumeration listOptions() {
    Vector result;
    Enumeration en;
    String desc;
    int i;
    SelectedTag tag;

    result = new Vector();

    en = super.listOptions();
    while (en.hasMoreElements()) result.addElement(en.nextElement());

    result.addElement(
        new Option(
            "\tSpecify list of string attributes to convert to words.\n"
                + "\t(default: select all relational attributes)",
            "R",
            1,
            "-R <index1,index2-index4,...>"));

    result.addElement(new Option("\tInverts the matching sense of the selection.", "V", 0, "-V"));

    desc = "";
    for (i = 0; i < TAGS_SORTTYPE.length; i++) {
      tag = new SelectedTag(TAGS_SORTTYPE[i].getID(), TAGS_SORTTYPE);
      desc +=
          "\t"
              + tag.getSelectedTag().getIDStr()
              + " = "
              + tag.getSelectedTag().getReadable()
              + "\n";
    }
    result.addElement(
        new Option(
            "\tDetermines the type of sorting:\n"
                + desc
                + "\t(default: "
                + new SelectedTag(SORT_CASESENSITIVE, TAGS_SORTTYPE)
                + ")",
            "S",
            1,
            "-S " + Tag.toOptionList(TAGS_SORTTYPE)));

    return result.elements();
  }