Class ArffMeta

java.lang.Object
org.pentaho.dm.commons.ArffMeta
All Implemented Interfaces:
Cloneable

public class ArffMeta extends Object implements Cloneable
Contains the meta data for one field being converted to ARFF
Version:
$Revision: 1.0 $
Author:
Mark Hall (mhall{[at]}pentaho{[dot]}org)
  • Field Details

  • Constructor Details

    • ArffMeta

      public ArffMeta(String fieldName, int kettleType, int arffType)
      Constructor
      Parameters:
      fieldName - the name of this field
      kettleType - the Kettle data type
      arffType - the ARFF data type
    • ArffMeta

      public ArffMeta(org.pentaho.di.repository.Repository rep, org.pentaho.di.repository.ObjectId id_step, int nr) throws org.pentaho.di.core.exception.KettleException
      Construct using data stored in repository
      Parameters:
      rep - the repository
      id_step - the id of the step
      nr - the step number
      Throws:
      org.pentaho.di.core.exception.KettleException - if an error occurs
    • ArffMeta

      public ArffMeta(Node arffNode)
      Construct from an XML node
      Parameters:
      uniNode - a XML node
  • Method Details

    • getFieldName

      public String getFieldName()
      Get the name of this field
      Returns:
      the name of the field
    • getKettleType

      public int getKettleType()
      Get the Kettle data type (as defined in ValueMetaInterface)
      Returns:
      the Kettle data type of this field
    • getArffType

      public int getArffType()
      Get the ARFF data type
      Returns:
      the ARFF data type of this field
    • setDateFormat

      public void setDateFormat(String dateFormat)
    • getDateFormat

      public String getDateFormat()
    • setNominalVals

      public void setNominalVals(String vals)
      Set a comma-separated list of legal values for a nominal attribute
      Parameters:
      vals - the legal values
    • getNominalVals

      public String getNominalVals()
      Get a comma-separated list of legal values for a nominal attribute
      Returns:
      the legal values
    • clone

      public Object clone()
      Make a copy
      Overrides:
      clone in class Object
      Returns:
      a copy of this UnivariateStatsMetaFunction.
    • getXML

      public String getXML()
      Get the XML representation of this field
      Returns:
      a String value
    • saveRep

      public void saveRep(org.pentaho.di.repository.Repository rep, org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_step, int nr) throws org.pentaho.di.core.exception.KettleException
      Save this ArffMeta to a repository
      Parameters:
      rep - the repository to save to
      id_transformation - the transformation id
      id_step - the step id
      nr - the step number
      Throws:
      org.pentaho.di.core.exception.KettleException - if an error occurs
    • stringToVals

      public static List<String> stringToVals(String vals)