Package org.pentaho.dm.commons
Class ArffMeta
- java.lang.Object
-
- org.pentaho.dm.commons.ArffMeta
-
-
Constructor Summary
Constructors Constructor Description ArffMeta(String fieldName, int kettleType, int arffType)ConstructorArffMeta(org.pentaho.di.repository.Repository rep, org.pentaho.di.repository.ObjectId id_step, int nr)Construct using data stored in repositoryArffMeta(Node arffNode)Construct from an XML node
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Make a copyintgetArffType()Get the ARFF data typeStringgetDateFormat()StringgetFieldName()Get the name of this fieldintgetKettleType()Get the Kettle data type (as defined in ValueMetaInterface)StringgetNominalVals()Get a comma-separated list of legal values for a nominal attributeStringgetXML()Get the XML representation of this fieldvoidsaveRep(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 repositoryvoidsetDateFormat(String dateFormat)voidsetNominalVals(String vals)Set a comma-separated list of legal values for a nominal attributestatic List<String>stringToVals(String vals)
-
-
-
Field Detail
-
NUMERIC
public static final int NUMERIC
- See Also:
- Constant Field Values
-
NOMINAL
public static final int NOMINAL
- See Also:
- Constant Field Values
-
DATE
public static final int DATE
- See Also:
- Constant Field Values
-
STRING
public static final int STRING
- See Also:
- Constant Field Values
-
XML_TAG
public static final String XML_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArffMeta
public ArffMeta(String fieldName, int kettleType, int arffType)
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.KettleExceptionConstruct 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
public ArffMeta(Node arffNode)
Construct from an XML node- Parameters:
uniNode- a XML node
-
-
Method Detail
-
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
-
getXML
public String getXML()
Get the XML representation of this field- Returns:
- a
Stringvalue
-
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.KettleExceptionSave 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
-
-