Package org.pentaho.commons.connection
Class AbstractPentahoMetaData
- java.lang.Object
-
- org.pentaho.commons.connection.AbstractPentahoMetaData
-
- All Implemented Interfaces:
IPentahoMetaData
- Direct Known Subclasses:
MemoryMetaData
public abstract class AbstractPentahoMetaData extends Object implements IPentahoMetaData
-
-
Constructor Summary
Constructors Constructor Description AbstractPentahoMetaData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ObjectgetAttribute(int rowNo, int columnNo, String attributeName)get an attribute from the metadataintgetColumnCount()abstract Object[][]getColumnHeaders()intgetColumnIndex(String value)Gets the 0-based column number for a specified column header value.intgetColumnIndex(String[] values)Gets the 0-based column number for a set of column header values.abstract Object[][]getRowHeaders()intgetRowIndex(String value)Gets the 0-based row number for a specified row header value.intgetRowIndex(String[] values)Gets the 0-based row number for a set of row header values.
-
-
-
Method Detail
-
getColumnIndex
public int getColumnIndex(String value)
Description copied from interface:IPentahoMetaDataGets the 0-based column number for a specified column header value. If the column header cannot be found -1 is returned. If there is more than 1 column header dimentsions -1 is returned.- Specified by:
getColumnIndexin interfaceIPentahoMetaData- Parameters:
value- The column header value to search for.- Returns:
- The 0-based index of the column
-
getColumnIndex
public int getColumnIndex(String[] values)
Description copied from interface:IPentahoMetaDataGets the 0-based column number for a set of column header values. If the column header cannot be found -1 is returned. If the number of column header dimensions does not match the number of values provided -1 is returned.- Specified by:
getColumnIndexin interfaceIPentahoMetaData- Returns:
- The 0-based index of the column
-
getRowIndex
public int getRowIndex(String value)
Description copied from interface:IPentahoMetaDataGets the 0-based row number for a specified row header value. If the row header cannot be found -1 is returned. If there is more than 1 row header dimentsions -1 is returned.- Specified by:
getRowIndexin interfaceIPentahoMetaData- Parameters:
value- The row header value to search for.- Returns:
- The 0-based index of the row
-
getRowIndex
public int getRowIndex(String[] values)
Description copied from interface:IPentahoMetaDataGets the 0-based row number for a set of row header values. If the row header cannot be found -1 is returned. If the number of row header dimensions does not match the number of values provided -1 is returned.- Specified by:
getRowIndexin interfaceIPentahoMetaData- Returns:
- The 0-based index of the row
-
getColumnHeaders
public abstract Object[][] getColumnHeaders()
- Specified by:
getColumnHeadersin interfaceIPentahoMetaData- Returns:
- a 2D grid that represents column headers. NOTE: 2D data will contain a column header that is 1 x N where N is the number of columns in the data. Multidimensional data will return N x M where N is the number of dimensions and M is the number of columns. With the 0 index for N representing the innermost dimension.
-
getRowHeaders
public abstract Object[][] getRowHeaders()
- Specified by:
getRowHeadersin interfaceIPentahoMetaData- Returns:
- a 2D grid that represents row headers. NOTE: 2D data will return null for the row header. Multidimensional data will return N x M where M is the number of dimensions and N is the number of rows. With the 0 index for M representing the innermost dimension. This method has been moved to IMultiDimensionalMetaData
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceIPentahoMetaData- Returns:
- Count of columns returned.
-
getAttribute
public Object getAttribute(int rowNo, int columnNo, String attributeName)
Description copied from interface:IPentahoMetaDataget an attribute from the metadata- Specified by:
getAttributein interfaceIPentahoMetaData- Parameters:
rowNo- the row numbercolumnNo- the column numberattributeName- the attribute name- Returns:
- the attribute
-
-