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 Object
clone()
Make a copyint
getArffType()
Get the ARFF data typeString
getDateFormat()
String
getFieldName()
Get the name of this fieldint
getKettleType()
Get the Kettle data type (as defined in ValueMetaInterface)String
getNominalVals()
Get a comma-separated list of legal values for a nominal attributeString
getXML()
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 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.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
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
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
-
-