uk.ac.starlink.gbin
Interface Representation<T>


public interface Representation<T>

Defines how an object type in a GBIN file will be represented when the GBIN file is turned into a table.

Since:
3 Sep 2015

Method Summary
 java.lang.Class<T> getContentClass()
          Returns the object type with which this representation presents values.
 boolean isColumn()
          Indicates whether values presented by this object are suitable for use as columns in a table.
 T representValue(java.lang.Object value)
          Transforms a raw data value to the value as presented by this representation.
 

Method Detail

getContentClass

java.lang.Class<T> getContentClass()
Returns the object type with which this representation presents values. All calls to representValue must return an instance of this class (or null).

Returns:
representation class for values

representValue

T representValue(java.lang.Object value)
Transforms a raw data value to the value as presented by this representation.

Parameters:
value - raw value obtained from GBIN file
Returns:
presented value of object, must be compatible with declared content class

isColumn

boolean isColumn()
Indicates whether values presented by this object are suitable for use as columns in a table. If not, the assumption is that it's a structured object, and its component parts may be recursed through to acquire multiple records corresponding to one value presented here.

Returns:
true iff represented values are suitable column values

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.