gov.nih.nlm.util
Class ColumnStatistics

java.lang.Object
  extended bygov.nih.nlm.util.ColumnStatistics

public class ColumnStatistics
extends Object

Container for statistics about file columns.


Constructor Summary
ColumnStatistics()
          Instantiates an empty ColumnStatistics.
 
Method Summary
 void clear()
          Clears the statistics for the column.
 double getAverageLength()
          Returns the average length.
 String getColumnName()
          Returns the column name.
 String getDataType()
          Returns the data type of the column.
 int getDataTypeLength()
          Returns the data type length of the column.
 String getDescription()
          Returns the column description.
 String getFileName()
          Returns the file name.
 int getMaxLength()
          Returns the maximum length of the column.
 int getMinLength()
          Returns the minimum length of the column.
 String processField(String field)
          Computes statistics for the field.
 void setAverageLength(double new_average_length)
          Sets the average length of column
 void setColumnName(String newcolumn_name)
          Sets the column name.
 void setDataType(String new_data_type)
          Sets the column data type.
 void setDataTypeLength(String new_data_type_length)
          Sets the column data type length.
 void setDescription(String new_description)
          Sets the the description.
 void setFileName(String newfile_name)
          Sets the file name.
 void setMaxLength(int newMax_length)
          Sets the maximum length of column
 void setMinLength(int newMin_length)
          Set the minimum length of column
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnStatistics

public ColumnStatistics()
Instantiates an empty ColumnStatistics.

Method Detail

clear

public void clear()
Clears the statistics for the column.


getColumnName

public String getColumnName()
Returns the column name.

Returns:
the column name

getFileName

public String getFileName()
Returns the file name.

Returns:
the file name

getMaxLength

public int getMaxLength()
Returns the maximum length of the column.

Returns:
the maximum length of the column

getMinLength

public int getMinLength()
Returns the minimum length of the column.

Returns:
the minimum length of the column

setColumnName

public void setColumnName(String newcolumn_name)
Sets the column name.

Parameters:
newcolumn_name - the column name

setFileName

public void setFileName(String newfile_name)
Sets the file name.

Parameters:
newfile_name - the file name

setMaxLength

public void setMaxLength(int newMax_length)
Sets the maximum length of column

Parameters:
newMax_length - the maximum length

setMinLength

public void setMinLength(int newMin_length)
Set the minimum length of column

Parameters:
newMin_length - the minimum length

setAverageLength

public void setAverageLength(double new_average_length)
Sets the average length of column

Parameters:
new_average_length - the average length

getDescription

public String getDescription()
Returns the column description.

Returns:
the column description

setDescription

public void setDescription(String new_description)
Sets the the description.

Parameters:
new_description - the column description

getAverageLength

public double getAverageLength()
Returns the average length.

Returns:
the average length

getDataType

public String getDataType()
Returns the data type of the column.

Returns:
the data type of the column

setDataType

public void setDataType(String new_data_type)
Sets the column data type.

Parameters:
new_data_type - the column data type

getDataTypeLength

public int getDataTypeLength()
Returns the data type length of the column.

Returns:
the data type length of the column

setDataTypeLength

public void setDataTypeLength(String new_data_type_length)
Sets the column data type length.

Parameters:
new_data_type_length - the column data type length

processField

public String processField(String field)
Computes statistics for the field.

Parameters:
field - the field value to compute stats for
Returns:
the field passed in (unchanged)


Copyright ©2005