Package org.pentaho.dm.commons
Class ArffMeta
java.lang.Object
org.pentaho.dm.commons.ArffMeta
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Make a copyint
Get the ARFF data typeGet the name of this fieldint
Get the Kettle data type (as defined in ValueMetaInterface)Get a comma-separated list of legal values for a nominal attributegetXML()
Get the XML representation of this fieldvoid
saveRep
(org.pentaho.di.repository.Repository rep, org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_step, int nr) Save this ArffMeta to a repositoryvoid
setDateFormat
(String dateFormat) void
setNominalVals
(String vals) Set a comma-separated list of legal values for a nominal attributestringToVals
(String vals)
-
Field Details
-
NUMERIC
public static final int NUMERIC- See Also:
-
NOMINAL
public static final int NOMINAL- See Also:
-
DATE
public static final int DATE- See Also:
-
STRING
public static final int STRING- See Also:
-
XML_TAG
- See Also:
-
-
Constructor Details
-
ArffMeta
Constructor- Parameters:
fieldName
- the name of this fieldkettleType
- the Kettle data typearffType
- 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 repositoryid_step
- the id of the stepnr
- the step number- Throws:
org.pentaho.di.core.exception.KettleException
- if an error occurs
-
ArffMeta
Construct from an XML node- Parameters:
uniNode
- a XML node
-
-
Method Details
-
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
-
getDateFormat
-
setNominalVals
Set a comma-separated list of legal values for a nominal attribute- Parameters:
vals
- the legal values
-
getNominalVals
Get a comma-separated list of legal values for a nominal attribute- Returns:
- the legal values
-
clone
Make a copy -
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 toid_transformation
- the transformation idid_step
- the step idnr
- the step number- Throws:
org.pentaho.di.core.exception.KettleException
- if an error occurs
-
stringToVals
-