KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > core > connection > IPentahoMetaData


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12  *
13  * Created Sep 7, 2005
14  * @author wseyler
15  */

16
17 package org.pentaho.core.connection;
18
19 /**
20  * Defines the methods that must be supported for obtaining metadata about
21  * a source of data.
22  *
23  * @author wseyler
24  */

25 public interface IPentahoMetaData {
26
27     /**
28      * @return a 2D grid that represents column headers.
29      *
30      * NOTE: 2D data will contain a column header that is 1 x N where N is the
31      * number of columns in the data. Multidimensional data will return N x M
32      * where N is the number of dimensions and M is the number of columns. With
33      * the 0 index for N representing the innermost dimension.
34      */

35     public Object JavaDoc[][] getColumnHeaders();
36
37     /**
38      * @return a 2D grid that represents row headers.
39      *
40      * NOTE: 2D data will return null for the row header. Multidimensional data
41      * will return N x M where M is the number of dimensions and N is the number
42      * of rows. With the 0 index for M representing the innermost dimension.
43      */

44     public Object JavaDoc[][] getRowHeaders();
45
46     /**
47      * Gets the 0-based column number for a specified column header value. If
48      * the column header cannot be found -1 is returned. If there is more than 1
49      * column header dimentsions -1 is returned.
50      *
51      * @param value
52      * The column header value to search for.
53      * @return The 0-based index of the column
54      * @throws Exception
55      */

56     public int getColumnIndex(String JavaDoc value);
57
58     /**
59      * Gets the 0-based column number for a set of column header values. If the
60      * column header cannot be found -1 is returned. If the number of column
61      * header dimensions does not match the number of values provided -1 is
62      * returned.
63      *
64      * @param value
65      * The column header value to search for.
66      * @return The 0-based index of the column
67      */

68     public int getColumnIndex(String JavaDoc[] values);
69
70     /**
71      * Gets the 0-based row number for a specified row header value. If the row
72      * header cannot be found -1 is returned. If there is more than 1 row header
73      * dimentsions -1 is returned.
74      *
75      * @param value
76      * The row header value to search for.
77      * @return The 0-based index of the row
78      * @throws Exception
79      */

80     public int getRowIndex(String JavaDoc value);
81
82     /**
83      * Gets the 0-based row number for a set of row header values. If the row
84      * header cannot be found -1 is returned. If the number of row header
85      * dimensions does not match the number of values provided -1 is returned.
86      *
87      * @param value
88      * The row header value to search for.
89      * @return The 0-based index of the row
90      */

91     public int getRowIndex(String JavaDoc[] values);
92
93     /**
94      * @return Count of columns returned.
95      */

96     public int getColumnCount();
97 }
98
Popular Tags