Beispiel #1
0
  /**
   * Gets the current settings of the filter.
   *
   * @return an array of strings suitable for passing to setOptions
   */
  public String[] getOptions() {
    Vector<String> result;

    result = new Vector<String>();

    if (m_AttributeType != Attribute.NUMERIC) {
      result.add("-T");
      result.add("" + getAttributeType());
    }

    result.add("-N");
    result.add(Utils.backQuoteChars(getAttributeName()));

    if (m_AttributeType == Attribute.NOMINAL) {
      result.add("-L");
      result.add(getNominalLabels());
    } else if (m_AttributeType == Attribute.NOMINAL) {
      result.add("-F");
      result.add(getDateFormat());
    }

    result.add("-C");
    result.add("" + getAttributeIndex());

    return result.toArray(new String[result.size()]);
  }
Beispiel #2
0
 /**
  * Returns the character used as column separator.
  *
  * @return the character to use
  */
 public String getFieldSeparator() {
   return Utils.backQuoteChars(m_FieldSeparator);
 }