예제 #1
0
파일: Add.java 프로젝트: alishakiba/jDenetX
  /**
   * 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()]);
  }
예제 #2
0
 /**
  * Returns the character used as column separator.
  *
  * @return the character to use
  */
 public String getFieldSeparator() {
   return Utils.backQuoteChars(m_FieldSeparator);
 }