uk.org.ogsadai.tuple
Interface TupleMetadata

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SimpleTupleMetadata

public interface TupleMetadata
extends java.io.Serializable

Interface defining the metadata of a tuple.

Author:
The OGSA-DAI Project Team

Method Summary
 int getColumnCount()
          Get the size of the tuple metadata.
 ColumnMetadata getColumnMetadata(ColumnIdentifier columnIdentifier)
          Get the metadata for the first column to match the given column identifier.
 ColumnMetadata getColumnMetadata(int columnIndex)
          Get the metadata for a specific column.
 ColumnMetadata getColumnMetadata(java.lang.String columnName)
          Get the metadata for a named column.
 int getColumnMetadataPosition(ColumnIdentifier columnIdentifier)
          Get the position of the first column to match the given column identifier.
 int getColumnMetadataPosition(java.lang.String columnName)
          Get the position of the column metadata according to a specific column name.
 java.lang.String getDescription()
          A generic description of the metadata.
 

Method Detail

getColumnCount

int getColumnCount()
Get the size of the tuple metadata.

Returns:
number of columns in the tuple

getColumnMetadata

ColumnMetadata getColumnMetadata(int columnIndex)
                                 throws ColumnNotFoundException
Get the metadata for a specific column.

Parameters:
columnIndex - The column index between 0 and getColumnCount()-1 inclusive.
Returns:
The metadata of the specified column.
Throws:
ColumnNotFoundException - raised if the column number is out of bounds

getColumnMetadata

ColumnMetadata getColumnMetadata(java.lang.String columnName)
                                 throws ColumnNotFoundException
Get the metadata for a named column.

Parameters:
columnName - the column name.
Returns:
The metadata of the first column that matches the given column name.
Throws:
ColumnNotFoundException - if no column with the specified name is found.

getColumnMetadata

ColumnMetadata getColumnMetadata(ColumnIdentifier columnIdentifier)
                                 throws ColumnNotFoundException
Get the metadata for the first column to match the given column identifier.

Parameters:
columnIdentifier - column identifier.
Returns:
The metadata of the first column that matches the given column identifier.
Throws:
ColumnNotFoundException - if no column matches the given column identifier.

getColumnMetadataPosition

int getColumnMetadataPosition(java.lang.String columnName)
Get the position of the column metadata according to a specific column name.

Parameters:
columnName - the column name.
Returns:
column position within the metadata of the first column matching the column name (between 0 and getColumnCount()-1 inclusive), or -1 if no column matches the column name.

getColumnMetadataPosition

int getColumnMetadataPosition(ColumnIdentifier columnIdentifier)
Get the position of the first column to match the given column identifier.

Parameters:
columnIdentifier - column identifier.
Returns:
column position within the metadata of the first column matching the column identifier (between 0 and getColumnCount()-1 inclusive), or -1 if no column matches the column identifier.

getDescription

java.lang.String getDescription()
A generic description of the metadata.

Returns:
a description